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 |
|---|---|---|---|---|---|---|---|---|
5,899 | cre_Drama_Workshop_Groups | spider:train_spider.json:5102 | Show the minimum, average, maximum order quantity of all invoices. | SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES | [
"Show",
"the",
"minimum",
",",
"average",
",",
"maximum",
"order",
"quantity",
"of",
"all",
"invoices",
"."
] | [
{
"id": 1,
"type": "column",
"value": "order_quantity"
},
{
"id": 0,
"type": "table",
"value": "invoices"
}
] | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,900 | restaurant_bills | bird:test.json:639 | Which customers have total order quantity greater than 1? Give me the customer names. | SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID = T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity) > 1 | [
"Which",
"customers",
"have",
"total",
"order",
"quantity",
"greater",
"than",
"1",
"?",
"Give",
"me",
"the",
"customer",
"names",
"."
] | [
{
"id": 2,
"type": "table",
"value": "customer_order"
},
{
"id": 4,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "customer"
},
{
"id": 5,
"type": "column",
"value": "quantity"
},
{
"id": 0,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
14
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
5,901 | movie_3 | bird:train.json:9183 | What is the full name of the customer who rented movies for 7 consecutive days? | SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN ( SELECT customer_id, COUNT(*) AS num_days FROM ( SELECT *, date(days, '-' || rn || ' day') AS results FROM ( SELECT customer_id, days, row_number() OVER (PARTITION BY customer_id ORDER BY days) AS rn FROM ( SELECT DISTINCT customer_id, date(rental_date)... | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"customer",
"who",
"rented",
"movies",
"for",
"7",
"consecutive",
"days",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 12,
"type": "column",
"value": "rental_date"
},
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 2,
"type": "table"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
5,902 | codebase_comments | bird:train.json:598 | Please list all the paths of the solutions containing files within the repository whose url is "https://github.com/maxild/playground.git". | SELECT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/maxild/playground.git' | [
"Please",
"list",
"all",
"the",
"paths",
"of",
"the",
"solutions",
"containing",
"files",
"within",
"the",
"repository",
"whose",
"url",
"is",
"\"",
"https://github.com/maxild/playground.git",
"\"",
"."
] | [
{
"id": 4,
"type": "value",
"value": "https://github.com/maxild/playground.git"
},
{
"id": 2,
"type": "table",
"value": "solution"
},
{
"id": 6,
"type": "column",
"value": "repoid"
},
{
"id": 0,
"type": "column",
"value": "path"
},
{
"id": 1,
"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
17
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
5,903 | student_loan | bird:train.json:4562 | How many disabled students have zero absences? | SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name WHERE T2.month = 0 | [
"How",
"many",
"disabled",
"students",
"have",
"zero",
"absences",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "longest_absense_from_school"
},
{
"id": 0,
"type": "table",
"value": "disabled"
},
{
"id": 2,
"type": "column",
"value": "month"
},
{
"id": 4,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value"... | [
{
"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"
] |
5,904 | customers_and_invoices | spider:train_spider.json:1565 | How many accounts does each customer have? List the number and customer id. | SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id | [
"How",
"many",
"accounts",
"does",
"each",
"customer",
"have",
"?",
"List",
"the",
"number",
"and",
"customer",
"i",
"d."
] | [
{
"id": 1,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "accounts"
}
] | [
{
"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"
] |
5,905 | public_review_platform | bird:train.json:4001 | Based on business in Phoenix, calculate the percentage of business with low funny votes. | SELECT CAST(SUM(CASE WHEN T2.review_votes_funny = 'Low' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Phoenix' | [
"Based",
"on",
"business",
"in",
"Phoenix",
",",
"calculate",
"the",
"percentage",
"of",
"business",
"with",
"low",
"funny",
"votes",
"."
] | [
{
"id": 8,
"type": "column",
"value": "review_votes_funny"
},
{
"id": 4,
"type": "column",
"value": "business_id"
},
{
"id": 0,
"type": "table",
"value": "business"
},
{
"id": 1,
"type": "table",
"value": "reviews"
},
{
"id": 3,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"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",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
5,907 | university_basketball | spider:train_spider.json:1015 | Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. | SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation | [
"Find",
"the",
"total",
"number",
"of",
"students",
"enrolled",
"in",
"the",
"colleges",
"that",
"were",
"founded",
"after",
"the",
"year",
"of",
"1850",
"for",
"each",
"affiliation",
"type",
"."
] | [
{
"id": 1,
"type": "column",
"value": "affiliation"
},
{
"id": 0,
"type": "table",
"value": "university"
},
{
"id": 4,
"type": "column",
"value": "enrollment"
},
{
"id": 2,
"type": "column",
"value": "founded"
},
{
"id": 3,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
20
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"enti... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"O"
] |
5,908 | cinema | spider:train_spider.json:1958 | How many films have the word 'Dummy' in their titles? | SELECT count(*) FROM film WHERE title LIKE "%Dummy%" | [
"How",
"many",
"films",
"have",
"the",
"word",
"'",
"Dummy",
"'",
"in",
"their",
"titles",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "%Dummy%"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value": "film"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,909 | disney | bird:train.json:4684 | List the PG-13 romantic comedy movie titles and their release dates. | SELECT movie_title, release_date FROM movies_total_gross WHERE MPAA_rating = 'PG-13' AND genre = 'Romantic Comedy' | [
"List",
"the",
"PG-13",
"romantic",
"comedy",
"movie",
"titles",
"and",
"their",
"release",
"dates",
"."
] | [
{
"id": 0,
"type": "table",
"value": "movies_total_gross"
},
{
"id": 6,
"type": "value",
"value": "Romantic Comedy"
},
{
"id": 2,
"type": "column",
"value": "release_date"
},
{
"id": 1,
"type": "column",
"value": "movie_title"
},
{
"id": 3,
"ty... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"e... | [
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,910 | small_bank_1 | spider:train_spider.json:1798 | Find the name of account that has the lowest total checking and saving balance. | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1 | [
"Find",
"the",
"name",
"of",
"account",
"that",
"has",
"the",
"lowest",
"total",
"checking",
"and",
"saving",
"balance",
"."
] | [
{
"id": 2,
"type": "table",
"value": "accounts"
},
{
"id": 3,
"type": "table",
"value": "checking"
},
{
"id": 1,
"type": "table",
"value": "savings"
},
{
"id": 5,
"type": "column",
"value": "balance"
},
{
"id": 4,
"type": "column",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entit... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
5,911 | entertainment_awards | spider:train_spider.json:4605 | What is the average number of audience for festivals? | SELECT avg(Num_of_Audience) FROM festival_detail | [
"What",
"is",
"the",
"average",
"number",
"of",
"audience",
"for",
"festivals",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "festival_detail"
},
{
"id": 1,
"type": "column",
"value": "num_of_audience"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O"
] |
5,912 | food_inspection_2 | bird:train.json:6217 | What is the percentage of restaurants that paid a fine of 250 among all establishments? | SELECT CAST(COUNT(CASE WHEN T3.fine = 250 THEN T1.license_no END) AS REAL) * 100 / COUNT(T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.facility_type = 'Restaurant' | [
"What",
"is",
"the",
"percentage",
"of",
"restaurants",
"that",
"paid",
"a",
"fine",
"of",
"250",
"among",
"all",
"establishments",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "facility_type"
},
{
"id": 3,
"type": "table",
"value": "establishment"
},
{
"id": 5,
"type": "column",
"value": "inspection_id"
},
{
"id": 2,
"type": "value",
"value": "Restaurant"
},
{
"id": 4,
"type": "t... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O"
] |
5,913 | chicago_crime | bird:train.json:8663 | Who is the alderman in the ward associated with the crime with report number 23769? | SELECT T2.alderman_first_name, T2.alderman_last_name FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.report_no = 23769 | [
"Who",
"is",
"the",
"alderman",
"in",
"the",
"ward",
"associated",
"with",
"the",
"crime",
"with",
"report",
"number",
"23769",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "alderman_first_name"
},
{
"id": 1,
"type": "column",
"value": "alderman_last_name"
},
{
"id": 4,
"type": "column",
"value": "report_no"
},
{
"id": 6,
"type": "column",
"value": "ward_no"
},
{
"id": 2,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,914 | insurance_fnol | spider:train_spider.json:900 | Find the policy types more than 4 customers use. Show their type code. | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4 | [
"Find",
"the",
"policy",
"types",
"more",
"than",
"4",
"customers",
"use",
".",
"Show",
"their",
"type",
"code",
"."
] | [
{
"id": 0,
"type": "table",
"value": "available_policies"
},
{
"id": 1,
"type": "column",
"value": "policy_type_code"
},
{
"id": 2,
"type": "value",
"value": "4"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,915 | debit_card_specializing | bird:dev.json:1515 | What segment did the customer have at 2012/8/23 21:20:00? | SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.date = '2012-08-23' AND T1.time = '21:20:00' | [
"What",
"segment",
"did",
"the",
"customer",
"have",
"at",
"2012/8/23",
"21:20:00",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "transactions_1k"
},
{
"id": 3,
"type": "column",
"value": "customerid"
},
{
"id": 5,
"type": "value",
"value": "2012-08-23"
},
{
"id": 2,
"type": "table",
"value": "customers"
},
{
"id": 7,
"type": "value",... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
6
]
},
{
"entity_id": 5,
"... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"B-VALUE",
"O"
] |
5,916 | olympics | bird:train.json:5080 | In the 2014 Winter game, what is the percentage of competitors who age 28 years old? | SELECT CAST(COUNT(CASE WHEN T2.age = 28 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2014 Winter' | [
"In",
"the",
"2014",
"Winter",
"game",
",",
"what",
"is",
"the",
"percentage",
"of",
"competitors",
"who",
"age",
"28",
"years",
"old",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "games_competitor"
},
{
"id": 3,
"type": "value",
"value": "2014 Winter"
},
{
"id": 2,
"type": "column",
"value": "games_name"
},
{
"id": 7,
"type": "column",
"value": "person_id"
},
{
"id": 5,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2,
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O"
] |
5,917 | video_game | bird:test.json:1936 | Return the average number of units sold in millions for games not developed by Nintendo. | SELECT avg(Units_sold_Millions) FROM game WHERE developers != 'Nintendo' | [
"Return",
"the",
"average",
"number",
"of",
"units",
"sold",
"in",
"millions",
"for",
"games",
"not",
"developed",
"by",
"Nintendo",
"."
] | [
{
"id": 3,
"type": "column",
"value": "units_sold_millions"
},
{
"id": 1,
"type": "column",
"value": "developers"
},
{
"id": 2,
"type": "value",
"value": "Nintendo"
},
{
"id": 0,
"type": "table",
"value": "game"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
5,
6,
7,
8
]
},
{
"entity_id": 4,
"token_i... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,918 | language_corpus | bird:train.json:5790 | Which word has the most repetitions in the Catalan language? Give the ID of the word. | SELECT wid FROM langs_words WHERE occurrences = ( SELECT MAX(occurrences) FROM langs_words ) | [
"Which",
"word",
"has",
"the",
"most",
"repetitions",
"in",
"the",
"Catalan",
"language",
"?",
"Give",
"the",
"ID",
"of",
"the",
"word",
"."
] | [
{
"id": 0,
"type": "table",
"value": "langs_words"
},
{
"id": 2,
"type": "column",
"value": "occurrences"
},
{
"id": 1,
"type": "column",
"value": "wid"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"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",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
5,919 | gas_company | spider:train_spider.json:2024 | For each company id, what are the companies and how many gas stations does each one operate? | SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id | [
"For",
"each",
"company",
"i",
"d",
",",
"what",
"are",
"the",
"companies",
"and",
"how",
"many",
"gas",
"stations",
"does",
"each",
"one",
"operate",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "station_company"
},
{
"id": 0,
"type": "column",
"value": "company_id"
},
{
"id": 1,
"type": "column",
"value": "company"
},
{
"id": 3,
"type": "table",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,920 | flight_1 | spider:train_spider.json:406 | What are the destinations and number of flights to each one? | SELECT destination , count(*) FROM Flight GROUP BY destination | [
"What",
"are",
"the",
"destinations",
"and",
"number",
"of",
"flights",
"to",
"each",
"one",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "destination"
},
{
"id": 0,
"type": "table",
"value": "flight"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
5,921 | synthea | bird:train.json:1446 | How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive? | SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL | [
"How",
"many",
"of",
"the",
"patients",
"who",
"have",
"stopped",
"taking",
"medication",
"for",
"'",
"coronary",
"heart",
"disease",
"'",
"are",
"still",
"alive",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Coronary Heart Disease"
},
{
"id": 3,
"type": "column",
"value": "reasondescription"
},
{
"id": 0,
"type": "table",
"value": "medications"
},
{
"id": 6,
"type": "column",
"value": "deathdate"
},
{
"id": 1,
... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12,
13,
14
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O"
] |
5,922 | bike_1 | spider:train_spider.json:157 | For each zip code, return how many times max wind speed reached 25? | SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code | [
"For",
"each",
"zip",
"code",
",",
"return",
"how",
"many",
"times",
"max",
"wind",
"speed",
"reached",
"25",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "max_wind_speed_mph"
},
{
"id": 1,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 3,
"type": "value",
"value": "25"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,923 | gas_company | spider:train_spider.json:2023 | Show the company name with the number of gas station. | SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id | [
"Show",
"the",
"company",
"name",
"with",
"the",
"number",
"of",
"gas",
"station",
"."
] | [
{
"id": 2,
"type": "table",
"value": "station_company"
},
{
"id": 0,
"type": "column",
"value": "company_id"
},
{
"id": 1,
"type": "column",
"value": "company"
},
{
"id": 3,
"type": "table",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,924 | network_2 | spider:train_spider.json:4419 | HOw many engineers are older than 30? | SELECT count(*) FROM Person WHERE age > 30 AND job = 'engineer' | [
"HOw",
"many",
"engineers",
"are",
"older",
"than",
"30",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "engineer"
},
{
"id": 0,
"type": "table",
"value": "person"
},
{
"id": 1,
"type": "column",
"value": "age"
},
{
"id": 3,
"type": "column",
"value": "job"
},
{
"id": 2,
"type": "value",
"value": "30"
}
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,926 | assets_maintenance | spider:train_spider.json:3150 | List the all the assets make, model, details by the disposed date ascendingly. | SELECT asset_make , asset_model , asset_details FROM Assets ORDER BY asset_disposed_date ASC | [
"List",
"the",
"all",
"the",
"assets",
"make",
",",
"model",
",",
"details",
"by",
"the",
"disposed",
"date",
"ascendingly",
"."
] | [
{
"id": 4,
"type": "column",
"value": "asset_disposed_date"
},
{
"id": 3,
"type": "column",
"value": "asset_details"
},
{
"id": 2,
"type": "column",
"value": "asset_model"
},
{
"id": 1,
"type": "column",
"value": "asset_make"
},
{
"id": 0,
"typ... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
12,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,927 | works_cycles | bird:train.json:7309 | Name all person in the individual retail whose last name is 'Anderson'. | SELECT FirstName, MiddleName, LastName FROM Person WHERE LastName = 'Anderson' AND PersonType = 'IN' | [
"Name",
"all",
"person",
"in",
"the",
"individual",
"retail",
"whose",
"last",
"name",
"is",
"'",
"Anderson",
"'",
"."
] | [
{
"id": 2,
"type": "column",
"value": "middlename"
},
{
"id": 5,
"type": "column",
"value": "persontype"
},
{
"id": 1,
"type": "column",
"value": "firstname"
},
{
"id": 3,
"type": "column",
"value": "lastname"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
5,928 | works_cycles | bird:train.json:7034 | How many of the workers who started working in 2009 are from the Production Department? | SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID WHERE T2.StartDate >= '2009-01-01' AND T2.StartDate < '2010-01-01' AND T1.Name = 'Production' | [
"How",
"many",
"of",
"the",
"workers",
"who",
"started",
"working",
"in",
"2009",
"are",
"from",
"the",
"Production",
"Department",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "employeedepartmenthistory"
},
{
"id": 2,
"type": "column",
"value": "businessentityid"
},
{
"id": 3,
"type": "column",
"value": "departmentid"
},
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 5,
... | [
{
"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": [
6
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
5,929 | books | bird:train.json:6000 | How many orders were returned in the year 2020? | SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Returned' AND STRFTIME('%Y', T2.status_date) = '2020' | [
"How",
"many",
"orders",
"were",
"returned",
"in",
"the",
"year",
"2020",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "order_history"
},
{
"id": 0,
"type": "table",
"value": "order_status"
},
{
"id": 3,
"type": "column",
"value": "status_value"
},
{
"id": 7,
"type": "column",
"value": "status_date"
},
{
"id": 2,
"type": "co... | [
{
"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": [
4
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
5,931 | apartment_rentals | spider:train_spider.json:1265 | Return each apartment type code along with the maximum and minimum number of rooms among each type. | SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code | [
"Return",
"each",
"apartment",
"type",
"code",
"along",
"with",
"the",
"maximum",
"and",
"minimum",
"number",
"of",
"rooms",
"among",
"each",
"type",
"."
] | [
{
"id": 1,
"type": "column",
"value": "apt_type_code"
},
{
"id": 0,
"type": "table",
"value": "apartments"
},
{
"id": 2,
"type": "column",
"value": "room_count"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,932 | college_completion | bird:train.json:3757 | What is the name of the school with the highest difference in the average completion rate for the national in which it belongs? Indicate the state appropriations to higher education in fiscal year 2011 per resident to which the school belongs. | SELECT T1.chronname, T2.state_appr_value FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state ORDER BY T1.awards_per_value - T2.awards_per_natl_value DESC LIMIT 1 | [
"What",
"is",
"the",
"name",
"of",
"the",
"school",
"with",
"the",
"highest",
"difference",
"in",
"the",
"average",
"completion",
"rate",
"for",
"the",
"national",
"in",
"which",
"it",
"belongs",
"?",
"Indicate",
"the",
"state",
"appropriations",
"to",
"high... | [
{
"id": 6,
"type": "column",
"value": "awards_per_natl_value"
},
{
"id": 3,
"type": "table",
"value": "state_sector_details"
},
{
"id": 2,
"type": "table",
"value": "institution_details"
},
{
"id": 1,
"type": "column",
"value": "state_appr_value"
},
{
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
26
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,933 | donor | bird:train.json:3218 | Among the schools donated by donor "000eebf28658900e63b538cf8a73afbd",how many schools whose poverty level are highest? | SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.poverty_level = 'highest poverty' AND T2.donor_acctid = '000eebf28658900e63b538cf8a73afbd' | [
"Among",
"the",
"schools",
"donated",
"by",
"donor",
"\"",
"000eebf28658900e63b538cf8a73afbd\",how",
"many",
"schools",
"whose",
"poverty",
"level",
"are",
"highest",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "000eebf28658900e63b538cf8a73afbd"
},
{
"id": 5,
"type": "value",
"value": "highest poverty"
},
{
"id": 4,
"type": "column",
"value": "poverty_level"
},
{
"id": 6,
"type": "column",
"value": "donor_acctid"
},
{
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O"
] |
5,934 | authors | bird:train.json:3520 | What is the title of the paper published in 1995 and whose author included Thomas Wiegand? | SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Thomas Wiegand' AND T2.Year = 1995 | [
"What",
"is",
"the",
"title",
"of",
"the",
"paper",
"published",
"in",
"1995",
"and",
"whose",
"author",
"included",
"Thomas",
"Wiegand",
"?"
] | [
{
"id": 6,
"type": "value",
"value": "Thomas Wiegand"
},
{
"id": 1,
"type": "table",
"value": "paperauthor"
},
{
"id": 3,
"type": "column",
"value": "paperid"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"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",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,935 | retail_world | bird:train.json:6594 | Which product of Exotic Liquids company that have the highest reorder levels? | SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' ORDER BY T1.ReorderLevel DESC LIMIT 1 | [
"Which",
"product",
"of",
"Exotic",
"Liquids",
"company",
"that",
"have",
"the",
"highest",
"reorder",
"levels",
"?"
] | [
{
"id": 4,
"type": "value",
"value": "Exotic Liquids"
},
{
"id": 5,
"type": "column",
"value": "reorderlevel"
},
{
"id": 0,
"type": "column",
"value": "productname"
},
{
"id": 3,
"type": "column",
"value": "companyname"
},
{
"id": 6,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": [
3,
4
]
},
{
"entity_id":... | [
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,936 | books | bird:train.json:5947 | Among Daisey Lamball's orders, how many were shipped via International shipping? | SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Daisey' AND T1.last_name = 'Lamball' AND T3.method_name = 'International' | [
"Among",
"Daisey",
"Lamball",
"'s",
"orders",
",",
"how",
"many",
"were",
"shipped",
"via",
"International",
"shipping",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "shipping_method_id"
},
{
"id": 0,
"type": "table",
"value": "shipping_method"
},
{
"id": 10,
"type": "value",
"value": "International"
},
{
"id": 9,
"type": "column",
"value": "method_name"
},
{
"id": 11,
... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"B-VALUE",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O"
] |
5,937 | match_season | spider:train_spider.json:1090 | Show the position of players and the corresponding number of players. | SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION | [
"Show",
"the",
"position",
"of",
"players",
"and",
"the",
"corresponding",
"number",
"of",
"players",
"."
] | [
{
"id": 0,
"type": "table",
"value": "match_season"
},
{
"id": 1,
"type": "column",
"value": "position"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,938 | regional_sales | bird:train.json:2588 | Sate the order number and calculate the net profit for each order under Joshua Bennett. | SELECT T1.OrderNumber , REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.`Sales Team` = 'Joshua Bennett' | [
"Sate",
"the",
"order",
"number",
"and",
"calculate",
"the",
"net",
"profit",
"for",
"each",
"order",
"under",
"Joshua",
"Bennett",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Joshua Bennett"
},
{
"id": 1,
"type": "table",
"value": "Sales Orders"
},
{
"id": 6,
"type": "column",
"value": "_salesteamid"
},
{
"id": 0,
"type": "column",
"value": "ordernumber"
},
{
"id": 5,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
0,
1
]
},
{
"entity_id": 4,
"token_idxs": [
13,
14
]
},
... | [
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,939 | disney | bird:train.json:4695 | Who is the voice actor of the hero in Lion King? | SELECT T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Lion King' AND T1.character = 'Lion King' | [
"Who",
"is",
"the",
"voice",
"actor",
"of",
"the",
"hero",
"in",
"Lion",
"King",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "voice-actors"
},
{
"id": 0,
"type": "column",
"value": "voice-actor"
},
{
"id": 4,
"type": "column",
"value": "movie_title"
},
{
"id": 2,
"type": "table",
"value": "characters"
},
{
"id": 5,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,940 | cre_Doc_Control_Systems | spider:train_spider.json:2101 | What is the description of document type 'Paper'? | SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "Paper"; | [
"What",
"is",
"the",
"description",
"of",
"document",
"type",
"'",
"Paper",
"'",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "document_type_description"
},
{
"id": 0,
"type": "table",
"value": "ref_document_types"
},
{
"id": 2,
"type": "column",
"value": "document_type_code"
},
{
"id": 3,
"type": "column",
"value": "Paper"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O"
] |
5,941 | club_1 | spider:train_spider.json:4258 | Find the last names of the members of the club "Bootup Baltimore". | SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" | [
"Find",
"the",
"last",
"names",
"of",
"the",
"members",
"of",
"the",
"club",
"\"",
"Bootup",
"Baltimore",
"\"",
"."
] | [
{
"id": 3,
"type": "column",
"value": "Bootup Baltimore"
},
{
"id": 5,
"type": "table",
"value": "member_of_club"
},
{
"id": 2,
"type": "column",
"value": "clubname"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 7,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11,
12
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,942 | beer_factory | bird:train.json:5241 | What is the full name of the customer that had made the most transactions in August, 2014? | SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y-%m', T2.TransactionDate) = '2014-08' GROUP BY T1.CustomerID ORDER BY COUNT(T2.CustomerID) DESC LIMIT 1 | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"customer",
"that",
"had",
"made",
"the",
"most",
"transactions",
"in",
"August",
",",
"2014",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "transactiondate"
},
{
"id": 4,
"type": "table",
"value": "transaction"
},
{
"id": 0,
"type": "column",
"value": "customerid"
},
{
"id": 3,
"type": "table",
"value": "customers"
},
{
"id": 5,
"type": "value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,943 | card_games | bird:dev.json:522 | Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format. | SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format | [
"Which",
"cards",
"are",
"ranked",
"1st",
"on",
"EDHRec",
"?",
"List",
"all",
"of",
"the",
"cards",
"name",
"and",
"its",
"banned",
"play",
"format",
"."
] | [
{
"id": 3,
"type": "table",
"value": "legalities"
},
{
"id": 5,
"type": "column",
"value": "edhrecrank"
},
{
"id": 1,
"type": "column",
"value": "format"
},
{
"id": 7,
"type": "column",
"value": "status"
},
{
"id": 8,
"type": "value",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
18
]
},
{
"entity_id": 2,
"token_idxs": [
1
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O"
] |
5,944 | gas_company | spider:train_spider.json:1994 | What is the total number of companies? | SELECT count(*) FROM company | [
"What",
"is",
"the",
"total",
"number",
"of",
"companies",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "company"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"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",
"B-TABLE",
"O"
] |
5,945 | boat_1 | bird:test.json:880 | What are the names of all sailors with a higher rating than every sailor named Luis? | SELECT name FROM Sailors WHERE rating > (SELECT max(rating) FROM Sailors WHERE name = 'Luis') | [
"What",
"are",
"the",
"names",
"of",
"all",
"sailors",
"with",
"a",
"higher",
"rating",
"than",
"every",
"sailor",
"named",
"Luis",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "sailors"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 3,
"type": "value",
"value": "Luis"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
15
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"enti... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O"
] |
5,946 | chicago_crime | bird:train.json:8643 | List the community area names in the Northwest. | SELECT community_area_name FROM Community_Area WHERE side = 'Northwest' | [
"List",
"the",
"community",
"area",
"names",
"in",
"the",
"Northwest",
"."
] | [
{
"id": 1,
"type": "column",
"value": "community_area_name"
},
{
"id": 0,
"type": "table",
"value": "community_area"
},
{
"id": 3,
"type": "value",
"value": "Northwest"
},
{
"id": 2,
"type": "column",
"value": "side"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id":... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,948 | institution_sports | bird:test.json:1658 | Return the names of institutions, as well as their nicknames. | SELECT T2.Name , T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID | [
"Return",
"the",
"names",
"of",
"institutions",
",",
"as",
"well",
"as",
"their",
"nicknames",
"."
] | [
{
"id": 4,
"type": "column",
"value": "institution_id"
},
{
"id": 2,
"type": "table",
"value": "championship"
},
{
"id": 3,
"type": "table",
"value": "institution"
},
{
"id": 1,
"type": "column",
"value": "nickname"
},
{
"id": 0,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,949 | bike_share_1 | bird:train.json:9044 | How many trips which subscription types were Subscriber and ended in San Jose city? | SELECT COUNT(T1.subscription_type) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.end_station_name WHERE T1.subscription_type = 'Subscriber' AND T2.city = 'San Jose' | [
"How",
"many",
"trips",
"which",
"subscription",
"types",
"were",
"Subscriber",
"and",
"ended",
"in",
"San",
"Jose",
"city",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "subscription_type"
},
{
"id": 4,
"type": "column",
"value": "end_station_name"
},
{
"id": 5,
"type": "value",
"value": "Subscriber"
},
{
"id": 7,
"type": "value",
"value": "San Jose"
},
{
"id": 1,
"type": ... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": [
4,
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"B-VALUE",
"B-COLUMN",
"O"
] |
5,950 | customers_and_orders | bird:test.json:262 | How many products are there for each product type? | SELECT product_type_code , count(*) FROM Products GROUP BY product_type_code | [
"How",
"many",
"products",
"are",
"there",
"for",
"each",
"product",
"type",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "product_type_code"
},
{
"id": 0,
"type": "table",
"value": "products"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,951 | loan_1 | spider:train_spider.json:3019 | What are the names of banks in the state of New York? | SELECT bname FROM bank WHERE state = 'New York' | [
"What",
"are",
"the",
"names",
"of",
"banks",
"in",
"the",
"state",
"of",
"New",
"York",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "New York"
},
{
"id": 1,
"type": "column",
"value": "bname"
},
{
"id": 2,
"type": "column",
"value": "state"
},
{
"id": 0,
"type": "table",
"value": "bank"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,952 | shooting | bird:train.json:2464 | Among the cases dismissed by the grand jury disposition, what percentage of cases is where the subject is injured? | SELECT CAST(SUM(subject_statuses = 'Injured') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE grand_jury_disposition = 'No Bill' | [
"Among",
"the",
"cases",
"dismissed",
"by",
"the",
"grand",
"jury",
"disposition",
",",
"what",
"percentage",
"of",
"cases",
"is",
"where",
"the",
"subject",
"is",
"injured",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "grand_jury_disposition"
},
{
"id": 5,
"type": "column",
"value": "subject_statuses"
},
{
"id": 4,
"type": "column",
"value": "case_number"
},
{
"id": 0,
"type": "table",
"value": "incidents"
},
{
"id": 2,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
5,953 | customers_and_addresses | spider:train_spider.json:6136 | What is the name of customers who do not use Cash as payment method. | SELECT customer_name FROM customers WHERE payment_method != 'Cash' | [
"What",
"is",
"the",
"name",
"of",
"customers",
"who",
"do",
"not",
"use",
"Cash",
"as",
"payment",
"method",
"."
] | [
{
"id": 2,
"type": "column",
"value": "payment_method"
},
{
"id": 1,
"type": "column",
"value": "customer_name"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": "value",
"value": "Cash"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12,
13
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,954 | music_2 | spider:train_spider.json:5233 | What are the names of the songs without a lead vocal? | SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "lead" | [
"What",
"are",
"the",
"names",
"of",
"the",
"songs",
"without",
"a",
"lead",
"vocal",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "vocals"
},
{
"id": 5,
"type": "column",
"value": "songid"
},
{
"id": 0,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
"value": "songs"
},
{
"id": 3,
"type": "column",
"value": "type"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
10
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
5,955 | club_1 | spider:train_spider.json:4252 | What are the names of all clubs? | SELECT clubname FROM club | [
"What",
"are",
"the",
"names",
"of",
"all",
"clubs",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "clubname"
},
{
"id": 0,
"type": "table",
"value": "club"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,956 | student_loan | bird:train.json:4483 | Provide the students' names and schools who enrolled for 15 months. | SELECT name, school FROM enrolled WHERE month = 15 | [
"Provide",
"the",
"students",
"'",
"names",
"and",
"schools",
"who",
"enrolled",
"for",
"15",
"months",
"."
] | [
{
"id": 0,
"type": "table",
"value": "enrolled"
},
{
"id": 2,
"type": "column",
"value": "school"
},
{
"id": 3,
"type": "column",
"value": "month"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "value",
"value": "15"
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
5,957 | movie_3 | bird:train.json:9180 | How many rentals were returned on 5/27/2005? | SELECT COUNT(rental_id) FROM rental WHERE rental_date = '2005-05-27' | [
"How",
"many",
"rentals",
"were",
"returned",
"on",
"5/27/2005",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "rental_date"
},
{
"id": 2,
"type": "value",
"value": "2005-05-27"
},
{
"id": 3,
"type": "column",
"value": "rental_id"
},
{
"id": 0,
"type": "table",
"value": "rental"
}
] | [
{
"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"
] |
5,958 | voter_2 | spider:train_spider.json:5513 | Return the code of the city that has the most students. | SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1 | [
"Return",
"the",
"code",
"of",
"the",
"city",
"that",
"has",
"the",
"most",
"students",
"."
] | [
{
"id": 1,
"type": "column",
"value": "city_code"
},
{
"id": 0,
"type": "table",
"value": "student"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,959 | match_season | spider:train_spider.json:1073 | For each player, what are their name, season, and country that they belong to? | SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country | [
"For",
"each",
"player",
",",
"what",
"are",
"their",
"name",
",",
"season",
",",
"and",
"country",
"that",
"they",
"belong",
"to",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "country_name"
},
{
"id": 4,
"type": "table",
"value": "match_season"
},
{
"id": 5,
"type": "column",
"value": "country_id"
},
{
"id": 3,
"type": "table",
"value": "country"
},
{
"id": 6,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O"
] |
5,960 | vehicle_driver | bird:test.json:170 | Return the average top speed across all vehicles. | SELECT avg(top_speed) FROM vehicle | [
"Return",
"the",
"average",
"top",
"speed",
"across",
"all",
"vehicles",
"."
] | [
{
"id": 1,
"type": "column",
"value": "top_speed"
},
{
"id": 0,
"type": "table",
"value": "vehicle"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,961 | architecture | spider:train_spider.json:6954 | What is the id, name and nationality of the architect who built most mills? | SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"i",
"d",
",",
"name",
"and",
"nationality",
"of",
"the",
"architect",
"who",
"built",
"most",
"mills",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "architect_id"
},
{
"id": 2,
"type": "column",
"value": "nationality"
},
{
"id": 3,
"type": "table",
"value": "architect"
},
{
"id": 1,
"type": "column",
"value": "name"
},
{
"id": 4,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": [
3,
4
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
15
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,962 | works_cycles | bird:train.json:7234 | How many Minipumps have been sold? | SELECT COUNT(OrderQty) FROM SalesOrderDetail WHERE ProductID IN ( SELECT ProductID FROM Product WHERE Name = 'Minipump' ) | [
"How",
"many",
"Minipumps",
"have",
"been",
"sold",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "salesorderdetail"
},
{
"id": 1,
"type": "column",
"value": "productid"
},
{
"id": 2,
"type": "column",
"value": "orderqty"
},
{
"id": 5,
"type": "value",
"value": "Minipump"
},
{
"id": 3,
"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": [
2
]
},
{
... | [
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
5,963 | mental_health_survey | bird:train.json:4608 | Give the number of users who took the "mental health survey for 2018". | SELECT COUNT(DISTINCT T1.UserID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2018' | [
"Give",
"the",
"number",
"of",
"users",
"who",
"took",
"the",
"\"",
"mental",
"health",
"survey",
"for",
"2018",
"\"",
"."
] | [
{
"id": 3,
"type": "value",
"value": "mental health survey for 2018"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 5,
"type": "column",
"value": "surveyid"
},
{
"id": 0,
"type": "table",
"value": "answer"
},
{
"id": 1,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
12,
13
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
}... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
5,964 | pilot_record | spider:train_spider.json:2092 | Show the names of pilots and models of aircrafts they have flied with. | SELECT T3.Pilot_name , T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID | [
"Show",
"the",
"names",
"of",
"pilots",
"and",
"models",
"of",
"aircrafts",
"they",
"have",
"flied",
"with",
"."
] | [
{
"id": 3,
"type": "table",
"value": "pilot_record"
},
{
"id": 6,
"type": "column",
"value": "aircraft_id"
},
{
"id": 0,
"type": "column",
"value": "pilot_name"
},
{
"id": 4,
"type": "table",
"value": "aircraft"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
5,965 | movies_4 | bird:train.json:500 | For movies with the keyword of "civil war", calculate the average revenue generated by these movies. | SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'civil war' | [
"For",
"movies",
"with",
"the",
"keyword",
"of",
"\"",
"civil",
"war",
"\"",
",",
"calculate",
"the",
"average",
"revenue",
"generated",
"by",
"these",
"movies",
"."
] | [
{
"id": 5,
"type": "table",
"value": "movie_keywords"
},
{
"id": 1,
"type": "column",
"value": "keyword_name"
},
{
"id": 6,
"type": "column",
"value": "keyword_id"
},
{
"id": 2,
"type": "value",
"value": "civil war"
},
{
"id": 7,
"type": "colum... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7,
8
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
18
]
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,966 | farm | spider:train_spider.json:51 | Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500? | SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500 | [
"Which",
"statuses",
"correspond",
"to",
"both",
"cities",
"that",
"have",
"a",
"population",
"over",
"1500",
"and",
"cities",
"that",
"have",
"a",
"population",
"lower",
"than",
"500",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "population"
},
{
"id": 1,
"type": "column",
"value": "status"
},
{
"id": 0,
"type": "table",
"value": "city"
},
{
"id": 3,
"type": "value",
"value": "1500"
},
{
"id": 4,
"type": "value",
"value": "500"... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
20
]
},
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
5,968 | talkingdata | bird:train.json:1046 | What is the model of the oldest user's device? | SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id ORDER BY T2.age DESC LIMIT 1 | [
"What",
"is",
"the",
"model",
"of",
"the",
"oldest",
"user",
"'s",
"device",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 0,
"type": "column",
"value": "device_model"
},
{
"id": 2,
"type": "table",
"value": "gender_age"
},
{
"id": 4,
"type": "column",
"value": "device_id"
},
{
"id": 3,
"ty... | [
{
"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": [
9
]
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,969 | device | spider:train_spider.json:5076 | Please show different software platforms and the corresponding number of devices using each. | SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform | [
"Please",
"show",
"different",
"software",
"platforms",
"and",
"the",
"corresponding",
"number",
"of",
"devices",
"using",
"each",
"."
] | [
{
"id": 1,
"type": "column",
"value": "software_platform"
},
{
"id": 0,
"type": "table",
"value": "device"
}
] | [
{
"entity_id": 0,
"token_idxs": [
10
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
5,970 | movie_3 | bird:train.json:9193 | How many cities are there in the United States? | SELECT COUNT(T2.city) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'United States' | [
"How",
"many",
"cities",
"are",
"there",
"in",
"the",
"United",
"States",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "United States"
},
{
"id": 5,
"type": "column",
"value": "country_id"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 2,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7,
8
]
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O"
] |
5,971 | customers_and_invoices | spider:train_spider.json:1560 | Count the number of customers who do not have an account. | SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts) | [
"Count",
"the",
"number",
"of",
"customers",
"who",
"do",
"not",
"have",
"an",
"account",
"."
] | [
{
"id": 1,
"type": "column",
"value": "customer_id"
},
{
"id": 0,
"type": "table",
"value": "customers"
},
{
"id": 2,
"type": "table",
"value": "accounts"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
5,972 | gymnast | spider:train_spider.json:1738 | List the total points of gymnasts in descending order. | SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC | [
"List",
"the",
"total",
"points",
"of",
"gymnasts",
"in",
"descending",
"order",
"."
] | [
{
"id": 1,
"type": "column",
"value": "total_points"
},
{
"id": 0,
"type": "table",
"value": "gymnast"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
5,973 | customers_card_transactions | spider:train_spider.json:700 | What are card ids, customer ids, card types, and card numbers for each customer card? | SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards | [
"What",
"are",
"card",
"ids",
",",
"customer",
"ids",
",",
"card",
"types",
",",
"and",
"card",
"numbers",
"for",
"each",
"customer",
"card",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "customers_cards"
},
{
"id": 3,
"type": "column",
"value": "card_type_code"
},
{
"id": 2,
"type": "column",
"value": "customer_id"
},
{
"id": 4,
"type": "column",
"value": "card_number"
},
{
"id": 1,
"type":... | [
{
"entity_id": 0,
"token_idxs": [
16,
17
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
5,975 | customers_and_invoices | spider:train_spider.json:1558 | What are the full names of customers with the account name 900? | SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = "900" | [
"What",
"are",
"the",
"full",
"names",
"of",
"customers",
"with",
"the",
"account",
"name",
"900",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "customer_first_name"
},
{
"id": 1,
"type": "column",
"value": "customer_last_name"
},
{
"id": 4,
"type": "column",
"value": "account_name"
},
{
"id": 6,
"type": "column",
"value": "customer_id"
},
{
"id": 3,
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O"
] |
5,976 | cars | bird:train.json:3139 | How many American cars have an acceleration time of less than 12 seconds? | SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'USA' AND T1.acceleration < 12 | [
"How",
"many",
"American",
"cars",
"have",
"an",
"acceleration",
"time",
"of",
"less",
"than",
"12",
"seconds",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "acceleration"
},
{
"id": 2,
"type": "table",
"value": "production"
},
{
"id": 0,
"type": "table",
"value": "country"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
5,978 | climbing | spider:train_spider.json:1117 | Return the maximum number of points for climbers from the United Kingdom. | SELECT max(Points) FROM climber WHERE Country = "United Kingdom" | [
"Return",
"the",
"maximum",
"number",
"of",
"points",
"for",
"climbers",
"from",
"the",
"United",
"Kingdom",
"."
] | [
{
"id": 2,
"type": "column",
"value": "United Kingdom"
},
{
"id": 0,
"type": "table",
"value": "climber"
},
{
"id": 1,
"type": "column",
"value": "country"
},
{
"id": 3,
"type": "column",
"value": "points"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
5,979 | products_gen_characteristics | spider:train_spider.json:5567 | Count the number of characteristics of the 'flax' product. | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" | [
"Count",
"the",
"number",
"of",
"characteristics",
"of",
"the",
"'",
"flax",
"'",
"product",
"."
] | [
{
"id": 4,
"type": "table",
"value": "product_characteristics"
},
{
"id": 5,
"type": "column",
"value": "characteristic_id"
},
{
"id": 0,
"type": "table",
"value": "characteristics"
},
{
"id": 1,
"type": "column",
"value": "product_name"
},
{
"id":... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
5,980 | social_media | bird:train.json:777 | Please list the texts of all the tweets that are reshared. | SELECT text FROM twitter WHERE IsReshare = 'TRUE' | [
"Please",
"list",
"the",
"texts",
"of",
"all",
"the",
"tweets",
"that",
"are",
"reshared",
"."
] | [
{
"id": 2,
"type": "column",
"value": "isreshare"
},
{
"id": 0,
"type": "table",
"value": "twitter"
},
{
"id": 1,
"type": "column",
"value": "text"
},
{
"id": 3,
"type": "value",
"value": "TRUE"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,981 | superhero | bird:dev.json:731 | How many superheroes did DC Comics publish? | SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics' | [
"How",
"many",
"superheroes",
"did",
"DC",
"Comics",
"publish",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "publisher_name"
},
{
"id": 5,
"type": "column",
"value": "publisher_id"
},
{
"id": 0,
"type": "table",
"value": "superhero"
},
{
"id": 1,
"type": "table",
"value": "publisher"
},
{
"id": 3,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_idxs": [
3
]
},
{
... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
5,982 | planet_1 | bird:test.json:1864 | What is the average salary of an intern? | SELECT avg(Salary) FROM Employee WHERE POSITION = "Intern"; | [
"What",
"is",
"the",
"average",
"salary",
"of",
"an",
"intern",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "column",
"value": "position"
},
{
"id": 2,
"type": "column",
"value": "Intern"
},
{
"id": 3,
"type": "column",
"value": "salary"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
5,983 | music_1 | spider:train_spider.json:3556 | What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000? | SELECT f_id FROM files WHERE formats = "mp4" INTERSECT SELECT f_id FROM song WHERE resolution < 1000 | [
"What",
"is",
"the",
"i",
"d",
"of",
"the",
"files",
"that",
"are",
"available",
"in",
"the",
"format",
"of",
"mp4",
"and",
"a",
"resolution",
"smaller",
"than",
"1000",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "resolution"
},
{
"id": 3,
"type": "column",
"value": "formats"
},
{
"id": 0,
"type": "table",
"value": "files"
},
{
"id": 1,
"type": "table",
"value": "song"
},
{
"id": 2,
"type": "column",
"value": "f... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
3,
4
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,984 | public_review_platform | bird:train.json:4019 | List out city name of businesses which have medium length of review. | SELECT DISTINCT T1.city FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T2.review_length = 'Medium' | [
"List",
"out",
"city",
"name",
"of",
"businesses",
"which",
"have",
"medium",
"length",
"of",
"review",
"."
] | [
{
"id": 3,
"type": "column",
"value": "review_length"
},
{
"id": 5,
"type": "column",
"value": "business_id"
},
{
"id": 1,
"type": "table",
"value": "business"
},
{
"id": 2,
"type": "table",
"value": "reviews"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
5,985 | movie_3 | bird:train.json:9386 | How many titles did Mary Smith rent in 2005? Determine the percentage of titles rented in June 2005. | SELECT COUNT(T2.rental_id) , CAST(SUM(IIF(STRFTIME('%m',T2.rental_date) = '7', 1, 0)) AS REAL) * 100 / COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller' AND STRFTIME('%Y',T2.rental_date) = '2005' | [
"How",
"many",
"titles",
"did",
"Mary",
"Smith",
"rent",
"in",
"2005",
"?",
"Determine",
"the",
"percentage",
"of",
"titles",
"rented",
"in",
"June",
"2005",
"."
] | [
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 11,
"type": "column",
"value": "rental_date"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 2,
"type": "column",
"value": "rental_id"
},
{
"id": 6,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
5,986 | financial | bird:dev.json:125 | For loans contracts which are still running where client are in debt, list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996. | SELECT CAST((T3.A13 - T3.A12) AS REAL) * 100 / T3.A12 FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.status = 'D' | [
"For",
"loans",
"contracts",
"which",
"are",
"still",
"running",
"where",
"client",
"are",
"in",
"debt",
",",
"list",
"the",
"district",
"of",
"the",
"and",
"the",
"state",
"the",
"percentage",
"unemployment",
"rate",
"increment",
"from",
"year",
"1995",
"to... | [
{
"id": 6,
"type": "column",
"value": "district_id"
},
{
"id": 8,
"type": "column",
"value": "account_id"
},
{
"id": 0,
"type": "table",
"value": "district"
},
{
"id": 5,
"type": "table",
"value": "account"
},
{
"id": 1,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
20
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
1
]
},
{
"entity_id": 5,
... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
5,987 | icfp_1 | spider:train_spider.json:2875 | Find the first names and last names of the authors whose institution affiliation is "University of Oxford". | SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Oxford" | [
"Find",
"the",
"first",
"names",
"and",
"last",
"names",
"of",
"the",
"authors",
"whose",
"institution",
"affiliation",
"is",
"\"",
"University",
"of",
"Oxford",
"\"",
"."
] | [
{
"id": 4,
"type": "column",
"value": "University of Oxford"
},
{
"id": 6,
"type": "table",
"value": "authorship"
},
{
"id": 5,
"type": "table",
"value": "authors"
},
{
"id": 7,
"type": "column",
"value": "instid"
},
{
"id": 8,
"type": "column"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
3
]
},
{
"entity_id": 4,
"token_idxs": [
15,
16,
17
]
},
{
... | [
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O"
] |
5,988 | party_host | spider:train_spider.json:2680 | Show the locations of parties and the names of the party hosts in ascending order of the age of the host. | SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age | [
"Show",
"the",
"locations",
"of",
"parties",
"and",
"the",
"names",
"of",
"the",
"party",
"hosts",
"in",
"ascending",
"order",
"of",
"the",
"age",
"of",
"the",
"host",
"."
] | [
{
"id": 4,
"type": "table",
"value": "party_host"
},
{
"id": 0,
"type": "column",
"value": "location"
},
{
"id": 6,
"type": "column",
"value": "party_id"
},
{
"id": 7,
"type": "column",
"value": "host_id"
},
{
"id": 2,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
17
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,989 | workshop_paper | spider:train_spider.json:5831 | Which colleges have both authors with submission score above 90 and authors with submission score below 80? | SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 | [
"Which",
"colleges",
"have",
"both",
"authors",
"with",
"submission",
"score",
"above",
"90",
"and",
"authors",
"with",
"submission",
"score",
"below",
"80",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "submission"
},
{
"id": 1,
"type": "column",
"value": "college"
},
{
"id": 2,
"type": "column",
"value": "scores"
},
{
"id": 3,
"type": "value",
"value": "90"
},
{
"id": 4,
"type": "value",
"value": "80"... | [
{
"entity_id": 0,
"token_idxs": [
13
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
16
]
},
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
5,990 | local_govt_in_alabama | spider:train_spider.json:2142 | How many participants belong to the type 'Organizer'? | SELECT count(*) FROM participants WHERE participant_type_code = 'Organizer' | [
"How",
"many",
"participants",
"belong",
"to",
"the",
"type",
"'",
"Organizer",
"'",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "participant_type_code"
},
{
"id": 0,
"type": "table",
"value": "participants"
},
{
"id": 2,
"type": "value",
"value": "Organizer"
}
] | [
{
"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": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
5,991 | movie_2 | bird:test.json:1806 | What are names of movies that have a 'G' ratings? | SELECT title FROM movies WHERE rating = 'G' | [
"What",
"are",
"names",
"of",
"movies",
"that",
"have",
"a",
"'",
"G",
"'",
"ratings",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movies"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 3,
"type": "value",
"value": "G"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O"
] |
5,992 | books | bird:train.json:6083 | How many books were ordered by customer Kandy Adamec? | SELECT COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Kandy' AND T3.last_name = 'Adamec' | [
"How",
"many",
"books",
"were",
"ordered",
"by",
"customer",
"Kandy",
"Adamec",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 1,
"type": "table",
"value": "order_line"
},
{
"id": 2,
"type": "table",
"value": "cust_order"
},
{
"id": 4,
"type": "column",
"value": "first_name"
},
{
"id": 6,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-VALUE",
"B-VALUE",
"O"
] |
5,993 | movie_3 | bird:train.json:9305 | What is the most common first name among the customers? | SELECT first_name FROM customer GROUP BY first_name ORDER BY COUNT(first_name) DESC LIMIT 1 | [
"What",
"is",
"the",
"most",
"common",
"first",
"name",
"among",
"the",
"customers",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 0,
"type": "table",
"value": "customer"
}
] | [
{
"entity_id": 0,
"token_idxs": [
9
]
},
{
"entity_id": 1,
"token_idxs": [
5,
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"toke... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
5,994 | shakespeare | bird:train.json:2982 | How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."? | SELECT SUM(T2.ParagraphNum) FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T1.Description = 'A Sea-port in Cyprus. An open place near the quay.' | [
"How",
"many",
"paragraphs",
"are",
"there",
"in",
"the",
"scene",
"whose",
"description",
"is",
"\"",
"A",
"Sea",
"-",
"port",
"in",
"Cyprus",
".",
"An",
"open",
"place",
"near",
"the",
"quay",
".",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "A Sea-port in Cyprus. An open place near the quay."
},
{
"id": 4,
"type": "column",
"value": "paragraphnum"
},
{
"id": 2,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "paragraphs"
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
9
]
},
{
"entity_id": 3,
"token_idxs": [
12,
13,
14,
15,
16,
17,
18,
19,
20,
21... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
5,995 | company_office | spider:train_spider.json:4568 | Find the names of the buildings in "on-hold" status, and sort them in ascending order of building stories. | SELECT name FROM buildings WHERE Status = "on-hold" ORDER BY Stories ASC | [
"Find",
"the",
"names",
"of",
"the",
"buildings",
"in",
"\"",
"on",
"-",
"hold",
"\"",
"status",
",",
"and",
"sort",
"them",
"in",
"ascending",
"order",
"of",
"building",
"stories",
"."
] | [
{
"id": 0,
"type": "table",
"value": "buildings"
},
{
"id": 3,
"type": "column",
"value": "on-hold"
},
{
"id": 4,
"type": "column",
"value": "stories"
},
{
"id": 2,
"type": "column",
"value": "status"
},
{
"id": 1,
"type": "column",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": [
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
5,996 | flight_4 | spider:train_spider.json:6876 | How many routes go from the United States to Canada? | SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States') | [
"How",
"many",
"routes",
"go",
"from",
"the",
"United",
"States",
"to",
"Canada",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "United States"
},
{
"id": 1,
"type": "column",
"value": "dst_apid"
},
{
"id": 2,
"type": "column",
"value": "src_apid"
},
{
"id": 3,
"type": "table",
"value": "airports"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O"
] |
5,997 | student_assessment | spider:train_spider.json:62 | List the id of students who never attends courses? | SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) | [
"List",
"the",
"i",
"d",
"of",
"students",
"who",
"never",
"attends",
"courses",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "student_course_attendance"
},
{
"id": 1,
"type": "column",
"value": "student_id"
},
{
"id": 0,
"type": "table",
"value": "students"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
6,
7,
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"O",
"O"
] |
5,998 | airline | bird:train.json:5890 | Provide the origin of the flight that has the shortest actual elapsed time. | SELECT ORIGIN FROM Airlines ORDER BY ACTUAL_ELAPSED_TIME ASC LIMIT 1 | [
"Provide",
"the",
"origin",
"of",
"the",
"flight",
"that",
"has",
"the",
"shortest",
"actual",
"elapsed",
"time",
"."
] | [
{
"id": 2,
"type": "column",
"value": "actual_elapsed_time"
},
{
"id": 0,
"type": "table",
"value": "airlines"
},
{
"id": 1,
"type": "column",
"value": "origin"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
10,
11,
12
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": ... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O"
] |
5,999 | college_1 | spider:train_spider.json:3205 | Find the number of classes in each department. | SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code | [
"Find",
"the",
"number",
"of",
"classes",
"in",
"each",
"department",
"."
] | [
{
"id": 0,
"type": "column",
"value": "dept_code"
},
{
"id": 3,
"type": "column",
"value": "crs_code"
},
{
"id": 2,
"type": "table",
"value": "course"
},
{
"id": 1,
"type": "table",
"value": "class"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
6,000 | school_bus | spider:train_spider.json:6360 | What is the maximum, minimum and average years spent working on a school bus? | SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus | [
"What",
"is",
"the",
"maximum",
",",
"minimum",
"and",
"average",
"years",
"spent",
"working",
"on",
"a",
"school",
"bus",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "years_working"
},
{
"id": 0,
"type": "table",
"value": "school_bus"
}
] | [
{
"entity_id": 0,
"token_idxs": [
13,
14
]
},
{
"entity_id": 1,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"ent... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O"
] |
6,001 | movie_3 | bird:train.json:9187 | What is the full name of the actor who starred in most movies? | SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, COUNT(T1.film_id) AS num FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1 | [
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"actor",
"who",
"starred",
"in",
"most",
"movies",
"?"
] | [
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "table",
"value": "film_actor"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 6,
"type": "column",
"value": "actor_id"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O"
] |
6,002 | movie_3 | bird:train.json:9156 | Sherri Rhodes rented a film at 12:27:27 on 2005/7/28, when did she/he return that film? | SELECT T2.return_date FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'SHERRI' AND T1.last_name = 'RHODES' AND T2.rental_date = '2005-07-28 12:27:27' | [
"Sherri",
"Rhodes",
"rented",
"a",
"film",
"at",
"12:27:27",
"on",
"2005/7/28",
",",
"when",
"did",
"she",
"/",
"he",
"return",
"that",
"film",
"?"
] | [
{
"id": 9,
"type": "value",
"value": "2005-07-28 12:27:27"
},
{
"id": 0,
"type": "column",
"value": "return_date"
},
{
"id": 3,
"type": "column",
"value": "customer_id"
},
{
"id": 8,
"type": "column",
"value": "rental_date"
},
{
"id": 4,
"type"... | [
{
"entity_id": 0,
"token_idxs": [
15,
16
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2,
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5... | [
"B-VALUE",
"B-VALUE",
"B-TABLE",
"I-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
6,003 | books | bird:train.json:6005 | How much time does it take to update the status of order "2398"? | SELECT strftime('%J', T2.status_date) - strftime('%J', T1.order_date) FROM cust_order AS T1 INNER JOIN order_history AS T2 ON T1.order_id = T2.order_id WHERE T1.order_id = 2398 | [
"How",
"much",
"time",
"does",
"it",
"take",
"to",
"update",
"the",
"status",
"of",
"order",
"\"",
"2398",
"\"",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "order_history"
},
{
"id": 5,
"type": "column",
"value": "status_date"
},
{
"id": 0,
"type": "table",
"value": "cust_order"
},
{
"id": 6,
"type": "column",
"value": "order_date"
},
{
"id": 2,
"type": "column... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs"... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
6,004 | movies_4 | bird:train.json:565 | Calculate the average income made by movies using the keyword "paris". List the title of the movies. | SELECT AVG(T1.revenue), T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'paris' | [
"Calculate",
"the",
"average",
"income",
"made",
"by",
"movies",
"using",
"the",
"keyword",
"\"",
"paris",
"\"",
".",
"List",
"the",
"title",
"of",
"the",
"movies",
"."
] | [
{
"id": 6,
"type": "table",
"value": "movie_keywords"
},
{
"id": 2,
"type": "column",
"value": "keyword_name"
},
{
"id": 7,
"type": "column",
"value": "keyword_id"
},
{
"id": 8,
"type": "column",
"value": "movie_id"
},
{
"id": 1,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
16
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
6,005 | public_review_platform | bird:train.json:4118 | Calculate the percentage of users with a high number of fans who were elite in 2011. | SELECT CAST(SUM(CASE WHEN T3.user_fans = 'High' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.user_fans) FROM Years AS T1 INNER JOIN Elite AS T2 ON T1.year_id = T2.year_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T1.actual_year = 2011 | [
"Calculate",
"the",
"percentage",
"of",
"users",
"with",
"a",
"high",
"number",
"of",
"fans",
"who",
"were",
"elite",
"in",
"2011",
"."
] | [
{
"id": 1,
"type": "column",
"value": "actual_year"
},
{
"id": 7,
"type": "column",
"value": "user_fans"
},
{
"id": 5,
"type": "column",
"value": "user_id"
},
{
"id": 8,
"type": "column",
"value": "year_id"
},
{
"id": 0,
"type": "table",
"v... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
15
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.