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 |
|---|---|---|---|---|---|---|---|---|
11,784 | driving_school | spider:train_spider.json:6694 | List first name and last name of customers that have more than 2 payments. | SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2; | [
"List",
"first",
"name",
"and",
"last",
"name",
"of",
"customers",
"that",
"have",
"more",
"than",
"2",
"payments",
"."
] | [
{
"id": 3,
"type": "table",
"value": "customer_payments"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 2,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"en... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
5,804 | customers_and_orders | bird:test.json:251 | Show all hardware product names with price higher than the average price of hardware type products. | SELECT product_name FROM Products WHERE product_type_code = "Hardware" AND product_price > (SELECT avg(product_price) FROM Products WHERE product_type_code = "Hardware") | [
"Show",
"all",
"hardware",
"product",
"names",
"with",
"price",
"higher",
"than",
"the",
"average",
"price",
"of",
"hardware",
"type",
"products",
"."
] | [
{
"id": 2,
"type": "column",
"value": "product_type_code"
},
{
"id": 4,
"type": "column",
"value": "product_price"
},
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
6
... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
6,209 | video_games | bird:train.json:3413 | Which year has the most number of video game releases? | SELECT T1.release_year FROM ( SELECT T.release_year, COUNT(id) FROM game_platform AS T GROUP BY T.release_year ORDER BY COUNT(T.id) DESC LIMIT 1 ) T1 | [
"Which",
"year",
"has",
"the",
"most",
"number",
"of",
"video",
"game",
"releases",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "game_platform"
},
{
"id": 0,
"type": "column",
"value": "release_year"
},
{
"id": 2,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
13,789 | car_road_race | bird:test.json:1331 | What are the names of drivers and the names of the races they took part in? | SELECT T1.Driver_Name , T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID = T2.Driver_ID | [
"What",
"are",
"the",
"names",
"of",
"drivers",
"and",
"the",
"names",
"of",
"the",
"races",
"they",
"took",
"part",
"in",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "driver_name"
},
{
"id": 1,
"type": "column",
"value": "race_name"
},
{
"id": 4,
"type": "column",
"value": "driver_id"
},
{
"id": 2,
"type": "table",
"value": "driver"
},
{
"id": 3,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
13,679 | regional_sales | bird:train.json:2591 | List down the product IDs and names that include the word "Outdoor". | SELECT ProductID, T FROM ( SELECT ProductID , CASE WHEN `Product Name` LIKE '%Outdoor%' THEN `Product Name` ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL ORDER BY T DESC | [
"List",
"down",
"the",
"product",
"IDs",
"and",
"names",
"that",
"include",
"the",
"word",
"\"",
"Outdoor",
"\"",
"."
] | [
{
"id": 3,
"type": "column",
"value": "Product Name"
},
{
"id": 0,
"type": "column",
"value": "productid"
},
{
"id": 4,
"type": "value",
"value": "%Outdoor%"
},
{
"id": 2,
"type": "table",
"value": "products"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
14,709 | california_schools | bird:dev.json:11 | Please list the codes of the schools with a total enrollment of over 500. | SELECT T2.CDSCode FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` + T2.`Enrollment (Ages 5-17)` > 500 | [
"Please",
"list",
"the",
"codes",
"of",
"the",
"schools",
"with",
"a",
"total",
"enrollment",
"of",
"over",
"500",
"."
] | [
{
"id": 5,
"type": "column",
"value": "Enrollment (Ages 5-17)"
},
{
"id": 4,
"type": "column",
"value": "Enrollment (K-12)"
},
{
"id": 0,
"type": "column",
"value": "cdscode"
},
{
"id": 1,
"type": "table",
"value": "schools"
},
{
"id": 2,
"type... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
3,981 | menu | bird:train.json:5479 | Among the menus in which the dish "Clear green turtle" had appeared, how many of them used the dollar as their currency? | SELECT SUM(CASE WHEN T3.currency = 'Dollars' THEN 1 ELSE 0 END) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Clear green turtle' | [
"Among",
"the",
"menus",
"in",
"which",
"the",
"dish",
"\"",
"Clear",
"green",
"turtle",
"\"",
"had",
"appeared",
",",
"how",
"many",
"of",
"them",
"used",
"the",
"dollar",
"as",
"their",
"currency",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Clear green turtle"
},
{
"id": 11,
"type": "column",
"value": "menu_page_id"
},
{
"id": 7,
"type": "table",
"value": "menuitem"
},
{
"id": 8,
"type": "table",
"value": "menupage"
},
{
"id": 12,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
4,088 | retail_complains | bird:train.json:376 | Please list all first and last names of clients who live in New York city. | SELECT first, last FROM client WHERE city = 'New York City' | [
"Please",
"list",
"all",
"first",
"and",
"last",
"names",
"of",
"clients",
"who",
"live",
"in",
"New",
"York",
"city",
"."
] | [
{
"id": 4,
"type": "value",
"value": "New York City"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 1,
"type": "column",
"value": "first"
},
{
"id": 2,
"type": "column",
"value": "last"
},
{
"id": 3,
"type": "column",
"value": ... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
12,
13
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
12,543 | works_cycles | bird:train.json:7081 | Average cost of purchase orders made during the first six months of 2012. | SELECT CAST(SUM(ActualCost) AS REAL) / COUNT(TransactionID) FROM TransactionHistoryArchive WHERE TransactionType = 'P' AND TransactionDate >= '2012-01-01' AND TransactionDate < '2012-07-01' | [
"Average",
"cost",
"of",
"purchase",
"orders",
"made",
"during",
"the",
"first",
"six",
"months",
"of",
"2012",
"."
] | [
{
"id": 0,
"type": "table",
"value": "transactionhistoryarchive"
},
{
"id": 1,
"type": "column",
"value": "transactiontype"
},
{
"id": 3,
"type": "column",
"value": "transactiondate"
},
{
"id": 6,
"type": "column",
"value": "transactionid"
},
{
"id... | [
{
"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": [
12
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
11,734 | retail_world | bird:train.json:6320 | How many orders have asked for the product Tofu? | SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Tofu' | [
"How",
"many",
"orders",
"have",
"asked",
"for",
"the",
"product",
"Tofu",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "Order Details"
},
{
"id": 2,
"type": "column",
"value": "productname"
},
{
"id": 5,
"type": "column",
"value": "productid"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE"
] |
1,113 | retails | bird:train.json:6832 | List the phone number of the customer who placed orders with a total price of more than $300,000. | SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000 | [
"List",
"the",
"phone",
"number",
"of",
"the",
"customer",
"who",
"placed",
"orders",
"with",
"a",
"total",
"price",
"of",
"more",
"than",
"$",
"300,000",
"."
] | [
{
"id": 3,
"type": "column",
"value": "o_totalprice"
},
{
"id": 5,
"type": "column",
"value": "o_custkey"
},
{
"id": 6,
"type": "column",
"value": "c_custkey"
},
{
"id": 2,
"type": "table",
"value": "customer"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
13,
14
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"to... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
10,617 | tracking_grants_for_research | spider:train_spider.json:4368 | How many documents can one grant have at most? List the grant id and number. | SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1 | [
"How",
"many",
"documents",
"can",
"one",
"grant",
"have",
"at",
"most",
"?",
"List",
"the",
"grant",
"i",
"d",
"and",
"number",
"."
] | [
{
"id": 0,
"type": "table",
"value": "documents"
},
{
"id": 1,
"type": "column",
"value": "grant_id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
14,857 | movies_4 | bird:train.json:545 | List the names of camera supervisors in the crew. | SELECT T1.person_name FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T2.job = 'Camera Supervisor' | [
"List",
"the",
"names",
"of",
"camera",
"supervisors",
"in",
"the",
"crew",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Camera Supervisor"
},
{
"id": 0,
"type": "column",
"value": "person_name"
},
{
"id": 2,
"type": "table",
"value": "movie_crew"
},
{
"id": 5,
"type": "column",
"value": "person_id"
},
{
"id": 1,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4,
5
]
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-TABLE",
"O"
] |
2,287 | sales | bird:train.json:5441 | List the customer's ID and last name of the customer that purchased a product with a quantity greater than 90% of the average quantity of all listed products. | SELECT T2.CustomerID, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity > ( SELECT AVG(Quantity) FROM Sales ) * 0.9 | [
"List",
"the",
"customer",
"'s",
"ID",
"and",
"last",
"name",
"of",
"the",
"customer",
"that",
"purchased",
"a",
"product",
"with",
"a",
"quantity",
"greater",
"than",
"90",
"%",
"of",
"the",
"average",
"quantity",
"of",
"all",
"listed",
"products",
"."
] | [
{
"id": 0,
"type": "column",
"value": "customerid"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 4,
"type": "column",
"value": "quantity"
},
{
"id": 2,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
9,740 | retail_world | bird:train.json:6362 | What are the names of the products that were discountinued? | SELECT ProductName FROM Products WHERE Discontinued = 1 | [
"What",
"are",
"the",
"names",
"of",
"the",
"products",
"that",
"were",
"discountinued",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "discontinued"
},
{
"id": 1,
"type": "column",
"value": "productname"
},
{
"id": 0,
"type": "table",
"value": "products"
},
{
"id": 3,
"type": "value",
"value": "1"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
15,800 | hr_1 | spider:train_spider.json:3472 | What is the minimum salary in each department? | SELECT MIN(salary) , department_id FROM employees GROUP BY department_id | [
"What",
"is",
"the",
"minimum",
"salary",
"in",
"each",
"department",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "department_id"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 2,
"type": "column",
"value": "salary"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_... | [
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
4,808 | retail_world | bird:train.json:6635 | Which customer is a regular customer in this shop and what are the products category that he mostly buy? | SELECT T1.CustomerID, T4.CategoryName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Categories AS T4 ON T3.CategoryID = T4.CategoryID ORDER BY T1.CustomerID DESC, T4.CategoryName DESC | [
"Which",
"customer",
"is",
"a",
"regular",
"customer",
"in",
"this",
"shop",
"and",
"what",
"are",
"the",
"products",
"category",
"that",
"he",
"mostly",
"buy",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "Order Details"
},
{
"id": 1,
"type": "column",
"value": "categoryname"
},
{
"id": 0,
"type": "column",
"value": "customerid"
},
{
"id": 2,
"type": "table",
"value": "categories"
},
{
"id": 4,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
11
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
4,339 | mondial_geo | bird:train.json:8348 | Which nations have a 100% Spanish-speaking population? | SELECT Country FROM language WHERE Name = 'Spanish' AND Percentage = 100 | [
"Which",
"nations",
"have",
"a",
"100",
"%",
"Spanish",
"-",
"speaking",
"population",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "percentage"
},
{
"id": 0,
"type": "table",
"value": "language"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "value",
"value": "Spanish"
},
{
"id": 2,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
2,088 | talkingdata | bird:train.json:1225 | When did event number 2 happen and how many users were active? | SELECT COUNT(T1.app_id) AS num FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T1.event_id = 2 AND T1.is_active = 1 GROUP BY T2.timestamp | [
"When",
"did",
"event",
"number",
"2",
"happen",
"and",
"how",
"many",
"users",
"were",
"active",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "app_events"
},
{
"id": 0,
"type": "column",
"value": "timestamp"
},
{
"id": 6,
"type": "column",
"value": "is_active"
},
{
"id": 4,
"type": "column",
"value": "event_id"
},
{
"id": 2,
"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": []
},
{
"entity_id": 5,
"token_idxs": [
4
... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
7,043 | student_loan | bird:train.json:4508 | Which school have the highest student enrollment? How many of those students are filed for bankruptcy? | SELECT T.school, num FROM ( SELECT T1.school, COUNT(T2.name) AS num FROM enrolled AS T1 LEFT JOIN filed_for_bankrupcy AS T2 ON T2.name = T1.name GROUP BY T1.school ) T ORDER BY T.num DESC LIMIT 1 | [
"Which",
"school",
"have",
"the",
"highest",
"student",
"enrollment",
"?",
"How",
"many",
"of",
"those",
"students",
"are",
"filed",
"for",
"bankruptcy",
"?"
] | [
{
"id": 3,
"type": "table",
"value": "filed_for_bankrupcy"
},
{
"id": 2,
"type": "table",
"value": "enrolled"
},
{
"id": 0,
"type": "column",
"value": "school"
},
{
"id": 4,
"type": "column",
"value": "name"
},
{
"id": 1,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
14,
15,
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
6,906 | soccer_2016 | bird:train.json:1834 | Who is the player who won the first ever "man of the match" award? | SELECT Player_Name FROM Player WHERE Player_Id = ( SELECT Man_of_the_Match FROM `Match` ORDER BY match_date ASC LIMIT 1 ) | [
"Who",
"is",
"the",
"player",
"who",
"won",
"the",
"first",
"ever",
"\"",
"man",
"of",
"the",
"match",
"\"",
"award",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "man_of_the_match"
},
{
"id": 1,
"type": "column",
"value": "player_name"
},
{
"id": 5,
"type": "column",
"value": "match_date"
},
{
"id": 2,
"type": "column",
"value": "player_id"
},
{
"id": 0,
"type": "ta... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
10,
11,
12
]
},
{
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-TABLE",
"O",
"O",
"O"
] |
828 | coffee_shop | spider:train_spider.json:799 | Show the shop addresses ordered by their opening year. | SELECT address FROM shop ORDER BY open_year | [
"Show",
"the",
"shop",
"addresses",
"ordered",
"by",
"their",
"opening",
"year",
"."
] | [
{
"id": 2,
"type": "column",
"value": "open_year"
},
{
"id": 1,
"type": "column",
"value": "address"
},
{
"id": 0,
"type": "table",
"value": "shop"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
7,461 | bike_1 | spider:train_spider.json:171 | What are names of stations that have average bike availability above 10 and are not located in San Jose city? | SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = "San Jose" | [
"What",
"are",
"names",
"of",
"stations",
"that",
"have",
"average",
"bike",
"availability",
"above",
"10",
"and",
"are",
"not",
"located",
"in",
"San",
"Jose",
"city",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "bikes_available"
},
{
"id": 0,
"type": "column",
"value": "station_id"
},
{
"id": 6,
"type": "column",
"value": "San Jose"
},
{
"id": 1,
"type": "table",
"value": "station"
},
{
"id": 3,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
13,378 | world | bird:train.json:7835 | Provide the country, population, capital city, and official language of the country with the smallest surface area. | SELECT T1.Name, T1.Population, T1.Capital, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode INNER JOIN City AS T3 ON T1.Code = T3.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.SurfaceArea LIMIT 1 | [
"Provide",
"the",
"country",
",",
"population",
",",
"capital",
"city",
",",
"and",
"official",
"language",
"of",
"the",
"country",
"with",
"the",
"smallest",
"surface",
"area",
"."
] | [
{
"id": 9,
"type": "table",
"value": "countrylanguage"
},
{
"id": 7,
"type": "column",
"value": "surfacearea"
},
{
"id": 11,
"type": "column",
"value": "countrycode"
},
{
"id": 1,
"type": "column",
"value": "population"
},
{
"id": 5,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
3,185 | synthea | bird:train.json:1497 | When did Mrs. Joye Homenick receive her most recent influenza seasonal vaccine? | SELECT T2.DATE FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Influenza seasonal injectable preservative free' AND T1.first = 'Joye' AND T1.last = 'Homenick' ORDER BY T2.DATE DESC LIMIT 1 | [
"When",
"did",
"Mrs.",
"Joye",
"Homenick",
"receive",
"her",
"most",
"recent",
"influenza",
"seasonal",
"vaccine",
"?"
] | [
{
"id": 5,
"type": "value",
"value": "Influenza seasonal injectable preservative free"
},
{
"id": 2,
"type": "table",
"value": "immunizations"
},
{
"id": 4,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "patients"
},... | [
{
"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",
"O",
"O",
"O",
"O"
] |
9,909 | aan_1 | bird:test.json:1037 | Find the id and title of the papers that are never cited by others. | SELECT paper_id , title FROM Paper WHERE paper_id NOT IN (SELECT cited_paper_id FROM Citation) | [
"Find",
"the",
"i",
"d",
"and",
"title",
"of",
"the",
"papers",
"that",
"are",
"never",
"cited",
"by",
"others",
"."
] | [
{
"id": 4,
"type": "column",
"value": "cited_paper_id"
},
{
"id": 1,
"type": "column",
"value": "paper_id"
},
{
"id": 3,
"type": "table",
"value": "citation"
},
{
"id": 0,
"type": "table",
"value": "paper"
},
{
"id": 2,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
4,002 | ship_1 | spider:train_spider.json:6245 | Count the number of ships. | SELECT count(*) FROM ship | [
"Count",
"the",
"number",
"of",
"ships",
"."
] | [
{
"id": 0,
"type": "table",
"value": "ship"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
9,083 | simpson_episodes | bird:train.json:4310 | How many title's crew members are working from Casting Department? | SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.category = 'Casting Department'; | [
"How",
"many",
"title",
"'s",
"crew",
"members",
"are",
"working",
"from",
"Casting",
"Department",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Casting Department"
},
{
"id": 4,
"type": "column",
"value": "episode_id"
},
{
"id": 2,
"type": "column",
"value": "category"
},
{
"id": 0,
"type": "table",
"value": "episode"
},
{
"id": 1,
"type": "table",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,464 | student_loan | bird:train.json:4412 | Please check if student 124 is disabled male. | SELECT IIF(T2.name IS NULL, 'female', 'male') FROM male AS T1 LEFT JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.name = 'student124' | [
"Please",
"check",
"if",
"student",
"124",
"is",
"disabled",
"male",
"."
] | [
{
"id": 3,
"type": "value",
"value": "student124"
},
{
"id": 1,
"type": "table",
"value": "disabled"
},
{
"id": 4,
"type": "value",
"value": "female"
},
{
"id": 0,
"type": "table",
"value": "male"
},
{
"id": 2,
"type": "column",
"value": "n... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"B-VALUE",
"O"
] |
4,325 | formula_1 | spider:train_spider.json:2167 | What is the id and family name of the driver who has the longest laptime? | SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
"and",
"family",
"name",
"of",
"the",
"driver",
"who",
"has",
"the",
"longest",
"laptime",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "milliseconds"
},
{
"id": 0,
"type": "column",
"value": "driverid"
},
{
"id": 3,
"type": "table",
"value": "laptimes"
},
{
"id": 1,
"type": "column",
"value": "surname"
},
{
"id": 2,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
993 | public_review_platform | bird:train.json:4089 | For users with average ratings of 3, what kind of tip length they mostly left? | SELECT T2.tip_length FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_average_stars = 3 GROUP BY T2.tip_length ORDER BY COUNT(T2.tip_length) DESC LIMIT 1 | [
"For",
"users",
"with",
"average",
"ratings",
"of",
"3",
",",
"what",
"kind",
"of",
"tip",
"length",
"they",
"mostly",
"left",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "user_average_stars"
},
{
"id": 0,
"type": "column",
"value": "tip_length"
},
{
"id": 5,
"type": "column",
"value": "user_id"
},
{
"id": 1,
"type": "table",
"value": "users"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
... | [
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
1,827 | address | bird:train.json:5157 | What are the alias of the cities with 0 population in 2010? | SELECT DISTINCT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2010 = 0 | [
"What",
"are",
"the",
"alias",
"of",
"the",
"cities",
"with",
"0",
"population",
"in",
"2010",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "population_2010"
},
{
"id": 2,
"type": "table",
"value": "zip_data"
},
{
"id": 5,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "column",
"value": "alias"
},
{
"id": 1,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
1,320 | music_1 | spider:train_spider.json:3535 | What are the id of songs whose format is mp3. | SELECT f_id FROM files WHERE formats = "mp3" | [
"What",
"are",
"the",
"i",
"d",
"of",
"songs",
"whose",
"format",
"is",
"mp3",
"."
] | [
{
"id": 2,
"type": "column",
"value": "formats"
},
{
"id": 0,
"type": "table",
"value": "files"
},
{
"id": 1,
"type": "column",
"value": "f_id"
},
{
"id": 3,
"type": "column",
"value": "mp3"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
2,532 | thrombosis_prediction | bird:dev.json:1290 | What is the examination date of the patient whose albumin is the highest in the normal range? | SELECT Date FROM Laboratory WHERE ALB > 3.5 AND ALB < 5.5 ORDER BY ALB DESC LIMIT 1 | [
"What",
"is",
"the",
"examination",
"date",
"of",
"the",
"patient",
"whose",
"albumin",
"is",
"the",
"highest",
"in",
"the",
"normal",
"range",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "laboratory"
},
{
"id": 1,
"type": "column",
"value": "date"
},
{
"id": 2,
"type": "column",
"value": "alb"
},
{
"id": 3,
"type": "value",
"value": "3.5"
},
{
"id": 4,
"type": "value",
"value": "5.5"
}... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
12,156 | retail_world | bird:train.json:6582 | Who is the Sales Agent for the company 'Eastern Connection'? | SELECT ContactName FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactTitle = 'Sales Agent' | [
"Who",
"is",
"the",
"Sales",
"Agent",
"for",
"the",
"company",
"'",
"Eastern",
"Connection",
"'",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Eastern Connection"
},
{
"id": 4,
"type": "column",
"value": "contacttitle"
},
{
"id": 1,
"type": "column",
"value": "contactname"
},
{
"id": 2,
"type": "column",
"value": "companyname"
},
{
"id": 5,
"type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
12,163 | customers_and_invoices | spider:train_spider.json:1621 | Show all product names and the number of customers having an order on each product. | SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name | [
"Show",
"all",
"product",
"names",
"and",
"the",
"number",
"of",
"customers",
"having",
"an",
"order",
"on",
"each",
"product",
"."
] | [
{
"id": 0,
"type": "column",
"value": "product_name"
},
{
"id": 2,
"type": "table",
"value": "order_items"
},
{
"id": 5,
"type": "column",
"value": "product_id"
},
{
"id": 3,
"type": "table",
"value": "products"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
1,290 | store_1 | spider:train_spider.json:585 | How many customers does Steve Johnson support? | SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "Steve" AND T1.last_name = "Johnson"; | [
"How",
"many",
"customers",
"does",
"Steve",
"Johnson",
"support",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "support_rep_id"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 1,
"type": "table",
"value": "customers"
},
{
"id": 6,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"B-COLUMN",
"O"
] |
2,340 | movie_2 | bird:test.json:1835 | Find the name of the movie that is played in the most number of theaters. | SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code = T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1 | [
"Find",
"the",
"name",
"of",
"the",
"movie",
"that",
"is",
"played",
"in",
"the",
"most",
"number",
"of",
"theaters",
"."
] | [
{
"id": 2,
"type": "table",
"value": "movietheaters"
},
{
"id": 1,
"type": "table",
"value": "movies"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 4,
"type": "column",
"value": "movie"
},
{
"id": 3,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"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",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
14,614 | game_1 | spider:train_spider.json:6005 | Show last names for all student who are on scholarship. | SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' | [
"Show",
"last",
"names",
"for",
"all",
"student",
"who",
"are",
"on",
"scholarship",
"."
] | [
{
"id": 3,
"type": "column",
"value": "onscholarship"
},
{
"id": 1,
"type": "table",
"value": "sportsinfo"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "lname"
},
{
"id": 5,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
7,527 | university | bird:train.json:8074 | What is the name of the university with the most international students in 2011? | SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.pct_international_students DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"university",
"with",
"the",
"most",
"international",
"students",
"in",
"2011",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "pct_international_students"
},
{
"id": 0,
"type": "column",
"value": "university_name"
},
{
"id": 1,
"type": "table",
"value": "university_year"
},
{
"id": 6,
"type": "column",
"value": "university_id"
},
{
"i... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
7,811 | movie_3 | bird:train.json:9215 | List the films' titles which were rented on 24th May,2005. | SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE SUBSTR(T3.rental_date, 1, 10) = '2005-05-24' | [
"List",
"the",
"films",
"'",
"titles",
"which",
"were",
"rented",
"on",
"24th",
"May,2005",
"."
] | [
{
"id": 5,
"type": "column",
"value": "inventory_id"
},
{
"id": 6,
"type": "column",
"value": "rental_date"
},
{
"id": 2,
"type": "value",
"value": "2005-05-24"
},
{
"id": 4,
"type": "table",
"value": "inventory"
},
{
"id": 9,
"type": "column",... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
6,669 | world_development_indicators | bird:train.json:2191 | How many countries uses the 1968 System of National Accounts methodology? | SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' | [
"How",
"many",
"countries",
"uses",
"the",
"1968",
"System",
"of",
"National",
"Accounts",
"methodology",
"?"
] | [
{
"id": 2,
"type": "value",
"value": "Country uses the 1968 System of National Accounts methodology."
},
{
"id": 1,
"type": "column",
"value": "systemofnationalaccounts"
},
{
"id": 3,
"type": "column",
"value": "countrycode"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7,
8,
9
]
},
{
"entity_id": 2,
"token_idxs": [
3,
4,
5,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
... | [
"O",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
16,026 | retails | bird:train.json:6873 | Which supplier can provide the most number of "hot spring dodger dim light"? Please give the supplier's phone number. | SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T2.ps_availqty DESC LIMIT 1 | [
"Which",
"supplier",
"can",
"provide",
"the",
"most",
"number",
"of",
"\"",
"hot",
"spring",
"dodger",
"dim",
"light",
"\"",
"?",
"Please",
"give",
"the",
"supplier",
"'s",
"phone",
"number",
"."
] | [
{
"id": 3,
"type": "value",
"value": "hot spring dodger dim light"
},
{
"id": 4,
"type": "column",
"value": "ps_availqty"
},
{
"id": 7,
"type": "column",
"value": "ps_suppkey"
},
{
"id": 10,
"type": "column",
"value": "ps_partkey"
},
{
"id": 8,
... | [
{
"entity_id": 0,
"token_idxs": [
21
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11,
12,
13
]
},
{
"entity_id": 4,
"token_idx... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
9,324 | hr_1 | spider:train_spider.json:3412 | What are all the employees without a department number? | SELECT * FROM employees WHERE department_id = "null" | [
"What",
"are",
"all",
"the",
"employees",
"without",
"a",
"department",
"number",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "department_id"
},
{
"id": 0,
"type": "table",
"value": "employees"
},
{
"id": 2,
"type": "column",
"value": "null"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
152 | customers_and_products_contacts | spider:train_spider.json:5655 | Show each state and the number of addresses in each state. | SELECT state_province_county , count(*) FROM addresses GROUP BY state_province_county | [
"Show",
"each",
"state",
"and",
"the",
"number",
"of",
"addresses",
"in",
"each",
"state",
"."
] | [
{
"id": 1,
"type": "column",
"value": "state_province_county"
},
{
"id": 0,
"type": "table",
"value": "addresses"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
15,383 | customers_and_addresses | spider:train_spider.json:6093 | List the countries having more than 4 addresses listed. | SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4 | [
"List",
"the",
"countries",
"having",
"more",
"than",
"4",
"addresses",
"listed",
"."
] | [
{
"id": 3,
"type": "column",
"value": "address_id"
},
{
"id": 0,
"type": "table",
"value": "addresses"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 2,
"type": "value",
"value": "4"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O"
] |
11,369 | regional_sales | bird:train.json:2710 | Among sales teams in Midwest region, which sales team has an order quantity greater than 5? | SELECT DISTINCT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'Midwest' AND T1.`Order Quantity` > 5 | [
"Among",
"sales",
"teams",
"in",
"Midwest",
"region",
",",
"which",
"sales",
"team",
"has",
"an",
"order",
"quantity",
"greater",
"than",
"5",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "Order Quantity"
},
{
"id": 1,
"type": "table",
"value": "Sales Orders"
},
{
"id": 4,
"type": "column",
"value": "_salesteamid"
},
{
"id": 3,
"type": "column",
"value": "salesteamid"
},
{
"id": 0,
"type": "... | [
{
"entity_id": 0,
"token_idxs": [
1,
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
7,657 | movie_3 | bird:train.json:9126 | How many films are there under the category of "Horror"? | SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Horror' | [
"How",
"many",
"films",
"are",
"there",
"under",
"the",
"category",
"of",
"\"",
"Horror",
"\"",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "film_category"
},
{
"id": 5,
"type": "column",
"value": "category_id"
},
{
"id": 1,
"type": "table",
"value": "category"
},
{
"id": 4,
"type": "column",
"value": "film_id"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
6,252 | regional_sales | bird:train.json:2648 | Calculate ratio between the highest unit cost and the lowest unit cost? | SELECT ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) / ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 ) | [
"Calculate",
"ratio",
"between",
"the",
"highest",
"unit",
"cost",
"and",
"the",
"lowest",
"unit",
"cost",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "Sales Orders"
},
{
"id": 1,
"type": "column",
"value": "Unit Cost"
},
{
"id": 2,
"type": "value",
"value": ","
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
6,
10,
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,822 | codebase_community | bird:dev.json:625 | How many users were from New York? | SELECT COUNT(Id) FROM users WHERE Location = 'New York' | [
"How",
"many",
"users",
"were",
"from",
"New",
"York",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "location"
},
{
"id": 2,
"type": "value",
"value": "New York"
},
{
"id": 0,
"type": "table",
"value": "users"
},
{
"id": 3,
"type": "column",
"value": "id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
10,796 | e_government | spider:train_spider.json:6341 | Return the party email that has used party services the greatest number of times. | SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1 | [
"Return",
"the",
"party",
"email",
"that",
"has",
"used",
"party",
"services",
"the",
"greatest",
"number",
"of",
"times",
"."
] | [
{
"id": 2,
"type": "table",
"value": "party_services"
},
{
"id": 0,
"type": "column",
"value": "party_email"
},
{
"id": 4,
"type": "column",
"value": "customer_id"
},
{
"id": 3,
"type": "column",
"value": "party_id"
},
{
"id": 1,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
7,260 | formula_1 | spider:train_spider.json:2153 | What is the name of the race held most recently? | SELECT name FROM races ORDER BY date DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"race",
"held",
"most",
"recently",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "races"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 2,
"type": "column",
"value": "date"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,812 | cre_Drama_Workshop_Groups | spider:train_spider.json:5142 | What are the order details of the products with price higher than 2000? | SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 | [
"What",
"are",
"the",
"order",
"details",
"of",
"the",
"products",
"with",
"price",
"higher",
"than",
"2000",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "other_item_details"
},
{
"id": 3,
"type": "column",
"value": "product_price"
},
{
"id": 1,
"type": "table",
"value": "order_items"
},
{
"id": 5,
"type": "column",
"value": "product_id"
},
{
"id": 2,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
2,296 | customers_campaigns_ecommerce | spider:train_spider.json:4633 | Show the shipping charge and customer id for customer orders with order status Cancelled or Paid. | SELECT order_shipping_charges , customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid' | [
"Show",
"the",
"shipping",
"charge",
"and",
"customer",
"i",
"d",
"for",
"customer",
"orders",
"with",
"order",
"status",
"Cancelled",
"or",
"Paid",
"."
] | [
{
"id": 1,
"type": "column",
"value": "order_shipping_charges"
},
{
"id": 3,
"type": "column",
"value": "order_status_code"
},
{
"id": 0,
"type": "table",
"value": "customer_orders"
},
{
"id": 2,
"type": "column",
"value": "customer_id"
},
{
"id": ... | [
{
"entity_id": 0,
"token_idxs": [
9,
10
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
11,561 | public_review_platform | bird:train.json:4006 | How many businesses that are registered in the database can be attributed to 'Good for Kids'? | SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'Good for Kids' AND T2.attribute_value = 'true' | [
"How",
"many",
"businesses",
"that",
"are",
"registered",
"in",
"the",
"database",
"can",
"be",
"attributed",
"to",
"'",
"Good",
"for",
"Kids",
"'",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "business_attributes"
},
{
"id": 6,
"type": "column",
"value": "attribute_value"
},
{
"id": 4,
"type": "column",
"value": "attribute_name"
},
{
"id": 5,
"type": "value",
"value": "Good for Kids"
},
{
"id": 3,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
4,342 | document_management | spider:train_spider.json:4524 | What are the average access counts of documents that have the functional area description "Acknowledgement"? | SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = "Acknowledgement" | [
"What",
"are",
"the",
"average",
"access",
"counts",
"of",
"documents",
"that",
"have",
"the",
"functional",
"area",
"description",
"\"",
"Acknowledgement",
"\"",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "functional_area_description"
},
{
"id": 5,
"type": "table",
"value": "document_functional_areas"
},
{
"id": 6,
"type": "column",
"value": "functional_area_code"
},
{
"id": 0,
"type": "table",
"value": "functional_area... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
12,884 | retails | bird:train.json:6696 | For the order with the total price of 218195.43, which supplier handled the returned item? Give the supplier id. | SELECT T2.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_totalprice = 218195.43 AND T2.l_returnflag = 'R' | [
"For",
"the",
"order",
"with",
"the",
"total",
"price",
"of",
"218195.43",
",",
"which",
"supplier",
"handled",
"the",
"returned",
"item",
"?",
"Give",
"the",
"supplier",
"i",
"d."
] | [
{
"id": 5,
"type": "column",
"value": "o_totalprice"
},
{
"id": 7,
"type": "column",
"value": "l_returnflag"
},
{
"id": 3,
"type": "column",
"value": "o_orderkey"
},
{
"id": 4,
"type": "column",
"value": "l_orderkey"
},
{
"id": 0,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
8,727 | donor | bird:train.json:3250 | List the resource types available at Sax Arts & Crafts. | SELECT DISTINCT project_resource_type FROM resources WHERE vendor_name = 'Sax Arts & Crafts' | [
"List",
"the",
"resource",
"types",
"available",
"at",
"Sax",
"Arts",
"&",
"Crafts",
"."
] | [
{
"id": 1,
"type": "column",
"value": "project_resource_type"
},
{
"id": 3,
"type": "value",
"value": "Sax Arts & Crafts"
},
{
"id": 2,
"type": "column",
"value": "vendor_name"
},
{
"id": 0,
"type": "table",
"value": "resources"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,491 | superstore | bird:train.json:2372 | Which item was shipped on 3/4/2013 and scheduled for same day delivery in the South region? | SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2013-03-04' AND T2.Region = 'South' AND T1.`Order Date` = '2013-03-04' | [
"Which",
"item",
"was",
"shipped",
"on",
"3/4/2013",
"and",
"scheduled",
"for",
"same",
"day",
"delivery",
"in",
"the",
"South",
"region",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "south_superstore"
},
{
"id": 0,
"type": "column",
"value": "Product Name"
},
{
"id": 3,
"type": "column",
"value": "Product ID"
},
{
"id": 5,
"type": "value",
"value": "2013-03-04"
},
{
"id": 8,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
7,999 | address | bird:train.json:5153 | What is the area code of the city with the largest land area? | SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.land_area = ( SELECT MAX(land_area) FROM zip_data ) | [
"What",
"is",
"the",
"area",
"code",
"of",
"the",
"city",
"with",
"the",
"largest",
"land",
"area",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "area_code"
},
{
"id": 1,
"type": "table",
"value": "area_code"
},
{
"id": 3,
"type": "column",
"value": "land_area"
},
{
"id": 2,
"type": "table",
"value": "zip_data"
},
{
"id": 4,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
2,546 | movie_platform | bird:train.json:33 | Among the lists created by user 4208563, which one has the highest number of followers? Indicate how many followers it has and whether the user was a subscriber or not when he created the list. | SELECT T1.list_followers, T2.user_subscriber = 1 FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id AND T2.list_id = T2.list_id WHERE T2.user_id = 4208563 ORDER BY T1.list_followers DESC LIMIT 1 | [
"Among",
"the",
"lists",
"created",
"by",
"user",
"4208563",
",",
"which",
"one",
"has",
"the",
"highest",
"number",
"of",
"followers",
"?",
"Indicate",
"how",
"many",
"followers",
"it",
"has",
"and",
"whether",
"the",
"user",
"was",
"a",
"subscriber",
"or... | [
{
"id": 5,
"type": "column",
"value": "user_subscriber"
},
{
"id": 0,
"type": "column",
"value": "list_followers"
},
{
"id": 2,
"type": "table",
"value": "lists_users"
},
{
"id": 3,
"type": "column",
"value": "user_id"
},
{
"id": 4,
"type": "va... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
26
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
8,279 | formula_1 | bird:dev.json:879 | For the driver who set the fastest lap speed, what is his nationality? | SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId ORDER BY T2.fastestLapSpeed DESC LIMIT 1 | [
"For",
"the",
"driver",
"who",
"set",
"the",
"fastest",
"lap",
"speed",
",",
"what",
"is",
"his",
"nationality",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "fastestlapspeed"
},
{
"id": 0,
"type": "column",
"value": "nationality"
},
{
"id": 4,
"type": "column",
"value": "driverid"
},
{
"id": 1,
"type": "table",
"value": "drivers"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
10,391 | movies_4 | bird:train.json:494 | State the genre of the movie title with a runtime of only 14 minutes. | SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.runtime = 14 | [
"State",
"the",
"genre",
"of",
"the",
"movie",
"title",
"with",
"a",
"runtime",
"of",
"only",
"14",
"minutes",
"."
] | [
{
"id": 5,
"type": "table",
"value": "movie_genres"
},
{
"id": 0,
"type": "column",
"value": "genre_name"
},
{
"id": 6,
"type": "column",
"value": "genre_id"
},
{
"id": 7,
"type": "column",
"value": "movie_id"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
5,977 | cre_Doc_and_collections | bird:test.json:715 | For document subset named 'Best for 2000', List all document id that in this subset. | SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = "Best for 2000"; | [
"For",
"document",
"subset",
"named",
"'",
"Best",
"for",
"2000",
"'",
",",
"List",
"all",
"document",
"i",
"d",
"that",
"in",
"this",
"subset",
"."
] | [
{
"id": 1,
"type": "table",
"value": "document_subset_members"
},
{
"id": 3,
"type": "column",
"value": "document_subset_name"
},
{
"id": 0,
"type": "column",
"value": "document_object_id"
},
{
"id": 5,
"type": "column",
"value": "document_subset_id"
},
... | [
{
"entity_id": 0,
"token_idxs": [
12,
13,
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
1,
2
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
14,739 | movie_1 | spider:train_spider.json:2519 | For each movie that received more than 3 reviews, what is the average rating? | SELECT mID , avg(stars) FROM Rating GROUP BY mID HAVING count(*) >= 2 | [
"For",
"each",
"movie",
"that",
"received",
"more",
"than",
"3",
"reviews",
",",
"what",
"is",
"the",
"average",
"rating",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "rating"
},
{
"id": 3,
"type": "column",
"value": "stars"
},
{
"id": 1,
"type": "column",
"value": "mid"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
10,147 | chinook_1 | spider:train_spider.json:810 | What are the names of different music genres? | SELECT Name FROM GENRE | [
"What",
"are",
"the",
"names",
"of",
"different",
"music",
"genres",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "genre"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
1,876 | college_1 | spider:train_spider.json:3283 | What is the code of the course which the student whose last name is Smithson took? | SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson' | [
"What",
"is",
"the",
"code",
"of",
"the",
"course",
"which",
"the",
"student",
"whose",
"last",
"name",
"is",
"Smithson",
"took",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "class_code"
},
{
"id": 2,
"type": "column",
"value": "stu_lname"
},
{
"id": 0,
"type": "column",
"value": "crs_code"
},
{
"id": 3,
"type": "value",
"value": "Smithson"
},
{
"id": 1,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
16
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE"
] |
13,213 | student_1 | spider:train_spider.json:4076 | Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. | SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "OTHA" AND T2.lastname = "MOYER" | [
"Find",
"all",
"first",
"-",
"grade",
"students",
"who",
"are",
"NOT",
"taught",
"by",
"OTHA",
"MOYER",
".",
"Report",
"their",
"first",
"and",
"last",
"names",
"."
] | [
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 6,
"type": "column",
"value": "classroom"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 3,
"type": "table",
"value": "teachers"
},
{
"id": 4,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
18,
19
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
11,991 | phone_1 | spider:train_spider.json:1032 | List the hardware model name and company name for the phone whose screen mode type is "Graphics." | SELECT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Graphics"; | [
"List",
"the",
"hardware",
"model",
"name",
"and",
"company",
"name",
"for",
"the",
"phone",
"whose",
"screen",
"mode",
"type",
"is",
"\"",
"Graphics",
".",
"\""
] | [
{
"id": 0,
"type": "column",
"value": "hardware_model_name"
},
{
"id": 6,
"type": "column",
"value": "graphics_mode"
},
{
"id": 1,
"type": "column",
"value": "company_name"
},
{
"id": 2,
"type": "table",
"value": "screen_mode"
},
{
"id": 7,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6,
7
]
},
{
"entity_id": 2,
"token_idxs": [
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
1,163 | retail_world | bird:train.json:6366 | How many orders were shipped to GREAL via United Package? | SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.CustomerID = 'GREAL' AND T2.CompanyName = 'United Package' | [
"How",
"many",
"orders",
"were",
"shipped",
"to",
"GREAL",
"via",
"United",
"Package",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "United Package"
},
{
"id": 7,
"type": "column",
"value": "companyname"
},
{
"id": 5,
"type": "column",
"value": "customerid"
},
{
"id": 4,
"type": "column",
"value": "shipperid"
},
{
"id": 1,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"O"
] |
12,471 | bike_racing | bird:test.json:1475 | What are the name and result of the cyclists not from 'Russia' ? | SELECT name , RESULT FROM cyclist WHERE nation != 'Russia' | [
"What",
"are",
"the",
"name",
"and",
"result",
"of",
"the",
"cyclists",
"not",
"from",
"'",
"Russia",
"'",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "cyclist"
},
{
"id": 2,
"type": "column",
"value": "result"
},
{
"id": 3,
"type": "column",
"value": "nation"
},
{
"id": 4,
"type": "value",
"value": "Russia"
},
{
"id": 1,
"type": "column",
"value": "na... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
4,304 | movies_4 | bird:train.json:479 | The movie 'Gojira ni-sen mireniamu' is from which country? | SELECT T3.COUNTry_name FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T1.title = 'Gojira ni-sen mireniamu' | [
"The",
"movie",
"'",
"Gojira",
"ni",
"-",
"sen",
"mireniamu",
"'",
"is",
"from",
"which",
"country",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Gojira ni-sen mireniamu"
},
{
"id": 5,
"type": "table",
"value": "production_country"
},
{
"id": 0,
"type": "column",
"value": "country_name"
},
{
"id": 6,
"type": "column",
"value": "country_id"
},
{
"id": 7,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3,
4,
5,
6,
7
]
},
{
"entity_id": 4,
"token_idxs": [
1
... | [
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
2,697 | university | bird:train.json:8062 | Provide the ranking system name for the "Quality of Education Rank" criteria. | SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Quality of Education Rank' | [
"Provide",
"the",
"ranking",
"system",
"name",
"for",
"the",
"\"",
"Quality",
"of",
"Education",
"Rank",
"\"",
"criteria",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Quality of Education Rank"
},
{
"id": 6,
"type": "column",
"value": "ranking_system_id"
},
{
"id": 2,
"type": "table",
"value": "ranking_criteria"
},
{
"id": 1,
"type": "table",
"value": "ranking_system"
},
{
"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8,
9,
1... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O"
] |
5,617 | bike_1 | spider:train_spider.json:208 | What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips | SELECT name FROM station WHERE city = "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100 | [
"What",
"are",
"the",
"names",
"of",
"the",
"stations",
"that",
"are",
"located",
"in",
"Palo",
"Alto",
"but",
"have",
"never",
"been",
"the",
"ending",
"point",
"of",
"the",
"trips"
] | [
{
"id": 2,
"type": "column",
"value": "end_station_name"
},
{
"id": 5,
"type": "column",
"value": "Palo Alto"
},
{
"id": 0,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "table",
"value": "trip"
},
{
"id": 3,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
22
]
},
{
"entity_id": 2,
"token_idxs": [
18
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE"
] |
1,796 | soccer_2016 | bird:train.json:1818 | In the database, how many times is the number of Indian cities to the South African cities? | SELECT CAST(SUM(CASE WHEN T2.Country_Name = 'India' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.Country_Name = 'South Africa' THEN 1 ELSE 0 END) FROM City AS T1 INNER JOIN Country AS T2 ON T1.Country_Id = T2.Country_Id | [
"In",
"the",
"database",
",",
"how",
"many",
"times",
"is",
"the",
"number",
"of",
"Indian",
"cities",
"to",
"the",
"South",
"African",
"cities",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "country_name"
},
{
"id": 6,
"type": "value",
"value": "South Africa"
},
{
"id": 2,
"type": "column",
"value": "country_id"
},
{
"id": 1,
"type": "table",
"value": "country"
},
{
"id": 7,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
12,
17
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
11,792 | hr_1 | spider:train_spider.json:3480 | What are the names of departments that have at least one employee. | SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id | [
"What",
"are",
"the",
"names",
"of",
"departments",
"that",
"have",
"at",
"least",
"one",
"employee",
"."
] | [
{
"id": 0,
"type": "column",
"value": "department_name"
},
{
"id": 3,
"type": "column",
"value": "department_id"
},
{
"id": 2,
"type": "table",
"value": "departments"
},
{
"id": 1,
"type": "table",
"value": "employees"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"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-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
400 | shakespeare | bird:train.json:2993 | What is the description of the chapter with the longest number of paragraphs? | SELECT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id ORDER BY T1.ParagraphNum DESC LIMIT 1 | [
"What",
"is",
"the",
"description",
"of",
"the",
"chapter",
"with",
"the",
"longest",
"number",
"of",
"paragraphs",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "paragraphnum"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "paragraphs"
},
{
"id": 4,
"type": "column",
"value": "chapter_id"
},
{
"id": 2,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"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,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
12,303 | culture_company | spider:train_spider.json:6985 | Count the number of different directors. | SELECT COUNT (DISTINCT director) FROM movie | [
"Count",
"the",
"number",
"of",
"different",
"directors",
"."
] | [
{
"id": 1,
"type": "column",
"value": "director"
},
{
"id": 0,
"type": "table",
"value": "movie"
}
] | [
{
"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"
] |
8,445 | allergy_1 | spider:train_spider.json:475 | Show all student ids who are older than 20. | SELECT StuID FROM Student WHERE age > 20 | [
"Show",
"all",
"student",
"ids",
"who",
"are",
"older",
"than",
"20",
"."
] | [
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 1,
"type": "column",
"value": "stuid"
},
{
"id": 2,
"type": "column",
"value": "age"
},
{
"id": 3,
"type": "value",
"value": "20"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
3,443 | retail_complains | bird:train.json:315 | What is the average age of Norwalk clients? | SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T1.age) AS average FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Norwalk' | [
"What",
"is",
"the",
"average",
"age",
"of",
"Norwalk",
"clients",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "district_id"
},
{
"id": 1,
"type": "table",
"value": "district"
},
{
"id": 3,
"type": "value",
"value": "Norwalk"
},
{
"id": 0,
"type": "table",
"value": "client"
},
{
"id": 2,
"type": "column",
"value... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
7,397 | candidate_poll | spider:train_spider.json:2419 | What is the sex of the candidate who had the highest unsure rate? | SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1 | [
"What",
"is",
"the",
"sex",
"of",
"the",
"candidate",
"who",
"had",
"the",
"highest",
"unsure",
"rate",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "unsure_rate"
},
{
"id": 2,
"type": "table",
"value": "candidate"
},
{
"id": 3,
"type": "column",
"value": "people_id"
},
{
"id": 1,
"type": "table",
"value": "people"
},
{
"id": 0,
"type": "column",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,654 | aan_1 | bird:test.json:967 | How many affiliations do we have? | SELECT count(*) FROM Affiliation | [
"How",
"many",
"affiliations",
"do",
"we",
"have",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "affiliation"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
8,818 | codebase_community | bird:dev.json:711 | Among products comments with 0 score, what is the total number of users ages 40 years old? | SELECT COUNT(DISTINCT T1.id) FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score = 0 AND T2.Age = 40 | [
"Among",
"products",
"comments",
"with",
"0",
"score",
",",
"what",
"is",
"the",
"total",
"number",
"of",
"users",
"ages",
"40",
"years",
"old",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "comments"
},
{
"id": 3,
"type": "column",
"value": "userid"
},
{
"id": 1,
"type": "table",
"value": "users"
},
{
"id": 4,
"type": "column",
"value": "score"
},
{
"id": 6,
"type": "column",
"value": "age... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O"
] |
14,120 | music_platform_2 | bird:train.json:7967 | Which "music" podcast has the longest title? | SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'music' ORDER BY LENGTH(T2.title) DESC LIMIT 1 | [
"Which",
"\"",
"music",
"\"",
"podcast",
"has",
"the",
"longest",
"title",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "categories"
},
{
"id": 5,
"type": "column",
"value": "podcast_id"
},
{
"id": 2,
"type": "table",
"value": "podcasts"
},
{
"id": 3,
"type": "column",
"value": "category"
},
{
"id": 0,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
7,711 | restaurant_bills | bird:test.json:640 | Show distinct managers of branches. | SELECT DISTINCT Manager FROM branch | [
"Show",
"distinct",
"managers",
"of",
"branches",
"."
] | [
{
"id": 1,
"type": "column",
"value": "manager"
},
{
"id": 0,
"type": "table",
"value": "branch"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"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",
"B-TABLE",
"O"
] |
1,424 | news_report | spider:train_spider.json:2814 | Show the names of journalists and the number of events they reported. | SELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name | [
"Show",
"the",
"names",
"of",
"journalists",
"and",
"the",
"number",
"of",
"events",
"they",
"reported",
"."
] | [
{
"id": 4,
"type": "column",
"value": "journalist_id"
},
{
"id": 2,
"type": "table",
"value": "news_report"
},
{
"id": 1,
"type": "table",
"value": "journalist"
},
{
"id": 5,
"type": "column",
"value": "event_id"
},
{
"id": 3,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O"
] |
4,915 | world | bird:train.json:7887 | What is the average life expentancy of countries that speak Arabic? | SELECT AVG(T1.LifeExpectancy) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic' | [
"What",
"is",
"the",
"average",
"life",
"expentancy",
"of",
"countries",
"that",
"speak",
"Arabic",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "countrylanguage"
},
{
"id": 4,
"type": "column",
"value": "lifeexpectancy"
},
{
"id": 6,
"type": "column",
"value": "countrycode"
},
{
"id": 2,
"type": "column",
"value": "language"
},
{
"id": 0,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
10,651 | movielens | bird:train.json:2339 | How many female actresses appeared in the movie 2312852, what country was it in, and what was it's running time? | SELECT SUM(IIF(T1.a_gender = 'F', 1, 0)) , T3.country, T3.runningtime FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T2.movieid = 2312852 GROUP BY T3.country, T3.runningtime | [
"How",
"many",
"female",
"actresses",
"appeared",
"in",
"the",
"movie",
"2312852",
",",
"what",
"country",
"was",
"it",
"in",
",",
"and",
"what",
"was",
"it",
"'s",
"running",
"time",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "movies2actors"
},
{
"id": 1,
"type": "column",
"value": "runningtime"
},
{
"id": 10,
"type": "column",
"value": "a_gender"
},
{
"id": 0,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
21,
22
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
... | [
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
13,760 | image_and_language | bird:train.json:7521 | What are the captions of all the self-relation relationship prediction classes? | SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN pred_classes AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID GROUP BY T2.PRED_CLASS | [
"What",
"are",
"the",
"captions",
"of",
"all",
"the",
"self",
"-",
"relation",
"relationship",
"prediction",
"classes",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "obj1_sample_id"
},
{
"id": 4,
"type": "column",
"value": "obj2_sample_id"
},
{
"id": 5,
"type": "column",
"value": "pred_class_id"
},
{
"id": 2,
"type": "table",
"value": "pred_classes"
},
{
"id": 0,
"type... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
936 | food_inspection | bird:train.json:8807 | How many foodborne illness investigations were done in 2014? | SELECT COUNT(business_id) FROM inspections WHERE STRFTIME('%Y', `date`) = '2014' AND type = 'Foodborne Illness Investigation' | [
"How",
"many",
"foodborne",
"illness",
"investigations",
"were",
"done",
"in",
"2014",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Foodborne Illness Investigation"
},
{
"id": 0,
"type": "table",
"value": "inspections"
},
{
"id": 1,
"type": "column",
"value": "business_id"
},
{
"id": 2,
"type": "value",
"value": "2014"
},
{
"id": 3,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"O"
] |
1,894 | book_1 | bird:test.json:553 | Show the client name who has the most total amount of books ordered. | SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient = T2.idClient JOIN Books_Order AS T3 ON T3.idOrder = T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1 | [
"Show",
"the",
"client",
"name",
"who",
"has",
"the",
"most",
"total",
"amount",
"of",
"books",
"ordered",
"."
] | [
{
"id": 2,
"type": "table",
"value": "books_order"
},
{
"id": 0,
"type": "column",
"value": "idclient"
},
{
"id": 5,
"type": "column",
"value": "idorder"
},
{
"id": 3,
"type": "table",
"value": "orders"
},
{
"id": 4,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entit... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-TABLE",
"O"
] |
14,405 | movie_3 | bird:train.json:9206 | How many percent of customers were inactive? | SELECT CAST(SUM(IIF(active = 0, 1, 0)) AS REAL) * 100 / COUNT(customer_id) FROM customer | [
"How",
"many",
"percent",
"of",
"customers",
"were",
"inactive",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "customer"
},
{
"id": 5,
"type": "column",
"value": "active"
},
{
"id": 1,
"type": "value",
"value": "100"
},
{
"id": 3,
"type": "value",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
6
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O"
] |
1,403 | airline | bird:train.json:5865 | What is the name of the airline with the highest number of non-cancelled flights? | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.CANCELLED = 0 GROUP BY T2.Description ORDER BY COUNT(T1.CANCELLED) DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"airline",
"with",
"the",
"highest",
"number",
"of",
"non",
"-",
"cancelled",
"flights",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 2,
"type": "table",
"value": "Air Carriers"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 3,
"type": "column",
"value": "cancelled"
},
{
"id": 1,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
2,167 | university | bird:train.json:8129 | In what year does the Brown University score the highest? | SELECT T1.year FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Brown University' ORDER BY T1.score DESC LIMIT 1 | [
"In",
"what",
"year",
"does",
"the",
"Brown",
"University",
"score",
"the",
"highest",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "university_ranking_year"
},
{
"id": 4,
"type": "value",
"value": "Brown University"
},
{
"id": 3,
"type": "column",
"value": "university_name"
},
{
"id": 6,
"type": "column",
"value": "university_id"
},
{
"id":... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O"
] |
2,621 | world_development_indicators | bird:train.json:2124 | What are the sources for the data of children who finished primary school education in North American countries? | SELECT DISTINCT T3.Description FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T2.CountryCode = T3.Countrycode WHERE T1.Region = 'North America' AND T2.IndicatorName = 'Out-of-school children of primary school age, both sexes (number)' | [
"What",
"are",
"the",
"sources",
"for",
"the",
"data",
"of",
"children",
"who",
"finished",
"primary",
"school",
"education",
"in",
"North",
"American",
"countries",
"?"
] | [
{
"id": 8,
"type": "value",
"value": "Out-of-school children of primary school age, both sexes (number)"
},
{
"id": 6,
"type": "value",
"value": "North America"
},
{
"id": 7,
"type": "column",
"value": "indicatorname"
},
{
"id": 1,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
17
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
2,647 | club_leader | bird:test.json:659 | What is the average age of all the club leaders? | SELECT avg(T2.age) FROM club_leader AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id | [
"What",
"is",
"the",
"average",
"age",
"of",
"all",
"the",
"club",
"leaders",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "club_leader"
},
{
"id": 3,
"type": "column",
"value": "member_id"
},
{
"id": 1,
"type": "table",
"value": "member"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8,
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
7,956 | club_leader | bird:test.json:660 | Which club name contains the string 'state'? | SELECT club_name FROM club WHERE club_name LIKE '%state%' | [
"Which",
"club",
"name",
"contains",
"the",
"string",
"'",
"state",
"'",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "club_name"
},
{
"id": 2,
"type": "value",
"value": "%state%"
},
{
"id": 0,
"type": "table",
"value": "club"
}
] | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
8,288 | car_retails | bird:train.json:1600 | How many customers with a canceled shipment have a credit limit greater than 115,000? | SELECT COUNT(T1.customerNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.status = 'Cancelled' AND T1.creditLimit > 115000 | [
"How",
"many",
"customers",
"with",
"a",
"canceled",
"shipment",
"have",
"a",
"credit",
"limit",
"greater",
"than",
"115,000",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "customernumber"
},
{
"id": 5,
"type": "column",
"value": "creditlimit"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 4,
"type": "value",
"value": "Cancelled"
},
{
"id": 1,
"type": "table",... | [
{
"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",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
4,557 | soccer_2 | spider:train_spider.json:5031 | How many schools have students playing in goalie and mid-field positions? | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') | [
"How",
"many",
"schools",
"have",
"students",
"playing",
"in",
"goalie",
"and",
"mid",
"-",
"field",
"positions",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "tryout"
},
{
"id": 3,
"type": "value",
"value": "goalie"
},
{
"id": 1,
"type": "column",
"value": "cname"
},
{
"id": 2,
"type": "column",
"value": "ppos"
},
{
"id": 4,
"type": "value",
"value": "mid"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
1,312 | public_review_platform | bird:train.json:3902 | How many users received high compliment type in photo? | SELECT COUNT(T1.user_id) FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.number_of_compliments LIKE 'High' AND T2.compliment_id = 1 | [
"How",
"many",
"users",
"received",
"high",
"compliment",
"type",
"in",
"photo",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "number_of_compliments"
},
{
"id": 0,
"type": "table",
"value": "users_compliments"
},
{
"id": 3,
"type": "column",
"value": "compliment_id"
},
{
"id": 1,
"type": "table",
"value": "compliments"
},
{
"id": 2,
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.