question_id int64 0 16.1k | db_id stringclasses 259
values | dber_id stringlengths 15 29 | question stringlengths 16 325 | SQL stringlengths 18 1.25k | tokens listlengths 4 62 | entities listlengths 0 21 | entity_to_token listlengths 20 20 | dber_tags listlengths 4 62 |
|---|---|---|---|---|---|---|---|---|
13,579 | olympics | bird:train.json:5075 | Provide the names of competitors who received a gold medal. | SELECT DISTINCT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.medal_name = 'Gold' | [
"Provide",
"the",
"names",
"of",
"competitors",
"who",
"received",
"a",
"gold",
"medal",
"."
] | [
{
"id": 4,
"type": "table",
"value": "competitor_event"
},
{
"id": 8,
"type": "table",
"value": "games_competitor"
},
{
"id": 9,
"type": "column",
"value": "competitor_id"
},
{
"id": 2,
"type": "column",
"value": "medal_name"
},
{
"id": 0,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"B-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
13,580 | toxicology | bird:dev.json:213 | What type of bond is there between the atoms TR004_8 and TR004_20? | SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR004_8' AND T2.atom_id2 = 'TR004_20' OR T2.atom_id2 = 'TR004_8' AND T2.atom_id = 'TR004_20' | [
"What",
"type",
"of",
"bond",
"is",
"there",
"between",
"the",
"atoms",
"TR004_8",
"and",
"TR004_20",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "bond_type"
},
{
"id": 2,
"type": "table",
"value": "connected"
},
{
"id": 6,
"type": "column",
"value": "atom_id2"
},
{
"id": 7,
"type": "value",
"value": "TR004_20"
},
{
"id": 3,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
13,581 | book_1 | bird:test.json:570 | What are the titles of books with the highest purchase price across all books ? | select title from book order by purchaseprice desc limit 1 | [
"What",
"are",
"the",
"titles",
"of",
"books",
"with",
"the",
"highest",
"purchase",
"price",
"across",
"all",
"books",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "purchaseprice"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value": "book"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
13,582 | public_review_platform | bird:train.json:4088 | How many likes did short comment left by users who joined in 2010 get? | SELECT SUM(T2.likes) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2010 | [
"How",
"many",
"likes",
"did",
"short",
"comment",
"left",
"by",
"users",
"who",
"joined",
"in",
"2010",
"get",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "user_yelping_since_year"
},
{
"id": 5,
"type": "column",
"value": "user_id"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 4,
"type": "column",
"value": "likes"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,583 | aan_1 | bird:test.json:1039 | Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers. | SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id = T2.affiliation_id WHERE T1.address LIKE "%China%" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"affiliation",
"whose",
"address",
"contains",
"'",
"China",
"'",
"and",
"publishes",
"the",
"greatest",
"number",
"of",
"papers",
"."
] | [
{
"id": 0,
"type": "column",
"value": "affiliation_id"
},
{
"id": 2,
"type": "table",
"value": "affiliation"
},
{
"id": 3,
"type": "table",
"value": "author_list"
},
{
"id": 4,
"type": "column",
"value": "address"
},
{
"id": 5,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,584 | hospital_1 | spider:train_spider.json:3987 | Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names. | SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.d... | [
"Which",
"physicians",
"are",
"affiliated",
"with",
"both",
"Surgery",
"and",
"Psychiatry",
"departments",
"?",
"Tell",
"me",
"their",
"names",
"."
] | [
{
"id": 5,
"type": "table",
"value": "affiliated_with"
},
{
"id": 7,
"type": "column",
"value": "departmentid"
},
{
"id": 1,
"type": "table",
"value": "department"
},
{
"id": 3,
"type": "value",
"value": "Psychiatry"
},
{
"id": 6,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,585 | simpson_episodes | bird:train.json:4249 | How many crews were born in the USA? | SELECT COUNT(name) FROM Person WHERE birth_country = 'USA'; | [
"How",
"many",
"crews",
"were",
"born",
"in",
"the",
"USA",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "birth_country"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 3,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "value",
"value": "USA"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
13,586 | tracking_share_transactions | spider:train_spider.json:5845 | Show all investor details. | SELECT Investor_details FROM INVESTORS | [
"Show",
"all",
"investor",
"details",
"."
] | [
{
"id": 1,
"type": "column",
"value": "investor_details"
},
{
"id": 0,
"type": "table",
"value": "investors"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
13,587 | real_estate_rentals | bird:test.json:1448 | How many photos does each property have? | SELECT count(*) , property_id FROM Property_Photos GROUP BY property_id; | [
"How",
"many",
"photos",
"does",
"each",
"property",
"have",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "property_photos"
},
{
"id": 1,
"type": "column",
"value": "property_id"
}
] | [
{
"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"
] |
13,589 | institution_sports | bird:test.json:1667 | What are different types of affiliations of institutions and the corresponding number of institutions? | SELECT Affiliation , COUNT(*) FROM institution GROUP BY Affiliation | [
"What",
"are",
"different",
"types",
"of",
"affiliations",
"of",
"institutions",
"and",
"the",
"corresponding",
"number",
"of",
"institutions",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "institution"
},
{
"id": 1,
"type": "column",
"value": "affiliation"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"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",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,590 | climbing | spider:train_spider.json:1147 | Which range contains the most mountains? | SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1 | [
"Which",
"range",
"contains",
"the",
"most",
"mountains",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "mountain"
},
{
"id": 1,
"type": "column",
"value": "range"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,591 | food_inspection_2 | bird:train.json:6142 | How many establishments that are doing business as Homemade Pizza have a risk level of 2? | SELECT COUNT(license_no) FROM establishment WHERE risk_level = 2 AND dba_name = 'HOMEMADE PIZZA' | [
"How",
"many",
"establishments",
"that",
"are",
"doing",
"business",
"as",
"Homemade",
"Pizza",
"have",
"a",
"risk",
"level",
"of",
"2",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "HOMEMADE PIZZA"
},
{
"id": 0,
"type": "table",
"value": "establishment"
},
{
"id": 1,
"type": "column",
"value": "license_no"
},
{
"id": 2,
"type": "column",
"value": "risk_level"
},
{
"id": 4,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,592 | shipping | bird:train.json:5661 | Calculate the average number of shipments that Zachery Hicks shipped in year 2017. | SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.ship_id ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' | [
"Calculate",
"the",
"average",
"number",
"of",
"shipments",
"that",
"Zachery",
"Hicks",
"shipped",
"in",
"year",
"2017",
"."
] | [
{
"id": 9,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "column",
"value": "driver_id"
},
{
"id": 5,
"type": "column",
"value": "ship_date"
},
{
"id": 11,
"type": "column",
"value": "last_name"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
13,593 | loan_1 | spider:train_spider.json:3008 | How many customers are there? | SELECT sum(no_of_customers) FROM bank | [
"How",
"many",
"customers",
"are",
"there",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "no_of_customers"
},
{
"id": 0,
"type": "table",
"value": "bank"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
13,594 | student_1 | spider:train_spider.json:4075 | Find the number of teachers who teach the student called MADLOCK RAY. | SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY" | [
"Find",
"the",
"number",
"of",
"teachers",
"who",
"teach",
"the",
"student",
"called",
"MADLOCK",
"RAY",
"."
] | [
{
"id": 2,
"type": "column",
"value": "classroom"
},
{
"id": 3,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "table",
"value": "teachers"
},
{
"id": 5,
"type": "column",
"value": "lastname"
},
{
"id": 4,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
13,595 | bike_share_1 | bird:train.json:9031 | Find the average ride time of the bikes that started at Steuart at Market station and ended at Embarcadero at Sansome station in July 2014. | SELECT AVG(duration) FROM trip WHERE start_date = '7/1/2014%' AND end_date = '7/31/2014%' AND start_station_name = 'Steuart at Market' AND end_station_name = 'Embarcadero at Sansome' | [
"Find",
"the",
"average",
"ride",
"time",
"of",
"the",
"bikes",
"that",
"started",
"at",
"Steuart",
"at",
"Market",
"station",
"and",
"ended",
"at",
"Embarcadero",
"at",
"Sansome",
"station",
"in",
"July",
"2014",
"."
] | [
{
"id": 9,
"type": "value",
"value": "Embarcadero at Sansome"
},
{
"id": 6,
"type": "column",
"value": "start_station_name"
},
{
"id": 7,
"type": "value",
"value": "Steuart at Market"
},
{
"id": 8,
"type": "column",
"value": "end_station_name"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
24
]
},
{
"entity_id": 4,
"token_idxs": [
16,
17
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,596 | regional_sales | bird:train.json:2659 | Find the average number of ornaments sold each month in 2018. | SELECT CAST(SUM(T2.`Order Quantity`) AS REAL) / 12 FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Ornaments' AND T2.OrderDate LIKE '%/%/18' | [
"Find",
"the",
"average",
"number",
"of",
"ornaments",
"sold",
"each",
"month",
"in",
"2018",
"."
] | [
{
"id": 9,
"type": "column",
"value": "Order Quantity"
},
{
"id": 1,
"type": "table",
"value": "Sales Orders"
},
{
"id": 5,
"type": "column",
"value": "Product Name"
},
{
"id": 3,
"type": "column",
"value": "_productid"
},
{
"id": 4,
"type": "c... | [
{
"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",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,597 | movie_platform | bird:train.json:141 | Name all lists created by a user who was a subcriber when created the list. | SELECT DISTINCT T2.list_id FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_subscriber = 1 | [
"Name",
"all",
"lists",
"created",
"by",
"a",
"user",
"who",
"was",
"a",
"subcriber",
"when",
"created",
"the",
"list",
"."
] | [
{
"id": 3,
"type": "column",
"value": "user_subscriber"
},
{
"id": 1,
"type": "table",
"value": "lists_users"
},
{
"id": 0,
"type": "column",
"value": "list_id"
},
{
"id": 2,
"type": "table",
"value": "lists"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,598 | regional_sales | bird:train.json:2597 | Calculate the percentage of order via in-store channel of customer "Medline". | SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1._CustomerID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Medline ' | [
"Calculate",
"the",
"percentage",
"of",
"order",
"via",
"in",
"-",
"store",
"channel",
"of",
"customer",
"\"",
"Medline",
"\"",
"."
] | [
{
"id": 2,
"type": "column",
"value": "Customer Names"
},
{
"id": 9,
"type": "column",
"value": "Sales Channel"
},
{
"id": 0,
"type": "table",
"value": "Sales Orders"
},
{
"id": 5,
"type": "column",
"value": "_customerid"
},
{
"id": 4,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"O"
] |
13,599 | retails | bird:train.json:6701 | Which country has the most number of suppliers whose account is in debt? | SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T2.n_name ) AS T ORDER BY T.num LIMIT 1 | [
"Which",
"country",
"has",
"the",
"most",
"number",
"of",
"suppliers",
"whose",
"account",
"is",
"in",
"debt",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "s_nationkey"
},
{
"id": 7,
"type": "column",
"value": "n_nationkey"
},
{
"id": 4,
"type": "column",
"value": "s_acctbal"
},
{
"id": 2,
"type": "table",
"value": "supplier"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,600 | club_1 | spider:train_spider.json:4261 | Return the last name for the members of the club named "Hopkins Student Enterprises". | SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" | [
"Return",
"the",
"last",
"name",
"for",
"the",
"members",
"of",
"the",
"club",
"named",
"\"",
"Hopkins",
"Student",
"Enterprises",
"\"",
"."
] | [
{
"id": 3,
"type": "column",
"value": "Hopkins Student Enterprises"
},
{
"id": 5,
"type": "table",
"value": "member_of_club"
},
{
"id": 2,
"type": "column",
"value": "clubname"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 7,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
12,
14
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"B-COLUMN",
"B-COLUMN",
"O",
"O"
] |
13,601 | cre_Doc_Workflow | bird:test.json:2049 | List all process ids with no document. | SELECT process_id FROM Business_processes EXCEPT SELECT process_id FROM Documents_processes | [
"List",
"all",
"process",
"ids",
"with",
"no",
"document",
"."
] | [
{
"id": 1,
"type": "table",
"value": "documents_processes"
},
{
"id": 0,
"type": "table",
"value": "business_processes"
},
{
"id": 2,
"type": "column",
"value": "process_id"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
13,602 | works_cycles | bird:train.json:7418 | How many people were there in the Engineering Department in the year 2009? | SELECT COUNT(T1.BusinessEntityID) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' AND STRFTIME('%Y', T2.EndDate) > '2009' AND STRFTIME('%Y', T2.StartDate) < '2009' | [
"How",
"many",
"people",
"were",
"there",
"in",
"the",
"Engineering",
"Department",
"in",
"the",
"year",
"2009",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "employeedepartmenthistory"
},
{
"id": 1,
"type": "column",
"value": "businessentityid"
},
{
"id": 4,
"type": "column",
"value": "departmentid"
},
{
"id": 6,
"type": "value",
"value": "Engineering"
},
{
"id": 0,... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"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": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O"
] |
13,603 | wine_1 | spider:train_spider.json:6560 | What are the names of wines, sorted in alphabetical order? | SELECT DISTINCT Name FROM WINE ORDER BY Name | [
"What",
"are",
"the",
"names",
"of",
"wines",
",",
"sorted",
"in",
"alphabetical",
"order",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "wine"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,604 | european_football_2 | bird:dev.json:1021 | What is the height of the tallest player? Indicate his name. | SELECT player_name FROM Player ORDER BY height DESC LIMIT 1 | [
"What",
"is",
"the",
"height",
"of",
"the",
"tallest",
"player",
"?",
"Indicate",
"his",
"name",
"."
] | [
{
"id": 1,
"type": "column",
"value": "player_name"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 2,
"type": "column",
"value": "height"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
13,605 | body_builder | spider:train_spider.json:1168 | List the names and origins of people who are not body builders. | SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id | [
"List",
"the",
"names",
"and",
"origins",
"of",
"people",
"who",
"are",
"not",
"body",
"builders",
"."
] | [
{
"id": 3,
"type": "table",
"value": "body_builder"
},
{
"id": 2,
"type": "column",
"value": "birth_place"
},
{
"id": 4,
"type": "column",
"value": "people_id"
},
{
"id": 0,
"type": "table",
"value": "people"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
13,606 | e_commerce | bird:test.json:106 | What are the email address, town and county of the customers who are of the least common gender? | SELECT email_address , town_city , county FROM Customers WHERE gender_code = ( SELECT gender_code FROM Customers GROUP BY gender_code ORDER BY count(*) ASC LIMIT 1 ) | [
"What",
"are",
"the",
"email",
"address",
",",
"town",
"and",
"county",
"of",
"the",
"customers",
"who",
"are",
"of",
"the",
"least",
"common",
"gender",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "email_address"
},
{
"id": 4,
"type": "column",
"value": "gender_code"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "column",
"value": "town_city"
},
{
"id": 3,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
18
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,607 | tracking_share_transactions | spider:train_spider.json:5881 | Show the ids and details of the investors who have at least two transactions with type code "SALE". | SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | [
"Show",
"the",
"ids",
"and",
"details",
"of",
"the",
"investors",
"who",
"have",
"at",
"least",
"two",
"transactions",
"with",
"type",
"code",
"\"",
"SALE",
"\"",
"."
] | [
{
"id": 4,
"type": "column",
"value": "transaction_type_code"
},
{
"id": 1,
"type": "column",
"value": "investor_details"
},
{
"id": 3,
"type": "table",
"value": "transactions"
},
{
"id": 0,
"type": "column",
"value": "investor_id"
},
{
"id": 2,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
14,
15,
16
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
13,609 | sales_in_weather | bird:train.json:8179 | How many items weren't sold in store 2 on 1/1/2012? | SELECT COUNT(item_nbr) FROM sales_in_weather WHERE store_nbr = 2 AND units = 0 AND `date` = '2012-01-01' | [
"How",
"many",
"items",
"were",
"n't",
"sold",
"in",
"store",
"2",
"on",
"1/1/2012",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "sales_in_weather"
},
{
"id": 7,
"type": "value",
"value": "2012-01-01"
},
{
"id": 2,
"type": "column",
"value": "store_nbr"
},
{
"id": 1,
"type": "column",
"value": "item_nbr"
},
{
"id": 4,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O"
] |
13,610 | store_1 | spider:train_spider.json:603 | Find the number of employees whose title is IT Staff from each city? | SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city | [
"Find",
"the",
"number",
"of",
"employees",
"whose",
"title",
"is",
"IT",
"Staff",
"from",
"each",
"city",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 3,
"type": "value",
"value": "IT Staff"
},
{
"id": 2,
"type": "column",
"value": "title"
},
{
"id": 1,
"type": "column",
"value": "city"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
13,611 | flight_company | spider:train_spider.json:6370 | What is the velocity of the pilot named 'Thompson'? | SELECT avg(velocity) FROM flight WHERE pilot = 'Thompson' | [
"What",
"is",
"the",
"velocity",
"of",
"the",
"pilot",
"named",
"'",
"Thompson",
"'",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Thompson"
},
{
"id": 3,
"type": "column",
"value": "velocity"
},
{
"id": 0,
"type": "table",
"value": "flight"
},
{
"id": 1,
"type": "column",
"value": "pilot"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,612 | financial | bird:dev.json:100 | Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov? | SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND STRFTIME('%Y', T2.birth_date) < '1950' AND T1.A2 = 'Sokolov' | [
"Among",
"the",
"account",
"opened",
",",
"how",
"many",
"female",
"customers",
"who",
"were",
"born",
"before",
"1950",
"and",
"stayed",
"in",
"Sokolov",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "district_id"
},
{
"id": 10,
"type": "column",
"value": "birth_date"
},
{
"id": 2,
"type": "column",
"value": "client_id"
},
{
"id": 0,
"type": "table",
"value": "district"
},
{
"id": 8,
"type": "value",
... | [
{
"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",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
13,613 | retail_world | bird:train.json:6370 | How much is the total purchase price, including freight, of the top 2 most expensive products? | SELECT T2.UnitPrice * T2.Quantity + T1.Freight FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID ORDER BY T2.UnitPrice * T2.Quantity + T1.Freight DESC LIMIT 2 | [
"How",
"much",
"is",
"the",
"total",
"purchase",
"price",
",",
"including",
"freight",
",",
"of",
"the",
"top",
"2",
"most",
"expensive",
"products",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "Order Details"
},
{
"id": 4,
"type": "column",
"value": "unitprice"
},
{
"id": 5,
"type": "column",
"value": "quantity"
},
{
"id": 2,
"type": "column",
"value": "freight"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,614 | disney | bird:train.json:4628 | Please list the release dates of all the movies in which Alan Tudyk is a voice actor. | SELECT T2.release_date FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T1.`voice-actor` = 'Alan Tudyk' | [
"Please",
"list",
"the",
"release",
"dates",
"of",
"all",
"the",
"movies",
"in",
"which",
"Alan",
"Tudyk",
"is",
"a",
"voice",
"actor",
"."
] | [
{
"id": 0,
"type": "column",
"value": "release_date"
},
{
"id": 1,
"type": "table",
"value": "voice-actors"
},
{
"id": 3,
"type": "column",
"value": "voice-actor"
},
{
"id": 6,
"type": "column",
"value": "movie_title"
},
{
"id": 2,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
15,
16
]
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
}... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,615 | hr_1 | spider:train_spider.json:3516 | What are the department ids, full names, and salaries for employees who make the most in their departments? | SELECT first_name , last_name , salary , department_id , MAX(salary) FROM employees GROUP BY department_id | [
"What",
"are",
"the",
"department",
"ids",
",",
"full",
"names",
",",
"and",
"salaries",
"for",
"employees",
"who",
"make",
"the",
"most",
"in",
"their",
"departments",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "department_id"
},
{
"id": 2,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 3,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,616 | movies_4 | bird:train.json:441 | Provide the title of the movie that is most-liked by a large number of people. | SELECT title FROM movie ORDER BY popularity DESC LIMIT 1 | [
"Provide",
"the",
"title",
"of",
"the",
"movie",
"that",
"is",
"most",
"-",
"liked",
"by",
"a",
"large",
"number",
"of",
"people",
"."
] | [
{
"id": 2,
"type": "column",
"value": "popularity"
},
{
"id": 0,
"type": "table",
"value": "movie"
},
{
"id": 1,
"type": "column",
"value": "title"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,617 | card_games | bird:dev.json:366 | What is the rule of playing card "Benalish Knight"? | SELECT T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Benalish Knight' | [
"What",
"is",
"the",
"rule",
"of",
"playing",
"card",
"\"",
"Benalish",
"Knight",
"\"",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Benalish Knight"
},
{
"id": 2,
"type": "table",
"value": "legalities"
},
{
"id": 0,
"type": "column",
"value": "format"
},
{
"id": 1,
"type": "table",
"value": "cards"
},
{
"id": 3,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8,
9
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
13,618 | bike_share_1 | bird:train.json:9046 | Which year had the most number of trips that started at stations in San Francisco? | SELECT SUBSTR(CAST(T1.start_date AS TEXT), INSTR(T1.start_date, ' '), -4) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Francisco' GROUP BY T1.start_station_name ORDER BY COUNT(T1.id) DESC LIMIT 1 | [
"Which",
"year",
"had",
"the",
"most",
"number",
"of",
"trips",
"that",
"started",
"at",
"stations",
"in",
"San",
"Francisco",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "start_station_name"
},
{
"id": 4,
"type": "value",
"value": "San Francisco"
},
{
"id": 8,
"type": "column",
"value": "start_date"
},
{
"id": 2,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13,
14
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
13,619 | public_review_platform | bird:train.json:3830 | How many "cool" compliments did user number 33 receive? | SELECT COUNT(T2.compliment_type) FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.user_id = 33 AND T2.compliment_type LIKE 'cool' | [
"How",
"many",
"\"",
"cool",
"\"",
"compliments",
"did",
"user",
"number",
"33",
"receive",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "users_compliments"
},
{
"id": 2,
"type": "column",
"value": "compliment_type"
},
{
"id": 3,
"type": "column",
"value": "compliment_id"
},
{
"id": 1,
"type": "table",
"value": "compliments"
},
{
"id": 4,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
13,620 | art_1 | bird:test.json:1209 | What are the sculptures called and where are they located? | SELECT title , LOCATION FROM sculptures | [
"What",
"are",
"the",
"sculptures",
"called",
"and",
"where",
"are",
"they",
"located",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "sculptures"
},
{
"id": 2,
"type": "column",
"value": "location"
},
{
"id": 1,
"type": "column",
"value": "title"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,621 | retail_world | bird:train.json:6344 | Which category does "tofu" belong to? | SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Tofu' | [
"Which",
"category",
"does",
"\"",
"tofu",
"\"",
"belong",
"to",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "categoryname"
},
{
"id": 3,
"type": "column",
"value": "productname"
},
{
"id": 2,
"type": "table",
"value": "categories"
},
{
"id": 5,
"type": "column",
"value": "categoryid"
},
{
"id": 1,
"type": "table"... | [
{
"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": [
4
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
13,622 | government_shift | bird:test.json:393 | Find details of all the services that have been marked as `` unsatisfied '' in customers and services details . | select distinct t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id = t2.service_id where t2.customers_and_services_details = "unsatisfied" | [
"Find",
"details",
"of",
"all",
"the",
"services",
"that",
"have",
"been",
"marked",
"as",
"`",
"`",
"unsatisfied",
"''",
"in",
"customers",
"and",
"services",
"details",
"."
] | [
{
"id": 3,
"type": "column",
"value": "customers_and_services_details"
},
{
"id": 2,
"type": "table",
"value": "customers_and_services"
},
{
"id": 0,
"type": "column",
"value": "service_details"
},
{
"id": 4,
"type": "column",
"value": "unsatisfied"
},
... | [
{
"entity_id": 0,
"token_idxs": [
18,
19
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
16,
17
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,623 | soccer_2016 | bird:train.json:1958 | How many matches did Rajasthan Royals play in Season 8? | SELECT SUM(CASE WHEN T1.Season_Id = 8 THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Team_1 = T2.Team_Id OR T1.Team_2 = T2.Team_Id WHERE T2.Team_Name = 'Rajasthan Royals' | [
"How",
"many",
"matches",
"did",
"Rajasthan",
"Royals",
"play",
"in",
"Season",
"8",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Rajasthan Royals"
},
{
"id": 2,
"type": "column",
"value": "team_name"
},
{
"id": 9,
"type": "column",
"value": "season_id"
},
{
"id": 6,
"type": "column",
"value": "team_id"
},
{
"id": 5,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"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,
"toke... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
13,624 | movie_platform | bird:train.json:155 | Who created the list that has 142 comments? Indicate the user id of the user, if there are multiple lists with 142 comments, list the user id of the person who created the list | SELECT user_id FROM lists WHERE list_comments = 142 | [
"Who",
"created",
"the",
"list",
"that",
"has",
"142",
"comments",
"?",
"Indicate",
"the",
"user",
"i",
"d",
"of",
"the",
"user",
",",
"if",
"there",
"are",
"multiple",
"lists",
"with",
"142",
"comments",
",",
"list",
"the",
"user",
"i",
"d",
"of",
"... | [
{
"id": 2,
"type": "column",
"value": "list_comments"
},
{
"id": 1,
"type": "column",
"value": "user_id"
},
{
"id": 0,
"type": "table",
"value": "lists"
},
{
"id": 3,
"type": "value",
"value": "142"
}
] | [
{
"entity_id": 0,
"token_idxs": [
22
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12,
13
]
},
{
"entity_id": 2,
"token_idxs": [
25
]
},
{
"entity_id": 3,
"token_idxs": [
24
]
},
{
"entity_id": 4,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,625 | european_football_2 | bird:dev.json:1059 | Please list player names which are higher than 180. | SELECT player_name FROM Player WHERE height > 180 | [
"Please",
"list",
"player",
"names",
"which",
"are",
"higher",
"than",
"180",
"."
] | [
{
"id": 1,
"type": "column",
"value": "player_name"
},
{
"id": 0,
"type": "table",
"value": "player"
},
{
"id": 2,
"type": "column",
"value": "height"
},
{
"id": 3,
"type": "value",
"value": "180"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,627 | mental_health_survey | bird:train.json:4578 | What are the ages of the oldest and youngest user that were surveyed? Indicate their user id. | SELECT MAX(T1.AnswerText), MIN(T1.AnswerText) , ( SELECT T1.UserID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 1 ORDER BY T1.AnswerText LIMIT 1 ) AS "youngest id" FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 1 | [
"What",
"are",
"the",
"ages",
"of",
"the",
"oldest",
"and",
"youngest",
"user",
"that",
"were",
"surveyed",
"?",
"Indicate",
"their",
"user",
"i",
"d."
] | [
{
"id": 2,
"type": "column",
"value": "questionid"
},
{
"id": 4,
"type": "column",
"value": "answertext"
},
{
"id": 1,
"type": "table",
"value": "question"
},
{
"id": 0,
"type": "table",
"value": "answer"
},
{
"id": 5,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"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": [
16,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
13,628 | talkingdata | bird:train.json:1089 | Among all the times event no.2 happened when the app user was not active, when was the earliest time this situation happened? | SELECT T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T1.is_active = 0 AND T2.event_id = 2 ORDER BY T2.timestamp LIMIT 1 | [
"Among",
"all",
"the",
"times",
"event",
"no.2",
"happened",
"when",
"the",
"app",
"user",
"was",
"not",
"active",
",",
"when",
"was",
"the",
"earliest",
"time",
"this",
"situation",
"happened",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "app_events"
},
{
"id": 0,
"type": "column",
"value": "timestamp"
},
{
"id": 4,
"type": "column",
"value": "is_active"
},
{
"id": 3,
"type": "column",
"value": "event_id"
},
{
"id": 2,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,629 | customers_and_invoices | spider:train_spider.json:1614 | What are the names of products that have never been ordered? | SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id | [
"What",
"are",
"the",
"names",
"of",
"products",
"that",
"have",
"never",
"been",
"ordered",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id": 2,
"type": "table",
"value": "order_items"
},
{
"id": 3,
"type": "column",
"value": "product_id"
},
{
"id": 0,
"type": "table",
"value": "products"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,631 | music_platform_2 | bird:train.json:7950 | Indicate the id of the reviewer whose itunes id is 1516665400. | SELECT T2.author_id FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.itunes_id = 1516665400 | [
"Indicate",
"the",
"i",
"d",
"of",
"the",
"reviewer",
"whose",
"itunes",
"i",
"d",
"is",
"1516665400",
"."
] | [
{
"id": 4,
"type": "value",
"value": "1516665400"
},
{
"id": 5,
"type": "column",
"value": "podcast_id"
},
{
"id": 0,
"type": "column",
"value": "author_id"
},
{
"id": 3,
"type": "column",
"value": "itunes_id"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
13,632 | bike_1 | spider:train_spider.json:139 | What is the latitude, longitude, city of the station from which the shortest trip started? | SELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1 | [
"What",
"is",
"the",
"latitude",
",",
"longitude",
",",
"city",
"of",
"the",
"station",
"from",
"which",
"the",
"shortest",
"trip",
"started",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "start_station_id"
},
{
"id": 5,
"type": "column",
"value": "duration"
},
{
"id": 3,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "column",
"value": "long"
},
{
"id": 2,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
13,633 | cre_Students_Information_Systems | bird:test.json:492 | Find the biographical data and details for students whose student loan is above the average amount. | SELECT T1.bio_data , T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id = T2.student_id WHERE T2.amount_of_loan > ( SELECT avg(amount_of_loan) FROM Student_Loans ) | [
"Find",
"the",
"biographical",
"data",
"and",
"details",
"for",
"students",
"whose",
"student",
"loan",
"is",
"above",
"the",
"average",
"amount",
"."
] | [
{
"id": 1,
"type": "column",
"value": "student_details"
},
{
"id": 4,
"type": "column",
"value": "amount_of_loan"
},
{
"id": 3,
"type": "table",
"value": "student_loans"
},
{
"id": 5,
"type": "column",
"value": "student_id"
},
{
"id": 0,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,634 | retail_world | bird:train.json:6416 | Indicate the name of the categories to which the products of order number 10933 belong. | SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T2.OrderID = 10933 | [
"Indicate",
"the",
"name",
"of",
"the",
"categories",
"to",
"which",
"the",
"products",
"of",
"order",
"number",
"10933",
"belong",
"."
] | [
{
"id": 5,
"type": "table",
"value": "Order Details"
},
{
"id": 0,
"type": "column",
"value": "categoryname"
},
{
"id": 1,
"type": "table",
"value": "categories"
},
{
"id": 6,
"type": "column",
"value": "categoryid"
},
{
"id": 7,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
13,635 | device | spider:train_spider.json:5059 | Give the average quantity of stocks. | SELECT avg(Quantity) FROM stock | [
"Give",
"the",
"average",
"quantity",
"of",
"stocks",
"."
] | [
{
"id": 1,
"type": "column",
"value": "quantity"
},
{
"id": 0,
"type": "table",
"value": "stock"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
13,636 | bike_share_1 | bird:train.json:9087 | Which bicycle is the least used bike. Check if the start and end station are from the same city and calculate the total duration travelled by the bicycle in hours for a trip made within the same city. | SELECT T2.bike_id, T2.start_station_name, T2.end_station_name, T1.city , CAST(T2.duration AS REAL) / 3600 FROM station AS T1 INNER JOIN trip AS T2 ON T1.name = T2.start_station_name GROUP BY T2.bike_id ORDER BY COUNT(T2.id) DESC LIMIT 1 | [
"Which",
"bicycle",
"is",
"the",
"least",
"used",
"bike",
".",
"Check",
"if",
"the",
"start",
"and",
"end",
"station",
"are",
"from",
"the",
"same",
"city",
"and",
"calculate",
"the",
"total",
"duration",
"travelled",
"by",
"the",
"bicycle",
"in",
"hours",... | [
{
"id": 1,
"type": "column",
"value": "start_station_name"
},
{
"id": 2,
"type": "column",
"value": "end_station_name"
},
{
"id": 9,
"type": "column",
"value": "duration"
},
{
"id": 0,
"type": "column",
"value": "bike_id"
},
{
"id": 4,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12
]
},
{
"entity_id": 2,
"token_idxs": [
13,
15
]
},
{
"entity_id": 3,
"token_idxs": [
19
]
},
{
"entity_id": 4,
"token_idxs": [... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"... |
13,637 | allergy_1 | spider:train_spider.json:477 | Which city does the student whose last name is "Kim" live in? | SELECT city_code FROM Student WHERE LName = "Kim" | [
"Which",
"city",
"does",
"the",
"student",
"whose",
"last",
"name",
"is",
"\"",
"Kim",
"\"",
"live",
"in",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "city_code"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 2,
"type": "column",
"value": "lname"
},
{
"id": 3,
"type": "column",
"value": "Kim"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
13,638 | works_cycles | bird:train.json:7096 | Sum the total number of products rejected for having a trim length that is too long. | SELECT SUM(T2.ScrappedQty) FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Trim length too long' | [
"Sum",
"the",
"total",
"number",
"of",
"products",
"rejected",
"for",
"having",
"a",
"trim",
"length",
"that",
"is",
"too",
"long",
"."
] | [
{
"id": 3,
"type": "value",
"value": "Trim length too long"
},
{
"id": 5,
"type": "column",
"value": "scrapreasonid"
},
{
"id": 0,
"type": "table",
"value": "scrapreason"
},
{
"id": 4,
"type": "column",
"value": "scrappedqty"
},
{
"id": 1,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
10,
11,
12,
13,
14,
15
]
},
{
"entity_id": 4,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
13,639 | talkingdata | bird:train.json:1098 | Among all the users who use a vivo device, what is the percentage of the users in the M23-26 user group? | SELECT SUM(IIF(T1.`group` = 'M23-26', 1.0, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo' | [
"Among",
"all",
"the",
"users",
"who",
"use",
"a",
"vivo",
"device",
",",
"what",
"is",
"the",
"percentage",
"of",
"the",
"users",
"in",
"the",
"M23",
"-",
"26",
"user",
"group",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 2,
"type": "column",
"value": "phone_brand"
},
{
"id": 0,
"type": "table",
"value": "gender_age"
},
{
"id": 4,
"type": "column",
"value": "device_id"
},
{
"id": 8,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"O"
] |
13,640 | sales | bird:train.json:5433 | List the quantity and price of the product bought by Abigail Henderson. | SELECT T2.Quantity, T1.Price FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.FirstName = 'Abigail' AND T3.LastName = 'Henderson' | [
"List",
"the",
"quantity",
"and",
"price",
"of",
"the",
"product",
"bought",
"by",
"Abigail",
"Henderson",
"."
] | [
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 2,
"type": "table",
"value": "customers"
},
{
"id": 6,
"type": "column",
"value": "firstname"
},
{
"id": 9,
"type": "value",
"value": "Henderson"
},
{
"id": 10,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
13,641 | entrepreneur | spider:train_spider.json:2268 | What are the companies and investors that correspond to each entrepreneur? | SELECT Company , Investor FROM entrepreneur | [
"What",
"are",
"the",
"companies",
"and",
"investors",
"that",
"correspond",
"to",
"each",
"entrepreneur",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "entrepreneur"
},
{
"id": 2,
"type": "column",
"value": "investor"
},
{
"id": 1,
"type": "column",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,642 | retail_world | bird:train.json:6450 | How many orders did "Laughing Bacchus Wine Cellars" make? | SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars' | [
"How",
"many",
"orders",
"did",
"\"",
"Laughing",
"Bacchus",
"Wine",
"Cellars",
"\"",
"make",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Laughing Bacchus Wine Cellars"
},
{
"id": 2,
"type": "column",
"value": "companyname"
},
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 4,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5,
6,
7,
8
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O"
] |
13,643 | college_2 | spider:train_spider.json:1366 | Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010. | SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010 | [
"Find",
"the",
"i",
"d",
"of",
"instructors",
"who",
"taught",
"a",
"class",
"in",
"Fall",
"2009",
"but",
"not",
"in",
"Spring",
"2010",
"."
] | [
{
"id": 2,
"type": "column",
"value": "semester"
},
{
"id": 0,
"type": "table",
"value": "teaches"
},
{
"id": 6,
"type": "value",
"value": "Spring"
},
{
"id": 3,
"type": "value",
"value": "Fall"
},
{
"id": 4,
"type": "column",
"value": "yea... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
13,644 | student_club | bird:dev.json:1357 | State the date Connor Hilton paid his/her dues. | SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Connor' AND T1.last_name = 'Hilton' AND T2.source = 'Dues' | [
"State",
"the",
"date",
"Connor",
"Hilton",
"paid",
"his",
"/",
"her",
"dues",
"."
] | [
{
"id": 4,
"type": "column",
"value": "link_to_member"
},
{
"id": 0,
"type": "column",
"value": "date_received"
},
{
"id": 5,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "column",
"value": "member_id"
},
{
"id": 7,
"type": "co... | [
{
"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",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
13,645 | video_games | bird:train.json:3348 | How many games were released on PS4 in 2014? | SELECT COUNT(DISTINCT T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PS4' AND T2.release_year = 2014 | [
"How",
"many",
"games",
"were",
"released",
"on",
"PS4",
"in",
"2014",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "game_publisher_id"
},
{
"id": 0,
"type": "table",
"value": "game_publisher"
},
{
"id": 3,
"type": "table",
"value": "game_platform"
},
{
"id": 6,
"type": "column",
"value": "platform_name"
},
{
"id": 8,
"t... | [
{
"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": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
13,647 | movie_3 | bird:train.json:9177 | How much is the total rental payment for the first 10 rentals? | SELECT SUM(amount) FROM payment WHERE rental_id BETWEEN 1 AND 10 | [
"How",
"much",
"is",
"the",
"total",
"rental",
"payment",
"for",
"the",
"first",
"10",
"rentals",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "rental_id"
},
{
"id": 0,
"type": "table",
"value": "payment"
},
{
"id": 4,
"type": "column",
"value": "amount"
},
{
"id": 3,
"type": "value",
"value": "10"
},
{
"id": 2,
"type": "value",
"value": "1"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,648 | bakery_1 | bird:test.json:1525 | Find flavor of cakes that cost more than 10 dollars. | SELECT flavor FROM goods WHERE food = "Cake" AND price > 10 | [
"Find",
"flavor",
"of",
"cakes",
"that",
"cost",
"more",
"than",
"10",
"dollars",
"."
] | [
{
"id": 1,
"type": "column",
"value": "flavor"
},
{
"id": 0,
"type": "table",
"value": "goods"
},
{
"id": 4,
"type": "column",
"value": "price"
},
{
"id": 2,
"type": "column",
"value": "food"
},
{
"id": 3,
"type": "column",
"value": "Cake"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,649 | codebase_comments | bird:train.json:587 | What's the task of the method whose tokenized name is "html parser feed"? | SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'html parser feed' | [
"What",
"'s",
"the",
"task",
"of",
"the",
"method",
"whose",
"tokenized",
"name",
"is",
"\"",
"html",
"parser",
"feed",
"\"",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "html parser feed"
},
{
"id": 1,
"type": "column",
"value": "nametokenized"
},
{
"id": 0,
"type": "table",
"value": "method"
},
{
"id": 4,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
13,650 | movie_3 | bird:train.json:9346 | How many animation film titles are rated for adults only? | SELECT COUNT(T1.title) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'animation' AND T1.rating = 'NC-17' | [
"How",
"many",
"animation",
"film",
"titles",
"are",
"rated",
"for",
"adults",
"only",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "film_category"
},
{
"id": 4,
"type": "column",
"value": "category_id"
},
{
"id": 6,
"type": "value",
"value": "animation"
},
{
"id": 0,
"type": "table",
"value": "category"
},
{
"id": 9,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
6,
7
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O"
] |
13,651 | perpetrator | spider:train_spider.json:2307 | What is the location of the perpetrator with the largest kills. | SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1 | [
"What",
"is",
"the",
"location",
"of",
"the",
"perpetrator",
"with",
"the",
"largest",
"kills",
"."
] | [
{
"id": 0,
"type": "table",
"value": "perpetrator"
},
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "column",
"value": "killed"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,652 | inn_1 | spider:train_spider.json:2575 | What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people. | SELECT roomName , RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2; | [
"What",
"are",
"the",
"room",
"names",
"and",
"ids",
"of",
"all",
"the",
"rooms",
"that",
"cost",
"more",
"than",
"160",
"and",
"can",
"accommodate",
"more",
"than",
"two",
"people",
"."
] | [
{
"id": 5,
"type": "column",
"value": "maxoccupancy"
},
{
"id": 3,
"type": "column",
"value": "baseprice"
},
{
"id": 1,
"type": "column",
"value": "roomname"
},
{
"id": 2,
"type": "column",
"value": "roomid"
},
{
"id": 0,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,653 | advertising_agencies | bird:test.json:2116 | Return the invoice ids, statuses, and details for invoices with the most payments? | SELECT T1.invoice_id , T2.invoice_status , T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id = T2.invoice_id GROUP BY T1.invoice_id ORDER BY count(*) DESC LIMIT 1 | [
"Return",
"the",
"invoice",
"ids",
",",
"statuses",
",",
"and",
"details",
"for",
"invoices",
"with",
"the",
"most",
"payments",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "invoice_details"
},
{
"id": 1,
"type": "column",
"value": "invoice_status"
},
{
"id": 0,
"type": "column",
"value": "invoice_id"
},
{
"id": 3,
"type": "table",
"value": "payments"
},
{
"id": 4,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,654 | department_management | spider:train_spider.json:2 | List the creation year, name and budget of each department. | SELECT creation , name , budget_in_billions FROM department | [
"List",
"the",
"creation",
"year",
",",
"name",
"and",
"budget",
"of",
"each",
"department",
"."
] | [
{
"id": 3,
"type": "column",
"value": "budget_in_billions"
},
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 1,
"type": "column",
"value": "creation"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,655 | storm_record | spider:train_spider.json:2713 | How many storms occured in each region? | SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id | [
"How",
"many",
"storms",
"occured",
"in",
"each",
"region",
"?"
] | [
{
"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"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O"
] |
13,656 | manufactory_1 | spider:train_spider.json:5337 | What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending? | SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC | [
"What",
"are",
"the",
"names",
"and",
"prices",
"of",
"products",
"that",
"cost",
"at",
"least",
"180",
",",
"sorted",
"by",
"price",
"decreasing",
"and",
"name",
"ascending",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 2,
"type": "column",
"value": "price"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "180"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
19
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"enti... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
13,657 | codebase_comments | bird:train.json:645 | Please provide the id of the solution whose repository has the most watchers. | SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Watchers = ( SELECT MAX(Watchers) FROM Repo ) | [
"Please",
"provide",
"the",
"i",
"d",
"of",
"the",
"solution",
"whose",
"repository",
"has",
"the",
"most",
"watchers",
"."
] | [
{
"id": 2,
"type": "table",
"value": "solution"
},
{
"id": 3,
"type": "column",
"value": "watchers"
},
{
"id": 4,
"type": "column",
"value": "repoid"
},
{
"id": 1,
"type": "table",
"value": "repo"
},
{
"id": 0,
"type": "column",
"value": "i... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,658 | race_track | spider:train_spider.json:787 | Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats. | SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000 | [
"Find",
"the",
"locations",
"where",
"have",
"both",
"tracks",
"with",
"more",
"than",
"90000",
"seats",
"and",
"tracks",
"with",
"less",
"than",
"70000",
"seats",
"."
] | [
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "column",
"value": "seating"
},
{
"id": 0,
"type": "table",
"value": "track"
},
{
"id": 3,
"type": "value",
"value": "90000"
},
{
"id": 4,
"type": "value",
"value": "700... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
13,661 | race_track | spider:train_spider.json:777 | Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened. | SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000 | [
"Show",
"year",
"where",
"a",
"track",
"with",
"a",
"seating",
"at",
"least",
"5000",
"opened",
"and",
"a",
"track",
"with",
"seating",
"no",
"more",
"than",
"4000",
"opened",
"."
] | [
{
"id": 1,
"type": "column",
"value": "year_opened"
},
{
"id": 2,
"type": "column",
"value": "seating"
},
{
"id": 0,
"type": "table",
"value": "track"
},
{
"id": 3,
"type": "value",
"value": "4000"
},
{
"id": 4,
"type": "value",
"value": "5... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
21
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
20
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
13,662 | student_1 | spider:train_spider.json:4074 | How many teachers does the student named MADLOCK RAY have? | SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "MADLOCK" AND T1.lastname = "RAY" | [
"How",
"many",
"teachers",
"does",
"the",
"student",
"named",
"MADLOCK",
"RAY",
"have",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "classroom"
},
{
"id": 3,
"type": "column",
"value": "firstname"
},
{
"id": 1,
"type": "table",
"value": "teachers"
},
{
"id": 5,
"type": "column",
"value": "lastname"
},
{
"id": 4,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-COLUMN",
"O",
"O"
] |
13,663 | book_publishing_company | bird:train.json:226 | Which city did Victoria P Ashworth work in? | SELECT T2.city FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.fname = 'Victoria' AND T1.minit = 'P' AND T1.lname = 'Ashworth' | [
"Which",
"city",
"did",
"Victoria",
"P",
"Ashworth",
"work",
"in",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "publishers"
},
{
"id": 1,
"type": "table",
"value": "employee"
},
{
"id": 5,
"type": "value",
"value": "Victoria"
},
{
"id": 9,
"type": "value",
"value": "Ashworth"
},
{
"id": 3,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
3
... | [
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-VALUE",
"B-VALUE",
"O",
"O",
"O"
] |
13,664 | public_review_platform | bird:train.json:3864 | How many Yelp_Business close after 8PM on Mondays? | SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Monday' AND T1.closing_time > '8PM' | [
"How",
"many",
"Yelp_Business",
"close",
"after",
"8PM",
"on",
"Mondays",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "business_hours"
},
{
"id": 6,
"type": "column",
"value": "closing_time"
},
{
"id": 2,
"type": "column",
"value": "business_id"
},
{
"id": 4,
"type": "column",
"value": "day_of_week"
},
{
"id": 3,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"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",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O"
] |
13,665 | thrombosis_prediction | bird:dev.json:1164 | How many of the patients with the most serious thrombosis cases examined in 1997 are women? | SELECT COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1 | [
"How",
"many",
"of",
"the",
"patients",
"with",
"the",
"most",
"serious",
"thrombosis",
"cases",
"examined",
"in",
"1997",
"are",
"women",
"?"
] | [
{
"id": 9,
"type": "column",
"value": "Examination Date"
},
{
"id": 1,
"type": "table",
"value": "examination"
},
{
"id": 6,
"type": "column",
"value": "thrombosis"
},
{
"id": 0,
"type": "table",
"value": "patient"
},
{
"id": 5,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
11,
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id... | [
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"B-COLUMN",
"O",
"O"
] |
13,667 | video_game | bird:test.json:1969 | Show all distinct franchises of games. | SELECT DISTINCT Franchise FROM game | [
"Show",
"all",
"distinct",
"franchises",
"of",
"games",
"."
] | [
{
"id": 1,
"type": "column",
"value": "franchise"
},
{
"id": 0,
"type": "table",
"value": "game"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
13,668 | music_2 | spider:train_spider.json:5192 | How many unique labels are there for albums? | SELECT count(DISTINCT label) FROM albums | [
"How",
"many",
"unique",
"labels",
"are",
"there",
"for",
"albums",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "albums"
},
{
"id": 1,
"type": "column",
"value": "label"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,669 | mondial_geo | bird:train.json:8438 | Which nation has the lowest proportion of people who speak an African language? Please state the nation's full name. | SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'African' ORDER BY T2.Percentage ASC LIMIT 1 | [
"Which",
"nation",
"has",
"the",
"lowest",
"proportion",
"of",
"people",
"who",
"speak",
"an",
"African",
"language",
"?",
"Please",
"state",
"the",
"nation",
"'s",
"full",
"name",
"."
] | [
{
"id": 2,
"type": "table",
"value": "ethnicgroup"
},
{
"id": 4,
"type": "column",
"value": "percentage"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 3,
"type": "value",
"value": "African"
},
{
"id": 6,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": [
20
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
13,670 | synthea | bird:train.json:1529 | Among the patients who have been using Penicillin V Potassium 250 MG, what percentage of patients are female? | SELECT CAST(SUM(CASE WHEN T1.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Penicillin V Potassium 250 MG' | [
"Among",
"the",
"patients",
"who",
"have",
"been",
"using",
"Penicillin",
"V",
"Potassium",
"250",
"MG",
",",
"what",
"percentage",
"of",
"patients",
"are",
"female",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Penicillin V Potassium 250 MG"
},
{
"id": 1,
"type": "table",
"value": "medications"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 4,
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8,
9,
10,
11
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
{... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O"
] |
13,671 | customers_and_orders | bird:test.json:293 | Show all customer names, ids and the number of orders by each customer. | SELECT T2.customer_name , T1.customer_id , count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id | [
"Show",
"all",
"customer",
"names",
",",
"ids",
"and",
"the",
"number",
"of",
"orders",
"by",
"each",
"customer",
"."
] | [
{
"id": 2,
"type": "table",
"value": "customer_orders"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 3,
"type": "table",
"value": "customers"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,672 | cs_semester | bird:train.json:923 | Mention the names and credits of course registered by the students who were under the supervision of female professor with the highest teaching ability. | SELECT T5.name, T5.credit FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T1.student_id = T3.student_id INNER JOIN registration AS T4 ON T3.student_id = T4.student_id INNER JOIN course AS T5 ON T4.course_id = T5.course_id WHERE T2.gender = 'Female' ORDER BY T2.teachingability ... | [
"Mention",
"the",
"names",
"and",
"credits",
"of",
"course",
"registered",
"by",
"the",
"students",
"who",
"were",
"under",
"the",
"supervision",
"of",
"female",
"professor",
"with",
"the",
"highest",
"teaching",
"ability",
"."
] | [
{
"id": 5,
"type": "column",
"value": "teachingability"
},
{
"id": 6,
"type": "table",
"value": "registration"
},
{
"id": 9,
"type": "column",
"value": "student_id"
},
{
"id": 7,
"type": "column",
"value": "course_id"
},
{
"id": 8,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,673 | tracking_orders | spider:train_spider.json:6911 | Find the id of the customers who have order status both "On Road" and "Shipped". | SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped" | [
"Find",
"the",
"i",
"d",
"of",
"the",
"customers",
"who",
"have",
"order",
"status",
"both",
"\"",
"On",
"Road",
"\"",
"and",
"\"",
"Shipped",
"\"",
"."
] | [
{
"id": 3,
"type": "column",
"value": "order_status"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "column",
"value": "On Road"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
13,
14
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
13,675 | codebase_community | bird:dev.json:674 | Who has the highest reputation? Please give the display name. | SELECT DisplayName FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users ) | [
"Who",
"has",
"the",
"highest",
"reputation",
"?",
"Please",
"give",
"the",
"display",
"name",
"."
] | [
{
"id": 1,
"type": "column",
"value": "displayname"
},
{
"id": 2,
"type": "column",
"value": "reputation"
},
{
"id": 0,
"type": "table",
"value": "users"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9,
10
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,676 | works_cycles | bird:train.json:7183 | Which product ID do not have any work order ID? | SELECT ProductID FROM Product WHERE ProductID NOT IN ( SELECT T1.ProductID FROM Product AS T1 INNER JOIN WorkOrder AS T2 ON T1.ProductID = T2.ProductID ) | [
"Which",
"product",
"ID",
"do",
"not",
"have",
"any",
"work",
"order",
"ID",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "productid"
},
{
"id": 2,
"type": "table",
"value": "workorder"
},
{
"id": 0,
"type": "table",
"value": "product"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O"
] |
13,677 | election_representative | spider:train_spider.json:1188 | What is the party that has the largest number of representatives? | SELECT Party , COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"party",
"that",
"has",
"the",
"largest",
"number",
"of",
"representatives",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "representative"
},
{
"id": 1,
"type": "column",
"value": "party"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,678 | conference | bird:test.json:1084 | What are the names of the staff members who have been both a speaker and a sponsor at some conference? | SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id = T2.staff_id WHERE T2.role = 'Sponsor' | [
"What",
"are",
"the",
"names",
"of",
"the",
"staff",
"members",
"who",
"have",
"been",
"both",
"a",
"speaker",
"and",
"a",
"sponsor",
"at",
"some",
"conference",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "conference_participation"
},
{
"id": 6,
"type": "column",
"value": "staff_id"
},
{
"id": 4,
"type": "value",
"value": "Speaker"
},
{
"id": 5,
"type": "value",
"value": "Sponsor"
},
{
"id": 1,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
19
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O"
] |
13,680 | airline | bird:train.json:5906 | What are the air carriers of the flights that flew on August 25, 2018 that have departure delay of -5? | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.FL_DATE = '2018/8/25' GROUP BY T1.Description | [
"What",
"are",
"the",
"air",
"carriers",
"of",
"the",
"flights",
"that",
"flew",
"on",
"August",
"25",
",",
"2018",
"that",
"have",
"departure",
"delay",
"of",
"-5",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 1,
"type": "table",
"value": "Air Carriers"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 4,
"type": "value",
"value": "2018/8/25"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,681 | musical | spider:train_spider.json:243 | Return the characters for actors, ordered by age descending. | SELECT Character FROM actor ORDER BY age DESC | [
"Return",
"the",
"characters",
"for",
"actors",
",",
"ordered",
"by",
"age",
"descending",
"."
] | [
{
"id": 1,
"type": "column",
"value": "character"
},
{
"id": 0,
"type": "table",
"value": "actor"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
13,682 | works_cycles | bird:train.json:7133 | How many employees work for AdvertureWorks that is single? | SELECT COUNT(T1.BusinessentityID) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'EM' AND T2.MaritalStatus = 'S' | [
"How",
"many",
"employees",
"work",
"for",
"AdvertureWorks",
"that",
"is",
"single",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "businessentityid"
},
{
"id": 5,
"type": "column",
"value": "maritalstatus"
},
{
"id": 3,
"type": "column",
"value": "persontype"
},
{
"id": 1,
"type": "table",
"value": "employee"
},
{
"id": 0,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
13,683 | movielens | bird:train.json:2307 | How many American movies have cast number more than 1? | SELECT COUNT(T2.actorid) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA' AND T2.cast_num > 1 | [
"How",
"many",
"American",
"movies",
"have",
"cast",
"number",
"more",
"than",
"1",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "movies2actors"
},
{
"id": 6,
"type": "column",
"value": "cast_num"
},
{
"id": 2,
"type": "column",
"value": "actorid"
},
{
"id": 3,
"type": "column",
"value": "movieid"
},
{
"id": 4,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
13,684 | customers_and_addresses | spider:train_spider.json:6109 | What is the name of the customer that has purchased the most items? | SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"customer",
"that",
"has",
"purchased",
"the",
"most",
"items",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "customer_orders"
},
{
"id": 5,
"type": "column",
"value": "order_quantity"
},
{
"id": 0,
"type": "column",
"value": "customer_name"
},
{
"id": 1,
"type": "table",
"value": "order_items"
},
{
"id": 6,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"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-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
13,685 | college_1 | spider:train_spider.json:3241 | How many students enrolled in class ACCT-211? | SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211' | [
"How",
"many",
"students",
"enrolled",
"in",
"class",
"ACCT-211",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "class_code"
},
{
"id": 2,
"type": "column",
"value": "crs_code"
},
{
"id": 3,
"type": "value",
"value": "ACCT-211"
},
{
"id": 1,
"type": "table",
"value": "enroll"
},
{
"id": 0,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
13,686 | codebase_comments | bird:train.json:612 | Tell the path of the solution for the method "ExportToRTF.RTFStyleSheet.H6Write". | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'ExportToRTF.RTFStyleSheet.H6Write' | [
"Tell",
"the",
"path",
"of",
"the",
"solution",
"for",
"the",
"method",
"\"",
"ExportToRTF.RTFStyleSheet",
".",
"H6Write",
"\"",
"."
] | [
{
"id": 4,
"type": "value",
"value": "ExportToRTF.RTFStyleSheet.H6Write"
},
{
"id": 6,
"type": "column",
"value": "solutionid"
},
{
"id": 1,
"type": "table",
"value": "solution"
},
{
"id": 2,
"type": "table",
"value": "method"
},
{
"id": 0,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10,
11,
12
]
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
13,687 | bike_1 | spider:train_spider.json:206 | What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there? | SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity) < 70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*) >= 100 | [
"What",
"are",
"the",
"zip",
"codes",
"that",
"have",
"an",
"average",
"mean",
"humidity",
"below",
"70",
"and",
"had",
"at",
"least",
"100",
"trips",
"come",
"through",
"there",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "mean_humidity"
},
{
"id": 1,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 2,
"type": "table",
"value": "trip"
},
{
"id": 4,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
21
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
17
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
13,689 | public_review_platform | bird:train.json:4135 | What is the attribute value of an active business with a low review count and 3 stars which is located at Goodyear, AZ? | SELECT DISTINCT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.state = 'AZ' AND T1.city = 'Goodyear' AND T1.active = 'true' AND T1.stars = 3 AND T1.review_count = 'Low' | [
"What",
"is",
"the",
"attribute",
"value",
"of",
"an",
"active",
"business",
"with",
"a",
"low",
"review",
"count",
"and",
"3",
"stars",
"which",
"is",
"located",
"at",
"Goodyear",
",",
"AZ",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "business_attributes"
},
{
"id": 0,
"type": "column",
"value": "attribute_value"
},
{
"id": 4,
"type": "column",
"value": "attribute_id"
},
{
"id": 13,
"type": "column",
"value": "review_count"
},
{
"id": 15,
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.