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 |
|---|---|---|---|---|---|---|---|---|
3,318 | activity_1 | spider:train_spider.json:6747 | Show the number of male and female assistant professors. | SELECT sex , count(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex | [
"Show",
"the",
"number",
"of",
"male",
"and",
"female",
"assistant",
"professors",
"."
] | [
{
"id": 3,
"type": "column",
"value": "AsstProf"
},
{
"id": 0,
"type": "table",
"value": "faculty"
},
{
"id": 2,
"type": "column",
"value": "rank"
},
{
"id": 1,
"type": "column",
"value": "sex"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,319 | food_inspection_2 | bird:train.json:6149 | How many businesses from ward 42 have at least 5 failed inspection results between 1/1/2010 to 12/31/2015? | SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_date BETWEEN '2010-01-01' AND '2015-12-31' AND T1.ward = 42 AND T1.license_no IN ( SELECT license_no FROM ( SELECT license_no FROM inspection WHERE results = 'Fail' GROUP BY lic... | [
"How",
"many",
"businesses",
"from",
"ward",
"42",
"have",
"at",
"least",
"5",
"failed",
"inspection",
"results",
"between",
"1/1/2010",
"to",
"12/31/2015",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "inspection_date"
},
{
"id": 0,
"type": "table",
"value": "establishment"
},
{
"id": 1,
"type": "table",
"value": "inspection"
},
{
"id": 2,
"type": "column",
"value": "license_no"
},
{
"id": 4,
"type": "va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
3,320 | sales | bird:train.json:5420 | List the full names of customers who have purchased products in quantity over 600. | SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Quantity > 600 | [
"List",
"the",
"full",
"names",
"of",
"customers",
"who",
"have",
"purchased",
"products",
"in",
"quantity",
"over",
"600",
"."
] | [
{
"id": 6,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,321 | retails | bird:train.json:6724 | How many items were shipped on 4th December, 1993? | SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipdate = '1993-12-04' | [
"How",
"many",
"items",
"were",
"shipped",
"on",
"4th",
"December",
",",
"1993",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "l_linenumber"
},
{
"id": 1,
"type": "column",
"value": "l_shipdate"
},
{
"id": 2,
"type": "value",
"value": "1993-12-04"
},
{
"id": 0,
"type": "table",
"value": "lineitem"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,322 | music_2 | spider:train_spider.json:5207 | What instrument is used the most? | SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1 | [
"What",
"instrument",
"is",
"used",
"the",
"most",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "instruments"
},
{
"id": 1,
"type": "column",
"value": "instrument"
}
] | [
{
"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": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
3,323 | olympics | bird:train.json:5079 | Among the competitors with age ranges 24 and below, calculate the difference between the number of competitors who weighed greater than 70 kg and competitors who weighted less than 70 kg. | SELECT COUNT(CASE WHEN T1.weight > 70 THEN 1 ELSE NULL END) - COUNT(CASE WHEN T1.weight < 70 THEN 1 ELSE NULL END) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.age < 24 | [
"Among",
"the",
"competitors",
"with",
"age",
"ranges",
"24",
"and",
"below",
",",
"calculate",
"the",
"difference",
"between",
"the",
"number",
"of",
"competitors",
"who",
"weighed",
"greater",
"than",
"70",
"kg",
"and",
"competitors",
"who",
"weighted",
"les... | [
{
"id": 1,
"type": "table",
"value": "games_competitor"
},
{
"id": 5,
"type": "column",
"value": "person_id"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 7,
"type": "column",
"value": "weight"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,324 | online_exams | bird:test.json:202 | For each question type, return its type code and its count of occurrence. | SELECT Type_of_Question_Code , COUNT(*) FROM Questions GROUP BY Type_of_Question_Code | [
"For",
"each",
"question",
"type",
",",
"return",
"its",
"type",
"code",
"and",
"its",
"count",
"of",
"occurrence",
"."
] | [
{
"id": 1,
"type": "column",
"value": "type_of_question_code"
},
{
"id": 0,
"type": "table",
"value": "questions"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,325 | app_store | bird:train.json:2558 | List down application that have not been updated since 2015. What is the percentage of this application having more negative sentiment than positive sentiment? | SELECT CAST((( SELECT COUNT(*) Po FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Positive' ) - ( SELECT COUNT(*) Ne FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2... | [
"List",
"down",
"application",
"that",
"have",
"not",
"been",
"updated",
"since",
"2015",
".",
"What",
"is",
"the",
"percentage",
"of",
"this",
"application",
"having",
"more",
"negative",
"sentiment",
"than",
"positive",
"sentiment",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "user_reviews"
},
{
"id": 5,
"type": "column",
"value": "Last Updated"
},
{
"id": 1,
"type": "table",
"value": "playstore"
},
{
"id": 8,
"type": "column",
"value": "sentiment"
},
{
"id": 9,
"type": "value",
... | [
{
"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": []
},
{
"entity_id": 5,
"token_idxs": [
7
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
3,326 | olympics | bird:train.json:4963 | In which Olympic Games have the largest number of women participation? | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.gender = 'F' GROUP BY T1.games_name ORDER BY COUNT(T2.person_id) DESC LIMIT 1 | [
"In",
"which",
"Olympic",
"Games",
"have",
"the",
"largest",
"number",
"of",
"women",
"participation",
"?"
] | [
{
"id": 5,
"type": "table",
"value": "games_competitor"
},
{
"id": 0,
"type": "column",
"value": "games_name"
},
{
"id": 6,
"type": "column",
"value": "person_id"
},
{
"id": 8,
"type": "column",
"value": "games_id"
},
{
"id": 1,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
3,327 | cre_Drama_Workshop_Groups | spider:train_spider.json:5143 | Find the order detail for the products with price above 2000. | SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 | [
"Find",
"the",
"order",
"detail",
"for",
"the",
"products",
"with",
"price",
"above",
"2000",
"."
] | [
{
"id": 0,
"type": "column",
"value": "other_item_details"
},
{
"id": 3,
"type": "column",
"value": "product_price"
},
{
"id": 1,
"type": "table",
"value": "order_items"
},
{
"id": 5,
"type": "column",
"value": "product_id"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
1,
3
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,328 | soccer_2016 | bird:train.json:1844 | Provide the winning team's name in the match with the point of winning margin of 7 on May 7, 2009. | SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Match_Date = '2009-05-07' AND T2.Win_Margin = 7 | [
"Provide",
"the",
"winning",
"team",
"'s",
"name",
"in",
"the",
"match",
"with",
"the",
"point",
"of",
"winning",
"margin",
"of",
"7",
"on",
"May",
"7",
",",
"2009",
"."
] | [
{
"id": 4,
"type": "column",
"value": "match_winner"
},
{
"id": 5,
"type": "column",
"value": "match_date"
},
{
"id": 6,
"type": "value",
"value": "2009-05-07"
},
{
"id": 7,
"type": "column",
"value": "win_margin"
},
{
"id": 0,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
3,329 | driving_school | spider:train_spider.json:6662 | List phone number and email address of customer with more than 2000 outstanding balance. | SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000; | [
"List",
"phone",
"number",
"and",
"email",
"address",
"of",
"customer",
"with",
"more",
"than",
"2000",
"outstanding",
"balance",
"."
] | [
{
"id": 3,
"type": "column",
"value": "amount_outstanding"
},
{
"id": 2,
"type": "column",
"value": "email_address"
},
{
"id": 1,
"type": "column",
"value": "phone_number"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
3,330 | cre_Docs_and_Epenses | spider:train_spider.json:6392 | What are the ids and details of all statements? | SELECT STATEMENT_ID , statement_details FROM Statements | [
"What",
"are",
"the",
"ids",
"and",
"details",
"of",
"all",
"statements",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "statement_details"
},
{
"id": 1,
"type": "column",
"value": "statement_id"
},
{
"id": 0,
"type": "table",
"value": "statements"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,331 | advertising_agencies | bird:test.json:2107 | How many payments do we have? | SELECT count(*) FROM Payments | [
"How",
"many",
"payments",
"do",
"we",
"have",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "payments"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
3,332 | book_2 | spider:train_spider.json:222 | Show the title and publication dates of books. | SELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID | [
"Show",
"the",
"title",
"and",
"publication",
"dates",
"of",
"books",
"."
] | [
{
"id": 1,
"type": "column",
"value": "publication_date"
},
{
"id": 3,
"type": "table",
"value": "publication"
},
{
"id": 4,
"type": "column",
"value": "book_id"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
3,333 | chicago_crime | bird:train.json:8715 | How many severe crime incidents were reported at coordinate 41.64820151, -87.54430496? | SELECT SUM(CASE WHEN T1.longitude = '-87.54430496' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.report_no = T2.iucr_no WHERE T2.index_code = 'I' AND T1.latitude = '41.64820251' | [
"How",
"many",
"severe",
"crime",
"incidents",
"were",
"reported",
"at",
"coordinate",
"41.64820151",
",",
"-87.54430496",
"?"
] | [
{
"id": 11,
"type": "value",
"value": "-87.54430496"
},
{
"id": 7,
"type": "value",
"value": "41.64820251"
},
{
"id": 4,
"type": "column",
"value": "index_code"
},
{
"id": 2,
"type": "column",
"value": "report_no"
},
{
"id": 10,
"type": "column... | [
{
"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": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
3,334 | institution_sports | bird:test.json:1652 | Return the affiliations of instituions that are not in the city of Vancouver. | SELECT Affiliation FROM institution WHERE City != "Vancouver" | [
"Return",
"the",
"affiliations",
"of",
"instituions",
"that",
"are",
"not",
"in",
"the",
"city",
"of",
"Vancouver",
"."
] | [
{
"id": 0,
"type": "table",
"value": "institution"
},
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 3,
"type": "column",
"value": "Vancouver"
},
{
"id": 2,
"type": "column",
"value": "city"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
3,336 | student_loan | bird:train.json:4533 | Calculate the average duration of absense of female students. | SELECT AVG(T2.month) FROM person AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T1.name = T3.name WHERE T3.name IS NULL | [
"Calculate",
"the",
"average",
"duration",
"of",
"absense",
"of",
"female",
"students",
"."
] | [
{
"id": 4,
"type": "table",
"value": "longest_absense_from_school"
},
{
"id": 3,
"type": "table",
"value": "person"
},
{
"id": 2,
"type": "column",
"value": "month"
},
{
"id": 0,
"type": "table",
"value": "male"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
3,337 | formula_1 | bird:dev.json:903 | How many times did Michael Schumacher won from races hosted in Sepang International Circuit? | SELECT SUM(T2.wins) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId INNER JOIN circuits AS T4 ON T4.circuitId = T3.circuitId WHERE T1.forename = 'Michael' AND T1.surname = 'Schumacher' AND T4.name = 'Sepang International Circuit' | [
"How",
"many",
"times",
"did",
"Michael",
"Schumacher",
"won",
"from",
"races",
"hosted",
"in",
"Sepang",
"International",
"Circuit",
"?"
] | [
{
"id": 9,
"type": "value",
"value": "Sepang International Circuit"
},
{
"id": 11,
"type": "table",
"value": "driverstandings"
},
{
"id": 7,
"type": "value",
"value": "Schumacher"
},
{
"id": 3,
"type": "column",
"value": "circuitid"
},
{
"id": 0,
... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
3,338 | movie_3 | bird:train.json:9414 | How many customers are active? | SELECT COUNT(customer_id) FROM customer WHERE active = 1 | [
"How",
"many",
"customers",
"are",
"active",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 1,
"type": "column",
"value": "active"
},
{
"id": 2,
"type": "value",
"value": "1"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O"
] |
3,339 | public_review_platform | bird:train.json:4044 | How many businesses in Arizona having an average review less than 3 stars? | SELECT COUNT(business_id) FROM Business WHERE business_id IN ( SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'AZ' GROUP BY T1.business_id HAVING SUM(T2.review_stars) / COUNT(T2.user_id) < 3 ) | [
"How",
"many",
"businesses",
"in",
"Arizona",
"having",
"an",
"average",
"review",
"less",
"than",
"3",
"stars",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "review_stars"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "business"
},
{
"id": 2,
"type": "table",
"value": "reviews"
},
{
"id": 7,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
3,340 | phone_1 | spider:train_spider.json:1046 | How many models do not have the wifi function? | SELECT count(*) FROM chip_model WHERE wifi = 'No' | [
"How",
"many",
"models",
"do",
"not",
"have",
"the",
"wifi",
"function",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "chip_model"
},
{
"id": 1,
"type": "column",
"value": "wifi"
},
{
"id": 2,
"type": "value",
"value": "No"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
3,341 | cre_Drama_Workshop_Groups | spider:train_spider.json:5097 | Count the number of customers recorded. | SELECT count(*) FROM CUSTOMERS | [
"Count",
"the",
"number",
"of",
"customers",
"recorded",
"."
] | [
{
"id": 0,
"type": "table",
"value": "customers"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
3,342 | college_3 | spider:train_spider.json:4686 | What is the full name of the instructor who has a course named COMPUTER LITERACY? | SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = "COMPUTER LITERACY" | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"instructor",
"who",
"has",
"a",
"course",
"named",
"COMPUTER",
"LITERACY",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "COMPUTER LITERACY"
},
{
"id": 6,
"type": "column",
"value": "instructor"
},
{
"id": 3,
"type": "table",
"value": "faculty"
},
{
"id": 2,
"type": "table",
"value": "course"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,343 | works_cycles | bird:train.json:7319 | List all product name from Australia Bike Retailer order by product ID. | SELECT T3.Name FROM Vendor AS T1 INNER JOIN ProductVendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID WHERE T1.Name = 'Australia Bike Retailer' | [
"List",
"all",
"product",
"name",
"from",
"Australia",
"Bike",
"Retailer",
"order",
"by",
"product",
"ID",
"."
] | [
{
"id": 2,
"type": "value",
"value": "Australia Bike Retailer"
},
{
"id": 6,
"type": "column",
"value": "businessentityid"
},
{
"id": 4,
"type": "table",
"value": "productvendor"
},
{
"id": 5,
"type": "column",
"value": "productid"
},
{
"id": 1,
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,344 | tracking_share_transactions | spider:train_spider.json:5852 | Show the average amount of transactions with type code "SALE". | SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | [
"Show",
"the",
"average",
"amount",
"of",
"transactions",
"with",
"type",
"code",
"\"",
"SALE",
"\"",
"."
] | [
{
"id": 1,
"type": "column",
"value": "transaction_type_code"
},
{
"id": 3,
"type": "column",
"value": "amount_of_transaction"
},
{
"id": 0,
"type": "table",
"value": "transactions"
},
{
"id": 2,
"type": "column",
"value": "SALE"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
3,
4
]
},
{
"entity_id": 4,
"token_idx... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
3,345 | beer_factory | bird:train.json:5294 | Find the root beer with the most and least amount of profit per unit and list the container types in which these root beers are sold. | SELECT * FROM ( SELECT T1.BrandName, T2.ContainerType FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID ORDER BY T1.CurrentRetailPrice - T1.WholesaleCost DESC LIMIT 1 ) UNION ALL SELECT * FROM ( SELECT T3.BrandName, T4.ContainerType FROM rootbeerbrand AS T3 INNER JOIN rootbeer AS T4 ON T3.Br... | [
"Find",
"the",
"root",
"beer",
"with",
"the",
"most",
"and",
"least",
"amount",
"of",
"profit",
"per",
"unit",
"and",
"list",
"the",
"container",
"types",
"in",
"which",
"these",
"root",
"beers",
"are",
"sold",
"."
] | [
{
"id": 5,
"type": "column",
"value": "currentretailprice"
},
{
"id": 1,
"type": "column",
"value": "containertype"
},
{
"id": 2,
"type": "table",
"value": "rootbeerbrand"
},
{
"id": 6,
"type": "column",
"value": "wholesalecost"
},
{
"id": 0,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
17,
18
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,347 | video_games | bird:train.json:3372 | What is the title of the game that gained the most sales in Japan? | SELECT T.game_name FROM ( SELECT T5.game_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN game AS T5 ON T4.game_id = T5.id WHERE T1.region_name = 'Japan' O... | [
"What",
"is",
"the",
"title",
"of",
"the",
"game",
"that",
"gained",
"the",
"most",
"sales",
"in",
"Japan",
"?"
] | [
{
"id": 9,
"type": "column",
"value": "game_publisher_id"
},
{
"id": 12,
"type": "column",
"value": "game_platform_id"
},
{
"id": 5,
"type": "table",
"value": "game_publisher"
},
{
"id": 8,
"type": "table",
"value": "game_platform"
},
{
"id": 11,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,348 | financial | bird:dev.json:149 | Please list the account types that are not eligible for loans, and the average income of residents in the district where the account is located exceeds $8000 but is no more than $9000. | SELECT T3.type FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id WHERE T3.type != 'OWNER' AND T1.A11 BETWEEN 8000 AND 9000 | [
"Please",
"list",
"the",
"account",
"types",
"that",
"are",
"not",
"eligible",
"for",
"loans",
",",
"and",
"the",
"average",
"income",
"of",
"residents",
"in",
"the",
"district",
"where",
"the",
"account",
"is",
"located",
"exceeds",
"$",
"8000",
"but",
"i... | [
{
"id": 9,
"type": "column",
"value": "district_id"
},
{
"id": 4,
"type": "column",
"value": "account_id"
},
{
"id": 2,
"type": "table",
"value": "district"
},
{
"id": 3,
"type": "table",
"value": "account"
},
{
"id": 5,
"type": "value",
"v... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
30
]
},
{
"entity_id": 2,
"token_idxs": [
20
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
23
]
},
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,349 | retail_world | bird:train.json:6408 | Indicate the name of the companies that have freighted products for a value greater than 2,000,000. | SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > 2000000 | [
"Indicate",
"the",
"name",
"of",
"the",
"companies",
"that",
"have",
"freighted",
"products",
"for",
"a",
"value",
"greater",
"than",
"2,000,000",
"."
] | [
{
"id": 0,
"type": "column",
"value": "companyname"
},
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "column",
"value": "freight"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,350 | superhero | bird:dev.json:780 | List the powers of Hunter Zolomon. | SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Hunter Zolomon' | [
"List",
"the",
"powers",
"of",
"Hunter",
"Zolomon",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Hunter Zolomon"
},
{
"id": 0,
"type": "column",
"value": "power_name"
},
{
"id": 1,
"type": "table",
"value": "superpower"
},
{
"id": 5,
"type": "table",
"value": "hero_power"
},
{
"id": 2,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
3,351 | authors | bird:train.json:3634 | Show the keywords of the paper that was presented at "International Radar Symposium" in 2012. | SELECT T1.Keyword FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Radar Symposium' AND T1.Year = 2012 | [
"Show",
"the",
"keywords",
"of",
"the",
"paper",
"that",
"was",
"presented",
"at",
"\"",
"International",
"Radar",
"Symposium",
"\"",
"in",
"2012",
"."
] | [
{
"id": 6,
"type": "value",
"value": "International Radar Symposium"
},
{
"id": 3,
"type": "column",
"value": "conferenceid"
},
{
"id": 2,
"type": "table",
"value": "conference"
},
{
"id": 5,
"type": "column",
"value": "fullname"
},
{
"id": 0,
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
3,352 | chicago_crime | bird:train.json:8599 | How many crimes had happened in the community area with the most population? | SELECT COUNT(T2.report_no) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no GROUP BY T1.community_area_name ORDER BY T1.population DESC LIMIT 1 | [
"How",
"many",
"crimes",
"had",
"happened",
"in",
"the",
"community",
"area",
"with",
"the",
"most",
"population",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "community_area_name"
},
{
"id": 5,
"type": "column",
"value": "community_area_no"
},
{
"id": 1,
"type": "table",
"value": "community_area"
},
{
"id": 3,
"type": "column",
"value": "population"
},
{
"id": 4,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,353 | storm_record | spider:train_spider.json:2728 | Show the region name with at least two storms. | SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2 | [
"Show",
"the",
"region",
"name",
"with",
"at",
"least",
"two",
"storms",
"."
] | [
{
"id": 3,
"type": "table",
"value": "affected_region"
},
{
"id": 1,
"type": "column",
"value": "region_name"
},
{
"id": 0,
"type": "column",
"value": "region_id"
},
{
"id": 2,
"type": "table",
"value": "region"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,354 | restaurant | bird:train.json:1743 | How many labels of the restaurant have an unknown country? | SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown' | [
"How",
"many",
"labels",
"of",
"the",
"restaurant",
"have",
"an",
"unknown",
"country",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "generalinfo"
},
{
"id": 1,
"type": "table",
"value": "geographic"
},
{
"id": 3,
"type": "value",
"value": "unknown"
},
{
"id": 2,
"type": "column",
"value": "county"
},
{
"id": 4,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
3,355 | boat_1 | bird:test.json:864 | What are the names and ids of sailors who reserved red or blue boats? | SELECT DISTINCT T2.sid , T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON T1.bid = T2.bid JOIN Sailors AS T3 ON T2.sid = T3.sid WHERE T1.color = 'red' OR T1.color = "blue" | [
"What",
"are",
"the",
"names",
"and",
"ids",
"of",
"sailors",
"who",
"reserved",
"red",
"or",
"blue",
"boats",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "reserves"
},
{
"id": 2,
"type": "table",
"value": "sailors"
},
{
"id": 3,
"type": "table",
"value": "boats"
},
{
"id": 5,
"type": "column",
"value": "color"
},
{
"id": 1,
"type": "column",
"value": "nam... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-VALUE",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
3,356 | beer_factory | bird:train.json:5349 | Please name all of the cities in California. | SELECT DISTINCT City FROM customers WHERE State = 'CA' | [
"Please",
"name",
"all",
"of",
"the",
"cities",
"in",
"California",
"."
] | [
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "column",
"value": "state"
},
{
"id": 1,
"type": "column",
"value": "city"
},
{
"id": 3,
"type": "value",
"value": "CA"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
3,357 | hockey | bird:train.json:7794 | For the goalie whose legendsID is "P196402" , how many games did he play in the league? | SELECT SUM(T1.GP) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.legendsID = 'P196402' | [
"For",
"the",
"goalie",
"whose",
"legendsID",
"is",
"\"",
"P196402",
"\"",
",",
"how",
"many",
"games",
"did",
"he",
"play",
"in",
"the",
"league",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "legendsid"
},
{
"id": 5,
"type": "column",
"value": "playerid"
},
{
"id": 0,
"type": "table",
"value": "goalies"
},
{
"id": 3,
"type": "value",
"value": "P196402"
},
{
"id": 1,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
3,358 | cre_Students_Information_Systems | bird:test.json:466 | Find the biographical data and event date for students who participated in any events. | SELECT T1.bio_data , T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id = T2.student_id | [
"Find",
"the",
"biographical",
"data",
"and",
"event",
"date",
"for",
"students",
"who",
"participated",
"in",
"any",
"events",
"."
] | [
{
"id": 3,
"type": "table",
"value": "student_events"
},
{
"id": 1,
"type": "column",
"value": "event_date"
},
{
"id": 4,
"type": "column",
"value": "student_id"
},
{
"id": 0,
"type": "column",
"value": "bio_data"
},
{
"id": 2,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,359 | soccer_2016 | bird:train.json:2016 | What are the names of players in team 1? | SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id WHERE T3.Team_Id = 1 GROUP BY T1.Player_Name | [
"What",
"are",
"the",
"names",
"of",
"players",
"in",
"team",
"1",
"?"
] | [
{
"id": 5,
"type": "table",
"value": "player_match"
},
{
"id": 0,
"type": "column",
"value": "player_name"
},
{
"id": 6,
"type": "column",
"value": "player_id"
},
{
"id": 2,
"type": "column",
"value": "team_id"
},
{
"id": 4,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-TABLE",
"B-VALUE",
"O"
] |
3,360 | authors | bird:train.json:3517 | Among the authors of the paper "Stitching videos streamed by mobile phones in real-time", how many of them are affiliated with Cairo Microsoft Innovation Lab? | SELECT COUNT(T1.AuthorId) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'University of Tokyo' AND T2.Title = 'FIBER: A Generalized Framework for Auto-tuning Software' | [
"Among",
"the",
"authors",
"of",
"the",
"paper",
"\"",
"Stitching",
"videos",
"streamed",
"by",
"mobile",
"phones",
"in",
"real",
"-",
"time",
"\"",
",",
"how",
"many",
"of",
"them",
"are",
"affiliated",
"with",
"Cairo",
"Microsoft",
"Innovation",
"Lab",
"... | [
{
"id": 8,
"type": "value",
"value": "FIBER: A Generalized Framework for Auto-tuning Software"
},
{
"id": 6,
"type": "value",
"value": "University of Tokyo"
},
{
"id": 0,
"type": "table",
"value": "paperauthor"
},
{
"id": 5,
"type": "column",
"value": "aff... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,361 | bike_share_1 | bird:train.json:9047 | What is the percentage of trips that started in San Jose and durations were longer than 800 seconds? | SELECT CAST(SUM(CASE WHEN T1.duration > 800 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Jose' | [
"What",
"is",
"the",
"percentage",
"of",
"trips",
"that",
"started",
"in",
"San",
"Jose",
"and",
"durations",
"were",
"longer",
"than",
"800",
"seconds",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "start_station_name"
},
{
"id": 3,
"type": "value",
"value": "San Jose"
},
{
"id": 10,
"type": "column",
"value": "duration"
},
{
"id": 1,
"type": "table",
"value": "station"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,362 | cre_Doc_and_collections | bird:test.json:704 | What is the document object id with the least number of documents ? | select document_object_id , count(*) from document_subset_members group by document_object_id order by count(*) asc limit 1; | [
"What",
"is",
"the",
"document",
"object",
"i",
"d",
"with",
"the",
"least",
"number",
"of",
"documents",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "document_subset_members"
},
{
"id": 1,
"type": "column",
"value": "document_object_id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,363 | machine_repair | spider:train_spider.json:2256 | What are the names of the technicians that are assigned to repair machines with more point values than 70? | SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70 | [
"What",
"are",
"the",
"names",
"of",
"the",
"technicians",
"that",
"are",
"assigned",
"to",
"repair",
"machines",
"with",
"more",
"point",
"values",
"than",
"70",
"?"
] | [
{
"id": 4,
"type": "table",
"value": "repair_assignment"
},
{
"id": 6,
"type": "column",
"value": "technician_id"
},
{
"id": 2,
"type": "column",
"value": "value_points"
},
{
"id": 1,
"type": "table",
"value": "technician"
},
{
"id": 7,
"type":... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
18
]
},
{
"entity_id": 4,
"token_idxs": [
8,
9,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,364 | restaurant_1 | spider:train_spider.json:2840 | At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total. | SELECT Restaurant.ResName , sum(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY sum(Visits_Restaurant.Spent) ASC LIMIT 1; | [
"At",
"which",
"restaurant",
"did",
"the",
"students",
"spend",
"the",
"least",
"amount",
"of",
"time",
"?",
"List",
"restaurant",
"and",
"the",
"time",
"students",
"spent",
"on",
"in",
"total",
"."
] | [
{
"id": 2,
"type": "table",
"value": "visits_restaurant"
},
{
"id": 3,
"type": "table",
"value": "restaurant"
},
{
"id": 1,
"type": "column",
"value": "resname"
},
{
"id": 0,
"type": "column",
"value": "resid"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
19
]
},
{
"entity_i... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
3,365 | image_and_language | bird:train.json:7479 | How many object samples in image no.1 are in the class of "man"? | SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 | [
"How",
"many",
"object",
"samples",
"in",
"image",
"no.1",
"are",
"in",
"the",
"class",
"of",
"\"",
"man",
"\"",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "obj_class_id"
},
{
"id": 0,
"type": "table",
"value": "obj_classes"
},
{
"id": 6,
"type": "column",
"value": "obj_class"
},
{
"id": 1,
"type": "table",
"value": "img_obj"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,366 | bike_1 | spider:train_spider.json:203 | What are the id and name of the stations that have ever had more than 12 bikes available? | SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 | [
"What",
"are",
"the",
"i",
"d",
"and",
"name",
"of",
"the",
"stations",
"that",
"have",
"ever",
"had",
"more",
"than",
"12",
"bikes",
"available",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "bikes_available"
},
{
"id": 6,
"type": "column",
"value": "station_id"
},
{
"id": 2,
"type": "table",
"value": "station"
},
{
"id": 3,
"type": "table",
"value": "status"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
17,
18
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,367 | student_1 | spider:train_spider.json:4078 | Find the last names of the students in third grade that are not taught by COVIN JEROME. | SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME" | [
"Find",
"the",
"last",
"names",
"of",
"the",
"students",
"in",
"third",
"grade",
"that",
"are",
"not",
"taught",
"by",
"COVIN",
"JEROME",
"."
] | [
{
"id": 3,
"type": "column",
"value": "classroom"
},
{
"id": 6,
"type": "column",
"value": "firstname"
},
{
"id": 0,
"type": "column",
"value": "lastname"
},
{
"id": 2,
"type": "table",
"value": "teachers"
},
{
"id": 8,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
3,368 | mental_health_survey | bird:train.json:4604 | How many different answers did the question "Describe the conversation you had with your previous employer about your mental health, including their reactions and actions taken to address your mental health issue/questions." get? | SELECT COUNT(DISTINCT T1.AnswerText) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'Describe the conversation you had with your previous employer about your mental health, including their reactions and actions taken to address your mental health issue/questions.... | [
"How",
"many",
"different",
"answers",
"did",
"the",
"question",
"\"",
"Describe",
"the",
"conversation",
"you",
"had",
"with",
"your",
"previous",
"employer",
"about",
"your",
"mental",
"health",
",",
"including",
"their",
"reactions",
"and",
"actions",
"taken"... | [
{
"id": 3,
"type": "value",
"value": "Describe the conversation you had with your previous employer about your mental health, including their reactions and actions taken to address your mental health issue/questions."
},
{
"id": 2,
"type": "column",
"value": "questiontext"
},
{
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"... |
3,369 | video_games | bird:train.json:3396 | What is the total number of sales across all regions? | SELECT SUM(T.num_sales) * 100000 FROM region_sales t | [
"What",
"is",
"the",
"total",
"number",
"of",
"sales",
"across",
"all",
"regions",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "region_sales"
},
{
"id": 2,
"type": "column",
"value": "num_sales"
},
{
"id": 1,
"type": "value",
"value": "100000"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"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": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,370 | food_inspection_2 | bird:train.json:6147 | What are the names of the businesses that passed with conditions in May 2012? | SELECT DISTINCT T2.dba_name FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T1.inspection_date) = '2012-05' AND T1.results = 'Pass w/ Conditions' | [
"What",
"are",
"the",
"names",
"of",
"the",
"businesses",
"that",
"passed",
"with",
"conditions",
"in",
"May",
"2012",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Pass w/ Conditions"
},
{
"id": 8,
"type": "column",
"value": "inspection_date"
},
{
"id": 2,
"type": "table",
"value": "establishment"
},
{
"id": 1,
"type": "table",
"value": "inspection"
},
{
"id": 3,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
3,371 | insurance_policies | spider:train_spider.json:3863 | Return the claim start date for the claims whose claimed amount is no more than the average | SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims ) | [
"Return",
"the",
"claim",
"start",
"date",
"for",
"the",
"claims",
"whose",
"claimed",
"amount",
"is",
"no",
"more",
"than",
"the",
"average"
] | [
{
"id": 1,
"type": "column",
"value": "date_claim_made"
},
{
"id": 2,
"type": "column",
"value": "amount_settled"
},
{
"id": 0,
"type": "table",
"value": "claims"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
3,372 | movie_platform | bird:train.json:29 | What is the name of the movie whose critic received the highest number of likes related to the critic made by the user rating the movie? | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"movie",
"whose",
"critic",
"received",
"the",
"highest",
"number",
"of",
"likes",
"related",
"to",
"the",
"critic",
"made",
"by",
"the",
"user",
"rating",
"the",
"movie",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "critic_likes"
},
{
"id": 0,
"type": "column",
"value": "movie_title"
},
{
"id": 4,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table",
"value": "ratings"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
23
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
25
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O"
] |
3,373 | movies_4 | bird:train.json:520 | What is the longest runtime of all movies? | SELECT MAX(runtime) FROM movie | [
"What",
"is",
"the",
"longest",
"runtime",
"of",
"all",
"movies",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "runtime"
},
{
"id": 0,
"type": "table",
"value": "movie"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,374 | food_inspection_2 | bird:train.json:6128 | How many restaurants were inspected on 2015/5/8? | SELECT COUNT(T2.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_date = '2015-05-08' AND T1.facility_type = 'Restaurant' | [
"How",
"many",
"restaurants",
"were",
"inspected",
"on",
"2015/5/8",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "inspection_date"
},
{
"id": 0,
"type": "table",
"value": "establishment"
},
{
"id": 5,
"type": "column",
"value": "facility_type"
},
{
"id": 1,
"type": "table",
"value": "inspection"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"O"
] |
3,375 | culture_company | spider:train_spider.json:6969 | What are the years, titles, and publishers for all books, ordered by year descending? | SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC | [
"What",
"are",
"the",
"years",
",",
"titles",
",",
"and",
"publishers",
"for",
"all",
"books",
",",
"ordered",
"by",
"year",
"descending",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "book_title"
},
{
"id": 0,
"type": "table",
"value": "book_club"
},
{
"id": 3,
"type": "column",
"value": "publisher"
},
{
"id": 1,
"type": "column",
"value": "year"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
15
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
3,376 | insurance_policies | spider:train_spider.json:3865 | Find the number of settlements each claim corresponds to. Show the number together with the claim id. | SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id | [
"Find",
"the",
"number",
"of",
"settlements",
"each",
"claim",
"corresponds",
"to",
".",
"Show",
"the",
"number",
"together",
"with",
"the",
"claim",
"i",
"d."
] | [
{
"id": 2,
"type": "table",
"value": "settlements"
},
{
"id": 0,
"type": "column",
"value": "claim_id"
},
{
"id": 1,
"type": "table",
"value": "claims"
}
] | [
{
"entity_id": 0,
"token_idxs": [
17,
18
]
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN"
] |
3,377 | aircraft | spider:train_spider.json:4827 | List names of all pilot in descending order of age. | SELECT Name FROM pilot ORDER BY Age DESC | [
"List",
"names",
"of",
"all",
"pilot",
"in",
"descending",
"order",
"of",
"age",
"."
] | [
{
"id": 0,
"type": "table",
"value": "pilot"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,378 | movie_platform | bird:train.json:131 | How many paying subscribers gave a rating to the movie "One Flew Over the Cuckoo's Nest"? | SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'One Flew Over the Cuckoo''s Nest' AND T3.user_has_payment_method = 1 | [
"How",
"many",
"paying",
"subscribers",
"gave",
"a",
"rating",
"to",
"the",
"movie",
"\"",
"One",
"Flew",
"Over",
"the",
"Cuckoo",
"'s",
"Nest",
"\"",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "One Flew Over the Cuckoo's Nest"
},
{
"id": 6,
"type": "column",
"value": "user_has_payment_method"
},
{
"id": 0,
"type": "table",
"value": "ratings_users"
},
{
"id": 4,
"type": "column",
"value": "movie_title"
},
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
3,379 | cre_Doc_Workflow | bird:test.json:2043 | Show the number of staff roles. | SELECT count(*) FROM Ref_staff_roles | [
"Show",
"the",
"number",
"of",
"staff",
"roles",
"."
] | [
{
"id": 0,
"type": "table",
"value": "ref_staff_roles"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
3,380 | disney | bird:train.json:4643 | Give the name of the director of the movie in which Verna Felton was the voice actor for its character "Aunt Sarah". | SELECT T1.director FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T2.movie = T1.name WHERE T2.character = 'Aunt Sarah' AND T2.`voice-actor` = 'Verna Felton' | [
"Give",
"the",
"name",
"of",
"the",
"director",
"of",
"the",
"movie",
"in",
"which",
"Verna",
"Felton",
"was",
"the",
"voice",
"actor",
"for",
"its",
"character",
"\"",
"Aunt",
"Sarah",
"\"",
"."
] | [
{
"id": 2,
"type": "table",
"value": "voice-actors"
},
{
"id": 8,
"type": "value",
"value": "Verna Felton"
},
{
"id": 7,
"type": "column",
"value": "voice-actor"
},
{
"id": 6,
"type": "value",
"value": "Aunt Sarah"
},
{
"id": 5,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
3,381 | menu | bird:train.json:5524 | List the top five dishes, by descending order, in terms of highest price. | SELECT name FROM Dish ORDER BY highest_price DESC LIMIT 5 | [
"List",
"the",
"top",
"five",
"dishes",
",",
"by",
"descending",
"order",
",",
"in",
"terms",
"of",
"highest",
"price",
"."
] | [
{
"id": 2,
"type": "column",
"value": "highest_price"
},
{
"id": 0,
"type": "table",
"value": "dish"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
13,
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,382 | public_review_platform | bird:train.json:3817 | How many businesses in the fashion industry are rated 5 stars? | SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.stars = 5 AND T3.category_name LIKE 'Fashion' | [
"How",
"many",
"businesses",
"in",
"the",
"fashion",
"industry",
"are",
"rated",
"5",
"stars",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "business_categories"
},
{
"id": 7,
"type": "column",
"value": "category_name"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 4,
"type": "column",
"value": "category_id"
},
{
"id": 0,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
10
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
3,383 | store_product | spider:train_spider.json:4906 | Find the name all districts with city area greater than 10 or population larger than 100000 | SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000 | [
"Find",
"the",
"name",
"all",
"districts",
"with",
"city",
"area",
"greater",
"than",
"10",
"or",
"population",
"larger",
"than",
"100000"
] | [
{
"id": 4,
"type": "column",
"value": "city_population"
},
{
"id": 1,
"type": "column",
"value": "district_name"
},
{
"id": 2,
"type": "column",
"value": "city_area"
},
{
"id": 0,
"type": "table",
"value": "district"
},
{
"id": 5,
"type": "valu... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE"
] |
3,384 | codebase_community | bird:dev.json:689 | Identify the display name and location of the user, who was the last to edit the post with ID 183. | SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Id = 183 ORDER BY T1.LastEditDate DESC LIMIT 1 | [
"Identify",
"the",
"display",
"name",
"and",
"location",
"of",
"the",
"user",
",",
"who",
"was",
"the",
"last",
"to",
"edit",
"the",
"post",
"with",
"ID",
"183",
"."
] | [
{
"id": 6,
"type": "column",
"value": "lasteditdate"
},
{
"id": 0,
"type": "column",
"value": "displayname"
},
{
"id": 7,
"type": "column",
"value": "owneruserid"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
17
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
19
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
3,385 | flight_4 | spider:train_spider.json:6823 | How many different cities do have some airport in the country of Greenland? | SELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland' | [
"How",
"many",
"different",
"cities",
"do",
"have",
"some",
"airport",
"in",
"the",
"country",
"of",
"Greenland",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Greenland"
},
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "city"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,386 | tracking_share_transactions | spider:train_spider.json:5866 | Show the average transaction amount for different transaction types. | SELECT transaction_type_code , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code | [
"Show",
"the",
"average",
"transaction",
"amount",
"for",
"different",
"transaction",
"types",
"."
] | [
{
"id": 1,
"type": "column",
"value": "transaction_type_code"
},
{
"id": 2,
"type": "column",
"value": "amount_of_transaction"
},
{
"id": 0,
"type": "table",
"value": "transactions"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
3,387 | legislator | bird:train.json:4826 | Provide the facebook ID of the facebook account named "RepWilson". | SELECT facebook_id FROM `social-media` WHERE facebook = 'RepWilson' | [
"Provide",
"the",
"facebook",
"ID",
"of",
"the",
"facebook",
"account",
"named",
"\"",
"RepWilson",
"\"",
"."
] | [
{
"id": 0,
"type": "table",
"value": "social-media"
},
{
"id": 1,
"type": "column",
"value": "facebook_id"
},
{
"id": 3,
"type": "value",
"value": "RepWilson"
},
{
"id": 2,
"type": "column",
"value": "facebook"
}
] | [
{
"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,
... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
3,389 | food_inspection_2 | bird:train.json:6174 | How many inspections were done in January 2011? | SELECT COUNT(inspection_id) FROM inspection WHERE strftime('%Y-%m', inspection_date) = '2011-01' | [
"How",
"many",
"inspections",
"were",
"done",
"in",
"January",
"2011",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "inspection_date"
},
{
"id": 2,
"type": "column",
"value": "inspection_id"
},
{
"id": 0,
"type": "table",
"value": "inspection"
},
{
"id": 1,
"type": "value",
"value": "2011-01"
},
{
"id": 3,
"type": "value... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,390 | menu | bird:train.json:5528 | How many dishes appear in the right upper corner of the menu page? | SELECT COUNT(*) FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T1.dish_id = T2.id WHERE T1.xpos > 0.75 AND T1.ypos < 0.25 | [
"How",
"many",
"dishes",
"appear",
"in",
"the",
"right",
"upper",
"corner",
"of",
"the",
"menu",
"page",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "menuitem"
},
{
"id": 2,
"type": "column",
"value": "dish_id"
},
{
"id": 1,
"type": "table",
"value": "dish"
},
{
"id": 4,
"type": "column",
"value": "xpos"
},
{
"id": 5,
"type": "value",
"value": "0.75"... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
3,391 | california_schools | bird:dev.json:30 | Which cities have the top 5 lowest enrollment number for students in grades 1 through 12? | SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode GROUP BY T2.City ORDER BY SUM(T1.`Enrollment (K-12)`) ASC LIMIT 5 | [
"Which",
"cities",
"have",
"the",
"top",
"5",
"lowest",
"enrollment",
"number",
"for",
"students",
"in",
"grades",
"1",
"through",
"12",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "Enrollment (K-12)"
},
{
"id": 2,
"type": "table",
"value": "schools"
},
{
"id": 3,
"type": "column",
"value": "cdscode"
},
{
"id": 0,
"type": "column",
"value": "city"
},
{
"id": 1,
"type": "table",
"v... | [
{
"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": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,392 | aan_1 | bird:test.json:1020 | Which venues and years did Columbia University have papers ? | select distinct t1.venue , t1.year from paper as t1 join author_list as t2 on t1.paper_id = t2.paper_id join affiliation as t3 on t2.affiliation_id = t3.affiliation_id where t3.name = "columbia university" | [
"Which",
"venues",
"and",
"years",
"did",
"Columbia",
"University",
"have",
"papers",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "columbia university"
},
{
"id": 7,
"type": "column",
"value": "affiliation_id"
},
{
"id": 2,
"type": "table",
"value": "affiliation"
},
{
"id": 6,
"type": "table",
"value": "author_list"
},
{
"id": 8,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5,
6
]
},
{
"entity_id":... | [
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O"
] |
3,393 | soccer_2016 | bird:train.json:1979 | Who was the captain-keeper of Rising Pune Supergiants? | SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id WHERE T3.Team_Name = 'Rising Pune Supergiants' AND T4.Role_Desc = 'CaptainKeeper' GROUP BY T1.Player_Name | [
"Who",
"was",
"the",
"captain",
"-",
"keeper",
"of",
"Rising",
"Pune",
"Supergiants",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Rising Pune Supergiants"
},
{
"id": 7,
"type": "value",
"value": "CaptainKeeper"
},
{
"id": 9,
"type": "table",
"value": "player_match"
},
{
"id": 0,
"type": "column",
"value": "player_name"
},
{
"id": 4,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7,
8,
... | [
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
3,394 | chicago_crime | bird:train.json:8586 | Which district is the community area Lincoln Square grouped into? | SELECT side FROM Community_Area WHERE community_area_name = 'Lincoln Square' | [
"Which",
"district",
"is",
"the",
"community",
"area",
"Lincoln",
"Square",
"grouped",
"into",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "community_area_name"
},
{
"id": 0,
"type": "table",
"value": "community_area"
},
{
"id": 3,
"type": "value",
"value": "Lincoln Square"
},
{
"id": 1,
"type": "column",
"value": "side"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
3,395 | theme_gallery | spider:train_spider.json:1660 | Return the average and minimum ages across artists from the United States. | SELECT avg(age) , min(age) FROM artist WHERE country = 'United States' | [
"Return",
"the",
"average",
"and",
"minimum",
"ages",
"across",
"artists",
"from",
"the",
"United",
"States",
"."
] | [
{
"id": 2,
"type": "value",
"value": "United States"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 0,
"type": "table",
"value": "artist"
},
{
"id": 3,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
3,396 | products_for_hire | spider:train_spider.json:1966 | What are the start date and end date of the booking that has booked the product named 'Book collection A'? | SELECT T3.booking_start_date , T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A' | [
"What",
"are",
"the",
"start",
"date",
"and",
"end",
"date",
"of",
"the",
"booking",
"that",
"has",
"booked",
"the",
"product",
"named",
"'",
"Book",
"collection",
"A",
"'",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "booking_start_date"
},
{
"id": 4,
"type": "value",
"value": "Book collection A"
},
{
"id": 5,
"type": "table",
"value": "products_for_hire"
},
{
"id": 1,
"type": "column",
"value": "booking_end_date"
},
{
"id"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
19,
20
]
},
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
3,397 | cookbook | bird:train.json:8918 | What is the percentage calories protein of Raspberry Chiffon Pie? | SELECT pcnt_cal_prot FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie' | [
"What",
"is",
"the",
"percentage",
"calories",
"protein",
"of",
"Raspberry",
"Chiffon",
"Pie",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Raspberry Chiffon Pie"
},
{
"id": 0,
"type": "column",
"value": "pcnt_cal_prot"
},
{
"id": 2,
"type": "table",
"value": "nutrition"
},
{
"id": 5,
"type": "column",
"value": "recipe_id"
},
{
"id": 1,
"type":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7,
8,
9
]
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
3,398 | toxicology | bird:dev.json:320 | What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2? | SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_1' AND T2.atom_id2 = 'TR000_2' | [
"What",
"is",
"the",
"type",
"of",
"the",
"bond",
"which",
"is",
"presenting",
"the",
"connection",
"between",
"two",
"atoms",
"TR000_1",
"and",
"TR000_2",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "bond_type"
},
{
"id": 2,
"type": "table",
"value": "connected"
},
{
"id": 6,
"type": "column",
"value": "atom_id2"
},
{
"id": 3,
"type": "column",
"value": "bond_id"
},
{
"id": 4,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
3,399 | swimming | spider:train_spider.json:5606 | Find the name of the stadium that has the maximum capacity. | SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"stadium",
"that",
"has",
"the",
"maximum",
"capacity",
"."
] | [
{
"id": 2,
"type": "column",
"value": "capacity"
},
{
"id": 0,
"type": "table",
"value": "stadium"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,400 | image_and_language | bird:train.json:7584 | List all the object classes of the images that have a (5,5) coordinate. | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 5 AND T1.Y = 5 | [
"List",
"all",
"the",
"object",
"classes",
"of",
"the",
"images",
"that",
"have",
"a",
"(",
"5,5",
")",
"coordinate",
"."
] | [
{
"id": 3,
"type": "column",
"value": "obj_class_id"
},
{
"id": 2,
"type": "table",
"value": "obj_classes"
},
{
"id": 0,
"type": "column",
"value": "obj_class"
},
{
"id": 1,
"type": "table",
"value": "img_obj"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,401 | phone_market | spider:train_spider.json:1985 | Show the most frequently used carrier of the phones. | SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1 | [
"Show",
"the",
"most",
"frequently",
"used",
"carrier",
"of",
"the",
"phones",
"."
] | [
{
"id": 1,
"type": "column",
"value": "carrier"
},
{
"id": 0,
"type": "table",
"value": "phone"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,402 | dorm_1 | spider:train_spider.json:5718 | List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order. | SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name | [
"List",
"name",
"of",
"all",
"amenities",
"which",
"Anonymous",
"Donor",
"Hall",
"has",
",",
"and",
"sort",
"the",
"results",
"in",
"alphabetic",
"order",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Anonymous Donor Hall"
},
{
"id": 0,
"type": "column",
"value": "amenity_name"
},
{
"id": 4,
"type": "table",
"value": "dorm_amenity"
},
{
"id": 5,
"type": "table",
"value": "has_amenity"
},
{
"id": 2,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": [
6,
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-TABLE",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,403 | csu_1 | spider:train_spider.json:2339 | What is the campus fee for San Francisco State University in 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",
"for",
"San",
"Francisco",
"State",
"University",
"in",
"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,
"typ... | [
{
"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": ... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,404 | authors | bird:train.json:3597 | What is the journal's short and full names that feature papers on the "Materials" topic? | SELECT T2.ShortName, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Keyword LIKE '%Materials%' | [
"What",
"is",
"the",
"journal",
"'s",
"short",
"and",
"full",
"names",
"that",
"feature",
"papers",
"on",
"the",
"\"",
"Materials",
"\"",
"topic",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "%Materials%"
},
{
"id": 0,
"type": "column",
"value": "shortname"
},
{
"id": 6,
"type": "column",
"value": "journalid"
},
{
"id": 1,
"type": "column",
"value": "fullname"
},
{
"id": 3,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
3,405 | device | spider:train_spider.json:5077 | What are the different software platforms for devices, and how many devices have each? | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform | [
"What",
"are",
"the",
"different",
"software",
"platforms",
"for",
"devices",
",",
"and",
"how",
"many",
"devices",
"have",
"each",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "software_platform"
},
{
"id": 0,
"type": "table",
"value": "device"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
3,406 | activity_1 | spider:train_spider.json:6722 | What are the rank, first name, and last name of the faculty members? | SELECT rank , Fname , Lname FROM Faculty | [
"What",
"are",
"the",
"rank",
",",
"first",
"name",
",",
"and",
"last",
"name",
"of",
"the",
"faculty",
"members",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "faculty"
},
{
"id": 2,
"type": "column",
"value": "fname"
},
{
"id": 3,
"type": "column",
"value": "lname"
},
{
"id": 1,
"type": "column",
"value": "rank"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
3,407 | world_development_indicators | bird:train.json:2201 | What are the subjects of series that have a restricted type of license? | SELECT DISTINCT Topic FROM Series WHERE LicenseType = 'Restricted' | [
"What",
"are",
"the",
"subjects",
"of",
"series",
"that",
"have",
"a",
"restricted",
"type",
"of",
"license",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "licensetype"
},
{
"id": 3,
"type": "value",
"value": "Restricted"
},
{
"id": 0,
"type": "table",
"value": "series"
},
{
"id": 1,
"type": "column",
"value": "topic"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
3,408 | university | bird:train.json:8034 | Name the university that had the most students in 2011. | SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.num_students DESC LIMIT 1 | [
"Name",
"the",
"university",
"that",
"had",
"the",
"most",
"students",
"in",
"2011",
"."
] | [
{
"id": 0,
"type": "column",
"value": "university_name"
},
{
"id": 1,
"type": "table",
"value": "university_year"
},
{
"id": 6,
"type": "column",
"value": "university_id"
},
{
"id": 5,
"type": "column",
"value": "num_students"
},
{
"id": 2,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
3,409 | car_retails | bird:train.json:1579 | List out 3 customer numbers who have highest amount payment | SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3 | [
"List",
"out",
"3",
"customer",
"numbers",
"who",
"have",
"highest",
"amount",
"payment"
] | [
{
"id": 1,
"type": "column",
"value": "customernumber"
},
{
"id": 0,
"type": "table",
"value": "payments"
},
{
"id": 2,
"type": "column",
"value": "amount"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE"
] |
3,410 | student_loan | bird:train.json:4398 | Which students that are in the marines have been absent for 6 months? | SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'marines' AND T1.`month` = 6 | [
"Which",
"students",
"that",
"are",
"in",
"the",
"marines",
"have",
"been",
"absent",
"for",
"6",
"months",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "longest_absense_from_school"
},
{
"id": 4,
"type": "value",
"value": "marines"
},
{
"id": 2,
"type": "table",
"value": "enlist"
},
{
"id": 3,
"type": "column",
"value": "organ"
},
{
"id": 5,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": [
12
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
3,411 | university_rank | bird:test.json:1799 | Find the name and Citation point of the universities whose reputation points are top 3 and above. | SELECT T1.University_Name , T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3 | [
"Find",
"the",
"name",
"and",
"Citation",
"point",
"of",
"the",
"universities",
"whose",
"reputation",
"points",
"are",
"top",
"3",
"and",
"above",
"."
] | [
{
"id": 4,
"type": "column",
"value": "reputation_point"
},
{
"id": 0,
"type": "column",
"value": "university_name"
},
{
"id": 3,
"type": "table",
"value": "overall_ranking"
},
{
"id": 1,
"type": "column",
"value": "citation_point"
},
{
"id": 5,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11
]
},
{
"... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
3,412 | debate | spider:train_spider.json:1499 | Show the party that has the most people. | SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1 | [
"Show",
"the",
"party",
"that",
"has",
"the",
"most",
"people",
"."
] | [
{
"id": 0,
"type": "table",
"value": "people"
},
{
"id": 1,
"type": "column",
"value": "party"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,413 | movielens | bird:train.json:2326 | Which Crime film got the lowest average rating? | SELECT T2.movieid FROM u2base AS T2 INNER JOIN movies2directors AS T3 ON T2.movieid = T3.movieid WHERE T3.genre = 'Crime' GROUP BY T2.movieid ORDER BY AVG(T2.rating) LIMIT 1 | [
"Which",
"Crime",
"film",
"got",
"the",
"lowest",
"average",
"rating",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "movies2directors"
},
{
"id": 0,
"type": "column",
"value": "movieid"
},
{
"id": 1,
"type": "table",
"value": "u2base"
},
{
"id": 5,
"type": "column",
"value": "rating"
},
{
"id": 3,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1
]
},
{
"entity_id": 5,
"token_idxs": [
7
... | [
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,414 | dorm_1 | spider:train_spider.json:5708 | Find the name of the dorm with the largest capacity. | SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"dorm",
"with",
"the",
"largest",
"capacity",
"."
] | [
{
"id": 2,
"type": "column",
"value": "student_capacity"
},
{
"id": 1,
"type": "column",
"value": "dorm_name"
},
{
"id": 0,
"type": "table",
"value": "dorm"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
3,415 | customer_complaints | spider:train_spider.json:5802 | What is the last name of the staff who has handled the first ever complaint? | SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1 | [
"What",
"is",
"the",
"last",
"name",
"of",
"the",
"staff",
"who",
"has",
"handled",
"the",
"first",
"ever",
"complaint",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "date_complaint_raised"
},
{
"id": 2,
"type": "table",
"value": "complaints"
},
{
"id": 0,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "column",
"value": "staff_id"
},
{
"id": 1,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,416 | inn_1 | spider:train_spider.json:2582 | Which room has the highest rate? List the room's full name, rate, check in and check out date. | SELECT T2.roomName , T1.Rate , T1.CheckIn , T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1; | [
"Which",
"room",
"has",
"the",
"highest",
"rate",
"?",
"List",
"the",
"room",
"'s",
"full",
"name",
",",
"rate",
",",
"check",
"in",
"and",
"check",
"out",
"date",
"."
] | [
{
"id": 5,
"type": "table",
"value": "reservations"
},
{
"id": 1,
"type": "column",
"value": "roomname"
},
{
"id": 4,
"type": "column",
"value": "checkout"
},
{
"id": 3,
"type": "column",
"value": "checkin"
},
{
"id": 7,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
16,
17
]
},
{
"entity_id": 4,
"token_idxs": [
19,
20
]... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
3,417 | tracking_grants_for_research | spider:train_spider.json:4379 | What is the last date that a staff member left a project? | SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1 | [
"What",
"is",
"the",
"last",
"date",
"that",
"a",
"staff",
"member",
"left",
"a",
"project",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "project_staff"
},
{
"id": 1,
"type": "column",
"value": "date_to"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
3,418 | aircraft | spider:train_spider.json:4802 | What is the average number of international passengers for an airport? | SELECT avg(International_Passengers) FROM airport | [
"What",
"is",
"the",
"average",
"number",
"of",
"international",
"passengers",
"for",
"an",
"airport",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "international_passengers"
},
{
"id": 0,
"type": "table",
"value": "airport"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
3,419 | book_2 | spider:train_spider.json:226 | Show different publishers together with the number of publications they have. | SELECT Publisher , COUNT(*) FROM publication GROUP BY Publisher | [
"Show",
"different",
"publishers",
"together",
"with",
"the",
"number",
"of",
"publications",
"they",
"have",
"."
] | [
{
"id": 0,
"type": "table",
"value": "publication"
},
{
"id": 1,
"type": "column",
"value": "publisher"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
3,420 | movie_3 | bird:train.json:9143 | Give the number of inactive customers. | SELECT COUNT(customer_id) FROM customer WHERE active = 0 | [
"Give",
"the",
"number",
"of",
"inactive",
"customers",
"."
] | [
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 1,
"type": "column",
"value": "active"
},
{
"id": 2,
"type": "value",
"value": "0"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.