question_id int64 0 16.1k | db_id stringclasses 259
values | dber_id stringlengths 15 29 | question stringlengths 16 325 | SQL stringlengths 18 1.25k | tokens listlengths 4 62 | entities listlengths 0 21 | entity_to_token listlengths 20 20 | dber_tags listlengths 4 62 |
|---|---|---|---|---|---|---|---|---|
1,502 | bike_share_1 | bird:train.json:9042 | Which trip id had the longest duration and the start station is in Redwood City? | SELECT T1.id FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Redwood City' AND T1.duration = ( SELECT MAX(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Redwood City' ) | [
"Which",
"trip",
"i",
"d",
"had",
"the",
"longest",
"duration",
"and",
"the",
"start",
"station",
"is",
"in",
"Redwood",
"City",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "start_station_name"
},
{
"id": 6,
"type": "value",
"value": "Redwood City"
},
{
"id": 7,
"type": "column",
"value": "duration"
},
{
"id": 2,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "table... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
... | [
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,503 | authors | bird:train.json:3657 | List the name of the author that affiliated with University of Illinois Chicago? | SELECT Name FROM Author WHERE Affiliation = 'University of Illinois Chicago' | [
"List",
"the",
"name",
"of",
"the",
"author",
"that",
"affiliated",
"with",
"University",
"of",
"Illinois",
"Chicago",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "University of Illinois Chicago"
},
{
"id": 2,
"type": "column",
"value": "affiliation"
},
{
"id": 0,
"type": "table",
"value": "author"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11,
12
]
},
{
"entity_id": 4,
"token_i... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
1,504 | college_completion | bird:train.json:3706 | How many more students in total graduated from Central Alabama Community College in 2012 than in 2011? | SELECT SUM(CASE WHEN T2.year = 2012 THEN T2.grad_cohort ELSE 0 END) - SUM(CASE WHEN T2.year = 2011 THEN T2.grad_cohort ELSE 0 END) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Central Alabama Community College' | [
"How",
"many",
"more",
"students",
"in",
"total",
"graduated",
"from",
"Central",
"Alabama",
"Community",
"College",
"in",
"2012",
"than",
"in",
"2011",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Central Alabama Community College"
},
{
"id": 0,
"type": "table",
"value": "institution_details"
},
{
"id": 1,
"type": "table",
"value": "institution_grads"
},
{
"id": 6,
"type": "column",
"value": "grad_cohort"
},
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10,
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"O",
"O",
"B-VALUE",
"O"
] |
1,505 | talkingdata | bird:train.json:1190 | What is the average age of the users who use model device of R7? | SELECT SUM(T1.age) / COUNT(T1.device_id) AS avg FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'R7' | [
"What",
"is",
"the",
"average",
"age",
"of",
"the",
"users",
"who",
"use",
"model",
"device",
"of",
"R7",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "phone_brand_device_model2"
},
{
"id": 2,
"type": "column",
"value": "device_model"
},
{
"id": 0,
"type": "table",
"value": "gender_age"
},
{
"id": 4,
"type": "column",
"value": "device_id"
},
{
"id": 5,
"ty... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,506 | works_cycles | bird:train.json:7459 | How many of the work orders didn’t meet the due date? | SELECT COUNT(WorkOrderID) FROM WorkOrder WHERE EndDate > DueDate | [
"How",
"many",
"of",
"the",
"work",
"orders",
"did",
"n’t",
"meet",
"the",
"due",
"date",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "workorderid"
},
{
"id": 0,
"type": "table",
"value": "workorder"
},
{
"id": 1,
"type": "column",
"value": "enddate"
},
{
"id": 2,
"type": "column",
"value": "duedate"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
10,
11
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,507 | e_learning | spider:train_spider.json:3775 | What is the address of each course author or tutor? | SELECT address_line_1 FROM Course_Authors_and_Tutors | [
"What",
"is",
"the",
"address",
"of",
"each",
"course",
"author",
"or",
"tutor",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "course_authors_and_tutors"
},
{
"id": 1,
"type": "column",
"value": "address_line_1"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6,
7,
8,
9
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"I-TABLE",
"I-TABLE",
"I-TABLE",
"O"
] |
1,508 | cre_Docs_and_Epenses | spider:train_spider.json:6438 | Give the details of the project with the document name 'King Book'. | SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = "King Book" | [
"Give",
"the",
"details",
"of",
"the",
"project",
"with",
"the",
"document",
"name",
"'",
"King",
"Book",
"'",
"."
] | [
{
"id": 0,
"type": "column",
"value": "project_details"
},
{
"id": 3,
"type": "column",
"value": "document_name"
},
{
"id": 5,
"type": "column",
"value": "project_id"
},
{
"id": 2,
"type": "table",
"value": "documents"
},
{
"id": 4,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": [
11,
12
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O"
] |
1,509 | student_1 | spider:train_spider.json:4064 | Find the last names of all the teachers that teach GELL TAMI. | SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "GELL" AND T1.lastname = "TAMI" | [
"Find",
"the",
"last",
"names",
"of",
"all",
"the",
"teachers",
"that",
"teach",
"GELL",
"TAMI",
"."
] | [
{
"id": 3,
"type": "column",
"value": "classroom"
},
{
"id": 4,
"type": "column",
"value": "firstname"
},
{
"id": 0,
"type": "column",
"value": "lastname"
},
{
"id": 2,
"type": "table",
"value": "teachers"
},
{
"id": 1,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
1,510 | bike_1 | spider:train_spider.json:124 | For each zip code, what is the average mean temperature for all dates that start with '8'? | SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code | [
"For",
"each",
"zip",
"code",
",",
"what",
"is",
"the",
"average",
"mean",
"temperature",
"for",
"all",
"dates",
"that",
"start",
"with",
"'",
"8",
"'",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "mean_temperature_f"
},
{
"id": 1,
"type": "column",
"value": "zip_code"
},
{
"id": 0,
"type": "table",
"value": "weather"
},
{
"id": 2,
"type": "column",
"value": "date"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,511 | sales_in_weather | bird:train.json:8193 | On February 8, 2014, what is the minimum temperature in the station where store 29 belongs? | SELECT tmin FROM relation AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.store_nbr = 29 AND T2.`date` = '2014-02-08' | [
"On",
"February",
"8",
",",
"2014",
",",
"what",
"is",
"the",
"minimum",
"temperature",
"in",
"the",
"station",
"where",
"store",
"29",
"belongs",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "station_nbr"
},
{
"id": 7,
"type": "value",
"value": "2014-02-08"
},
{
"id": 4,
"type": "column",
"value": "store_nbr"
},
{
"id": 1,
"type": "table",
"value": "relation"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
{
"ent... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"O",
"O"
] |
1,513 | insurance_policies | spider:train_spider.json:3878 | What is the most popular payment method? | SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1 | [
"What",
"is",
"the",
"most",
"popular",
"payment",
"method",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "payment_method_code"
},
{
"id": 0,
"type": "table",
"value": "payments"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
1,514 | address_1 | bird:test.json:839 | Which state does the student whose first name is Linda live in? | SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code = T2.city_code WHERE T1.Fname = "Linda" | [
"Which",
"state",
"does",
"the",
"student",
"whose",
"first",
"name",
"is",
"Linda",
"live",
"in",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "city_code"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 0,
"type": "column",
"value": "state"
},
{
"id": 3,
"type": "column",
"value": "fname"
},
{
"id": 4,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
1,515 | bakery_1 | bird:test.json:1507 | Give me a list of all the distinct items bought by the customer number 15. | SELECT DISTINCT T1.item FROM items AS T1 JOIN receipts AS T2 ON T1.receipt = T2.ReceiptNumber WHERE T2.CustomerId = 15 | [
"Give",
"me",
"a",
"list",
"of",
"all",
"the",
"distinct",
"items",
"bought",
"by",
"the",
"customer",
"number",
"15",
"."
] | [
{
"id": 6,
"type": "column",
"value": "receiptnumber"
},
{
"id": 3,
"type": "column",
"value": "customerid"
},
{
"id": 2,
"type": "table",
"value": "receipts"
},
{
"id": 5,
"type": "column",
"value": "receipt"
},
{
"id": 1,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"B-VALUE",
"O"
] |
1,516 | retail_world | bird:train.json:6490 | What is the stock value of every condiments? | SELECT T1.UnitPrice * T1.UnitsInStock FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID | [
"What",
"is",
"the",
"stock",
"value",
"of",
"every",
"condiments",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "unitsinstock"
},
{
"id": 1,
"type": "table",
"value": "categories"
},
{
"id": 4,
"type": "column",
"value": "categoryid"
},
{
"id": 2,
"type": "column",
"value": "unitprice"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"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",
"O",
"O",
"O",
"O",
"O"
] |
1,517 | retails | bird:train.json:6810 | Please list any two parts that come with the wrap bag container and have a supply cost of under 10. | SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost < 10 AND T1.p_container = 'WRAP BAG' LIMIT 2 | [
"Please",
"list",
"any",
"two",
"parts",
"that",
"come",
"with",
"the",
"wrap",
"bag",
"container",
"and",
"have",
"a",
"supply",
"cost",
"of",
"under",
"10",
"."
] | [
{
"id": 5,
"type": "column",
"value": "ps_supplycost"
},
{
"id": 7,
"type": "column",
"value": "p_container"
},
{
"id": 4,
"type": "column",
"value": "ps_partkey"
},
{
"id": 3,
"type": "column",
"value": "p_partkey"
},
{
"id": 2,
"type": "table... | [
{
"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": [
15,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
1,518 | formula_1 | bird:dev.json:965 | List out the Id number of races which were hold in 2009. | SELECT raceId FROM races WHERE year = 2009 | [
"List",
"out",
"the",
"I",
"d",
"number",
"of",
"races",
"which",
"were",
"hold",
"in",
"2009",
"."
] | [
{
"id": 1,
"type": "column",
"value": "raceid"
},
{
"id": 0,
"type": "table",
"value": "races"
},
{
"id": 2,
"type": "column",
"value": "year"
},
{
"id": 3,
"type": "value",
"value": "2009"
}
] | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,520 | formula_1 | bird:dev.json:960 | What is the average of fastest lap speed in the 2009 Spanish Grand Prix race? | SELECT AVG(T1.fastestLapSpeed) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix' | [
"What",
"is",
"the",
"average",
"of",
"fastest",
"lap",
"speed",
"in",
"the",
"2009",
"Spanish",
"Grand",
"Prix",
"race",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "Spanish Grand Prix"
},
{
"id": 2,
"type": "column",
"value": "fastestlapspeed"
},
{
"id": 0,
"type": "table",
"value": "results"
},
{
"id": 3,
"type": "column",
"value": "raceid"
},
{
"id": 1,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
14
]
},
{
"entity_id": 2,
"token_idxs": [
5,
6,
7
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
1,521 | superhero | bird:dev.json:831 | What is Abomination's eye colour? | SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Abomination' | [
"What",
"is",
"Abomination",
"'s",
"eye",
"colour",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "superhero_name"
},
{
"id": 5,
"type": "column",
"value": "eye_colour_id"
},
{
"id": 4,
"type": "value",
"value": "Abomination"
},
{
"id": 1,
"type": "table",
"value": "superhero"
},
{
"id": 0,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
2
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"B-TABLE",
"O"
] |
1,522 | farm | spider:train_spider.json:20 | What are the hosts of competitions whose theme is not "Aliens"? | SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens' | [
"What",
"are",
"the",
"hosts",
"of",
"competitions",
"whose",
"theme",
"is",
"not",
"\"",
"Aliens",
"\"",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "farm_competition"
},
{
"id": 3,
"type": "value",
"value": "Aliens"
},
{
"id": 1,
"type": "column",
"value": "hosts"
},
{
"id": 2,
"type": "column",
"value": "theme"
}
] | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
1,523 | toxicology | bird:dev.json:243 | What are the bonds that have phosphorus and nitrogen as their atom elements? | SELECT T2.bond_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id IN ( SELECT T3.bond_id FROM connected AS T3 INNER JOIN atom AS T4 ON T3.atom_id = T4.atom_id WHERE T4.element = 'p' ) AND T1.element = 'n' | [
"What",
"are",
"the",
"bonds",
"that",
"have",
"phosphorus",
"and",
"nitrogen",
"as",
"their",
"atom",
"elements",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "connected"
},
{
"id": 0,
"type": "column",
"value": "bond_id"
},
{
"id": 3,
"type": "column",
"value": "atom_id"
},
{
"id": 4,
"type": "column",
"value": "element"
},
{
"id": 1,
"type": "table",
"value"... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O"
] |
1,524 | coinmarketcap | bird:train.json:6281 | List the names of coins that cannot be traded in 2014. | SELECT name FROM coins WHERE date_added LIKE '2014%' AND status = 'untracked' | [
"List",
"the",
"names",
"of",
"coins",
"that",
"can",
"not",
"be",
"traded",
"in",
"2014",
"."
] | [
{
"id": 2,
"type": "column",
"value": "date_added"
},
{
"id": 5,
"type": "value",
"value": "untracked"
},
{
"id": 4,
"type": "column",
"value": "status"
},
{
"id": 0,
"type": "table",
"value": "coins"
},
{
"id": 3,
"type": "value",
"value":... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
"entity... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,525 | college_2 | spider:train_spider.json:1467 | What are the names of the instructors in the Comp. Sci. department who earn more than 80000? | SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000 | [
"What",
"are",
"the",
"names",
"of",
"the",
"instructors",
"in",
"the",
"Comp",
".",
"Sci",
".",
"department",
"who",
"earn",
"more",
"than",
"80000",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "instructor"
},
{
"id": 3,
"type": "value",
"value": "Comp. Sci."
},
{
"id": 2,
"type": "column",
"value": "dept_name"
},
{
"id": 4,
"type": "column",
"value": "salary"
},
{
"id": 5,
"type": "value",
"va... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10,
11,
12
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,526 | california_schools | bird:dev.json:81 | In which city can you find the school in the state of California with the lowest latitude coordinates and what is its lowest grade? Indicate the school name. | SELECT T2.City, T1.`Low Grade`, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.State = 'CA' ORDER BY T2.Latitude ASC LIMIT 1 | [
"In",
"which",
"city",
"can",
"you",
"find",
"the",
"school",
"in",
"the",
"state",
"of",
"California",
"with",
"the",
"lowest",
"latitude",
"coordinates",
"and",
"what",
"is",
"its",
"lowest",
"grade",
"?",
"Indicate",
"the",
"school",
"name",
"."
] | [
{
"id": 2,
"type": "column",
"value": "School Name"
},
{
"id": 1,
"type": "column",
"value": "Low Grade"
},
{
"id": 7,
"type": "column",
"value": "latitude"
},
{
"id": 4,
"type": "table",
"value": "schools"
},
{
"id": 8,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
22,
23
]
},
{
"entity_id": 2,
"token_idxs": [
27,
28
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
7
]... | [
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,527 | airline | bird:train.json:5864 | What are the names of the top 5 airlines with the highest number of aircraft? | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code GROUP BY T2.Description ORDER BY T1.TAIL_NUM DESC LIMIT 5 | [
"What",
"are",
"the",
"names",
"of",
"the",
"top",
"5",
"airlines",
"with",
"the",
"highest",
"number",
"of",
"aircraft",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "op_carrier_airline_id"
},
{
"id": 2,
"type": "table",
"value": "Air Carriers"
},
{
"id": 0,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "airlines"
},
{
"id": 3,
"type":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,529 | hockey | bird:train.json:7816 | Who is the shortest player and state the team ID of that player from 1925 to 1936. | SELECT T2.playerID, T2.tmID FROM ( SELECT playerID FROM Master WHERE height IS NOT NULL ORDER BY height ASC LIMIT 1 ) AS T1 INNER JOIN ( SELECT DISTINCT playerID, tmID FROM Scoring WHERE year BETWEEN 1925 AND 1936 ) AS T2 ON T1.playerID = T2.playerID | [
"Who",
"is",
"the",
"shortest",
"player",
"and",
"state",
"the",
"team",
"ID",
"of",
"that",
"player",
"from",
"1925",
"to",
"1936",
"."
] | [
{
"id": 0,
"type": "column",
"value": "playerid"
},
{
"id": 3,
"type": "table",
"value": "scoring"
},
{
"id": 2,
"type": "table",
"value": "master"
},
{
"id": 4,
"type": "column",
"value": "height"
},
{
"id": 1,
"type": "column",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
8,
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,531 | race_track | spider:train_spider.json:747 | How many tracks do we have? | SELECT count(*) FROM track | [
"How",
"many",
"tracks",
"do",
"we",
"have",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "track"
}
] | [
{
"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"
] |
1,532 | movie_3 | bird:train.json:9252 | What is the difference in the average number of films rented each day in Australia and Canada? | SELECT AVG(IIF(T4.country = 'Australia', 1, 0)) - AVG(IIF(T4.country = 'Canada', 1, 0)) AS diff FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T2.city_id = T3.city_id INNER JOIN country AS T4 ON T3.country_id = T4.country_id | [
"What",
"is",
"the",
"difference",
"in",
"the",
"average",
"number",
"of",
"films",
"rented",
"each",
"day",
"in",
"Australia",
"and",
"Canada",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "country_id"
},
{
"id": 8,
"type": "column",
"value": "address_id"
},
{
"id": 10,
"type": "value",
"value": "Australia"
},
{
"id": 3,
"type": "table",
"value": "customer"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,533 | shooting | bird:train.json:2478 | In how many cases where the subject was a female was the subject's status listed as Deceased? | SELECT COUNT(T1.case_number) FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T2.gender = 'F' AND T1.subject_statuses = 'Deceased' | [
"In",
"how",
"many",
"cases",
"where",
"the",
"subject",
"was",
"a",
"female",
"was",
"the",
"subject",
"'s",
"status",
"listed",
"as",
"Deceased",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "subject_statuses"
},
{
"id": 2,
"type": "column",
"value": "case_number"
},
{
"id": 0,
"type": "table",
"value": "incidents"
},
{
"id": 1,
"type": "table",
"value": "subjects"
},
{
"id": 6,
"type": "value"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12,
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",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
1,534 | flight_4 | spider:train_spider.json:6847 | How many airports are there per country? Order the countries by decreasing number of airports. | SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC | [
"How",
"many",
"airports",
"are",
"there",
"per",
"country",
"?",
"Order",
"the",
"countries",
"by",
"decreasing",
"number",
"of",
"airports",
"."
] | [
{
"id": 0,
"type": "table",
"value": "airports"
},
{
"id": 1,
"type": "column",
"value": "country"
}
] | [
{
"entity_id": 0,
"token_idxs": [
15
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,536 | institution_sports | bird:test.json:1660 | Return the nickname of the institution with the lowest enrollment. | SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID = T2.Institution_ID ORDER BY T2.Enrollment ASC LIMIT 1 | [
"Return",
"the",
"nickname",
"of",
"the",
"institution",
"with",
"the",
"lowest",
"enrollment",
"."
] | [
{
"id": 4,
"type": "column",
"value": "institution_id"
},
{
"id": 1,
"type": "table",
"value": "championship"
},
{
"id": 2,
"type": "table",
"value": "institution"
},
{
"id": 3,
"type": "column",
"value": "enrollment"
},
{
"id": 0,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O"
] |
1,537 | behavior_monitoring | spider:train_spider.json:3103 | Find all information about student addresses, and sort by monthly rental in descending order. | SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC | [
"Find",
"all",
"information",
"about",
"student",
"addresses",
",",
"and",
"sort",
"by",
"monthly",
"rental",
"in",
"descending",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "student_addresses"
},
{
"id": 1,
"type": "column",
"value": "monthly_rental"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4,
5
]
},
{
"entity_id": 1,
"token_idxs": [
10,
11
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
1,538 | flight_4 | spider:train_spider.json:6872 | What is the number of routes operated by the airline American Airlines whose destinations are in Italy? | SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines' | [
"What",
"is",
"the",
"number",
"of",
"routes",
"operated",
"by",
"the",
"airline",
"American",
"Airlines",
"whose",
"destinations",
"are",
"in",
"Italy",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "American Airlines"
},
{
"id": 0,
"type": "table",
"value": "airlines"
},
{
"id": 2,
"type": "table",
"value": "airports"
},
{
"id": 8,
"type": "column",
"value": "dst_apid"
},
{
"id": 4,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
11
]
},
{
"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",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,539 | vehicle_rent | bird:test.json:404 | What are the types of powertrains that have vehicles that were made in both 2013 and 2014? | SELECT type_of_powertrain FROM vehicles WHERE model_year = 2014 INTERSECT SELECT type_of_powertrain FROM vehicles WHERE model_year = 2013 | [
"What",
"are",
"the",
"types",
"of",
"powertrains",
"that",
"have",
"vehicles",
"that",
"were",
"made",
"in",
"both",
"2013",
"and",
"2014",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "type_of_powertrain"
},
{
"id": 2,
"type": "column",
"value": "model_year"
},
{
"id": 0,
"type": "table",
"value": "vehicles"
},
{
"id": 3,
"type": "value",
"value": "2014"
},
{
"id": 4,
"type": "value",
... | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
3,
4,
5
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
14
]
... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,540 | soccer_2016 | bird:train.json:1808 | Give the name of venue for the game with a win margin of 138 points. | SELECT T2.Venue_Name FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T1.Win_Margin = 138 | [
"Give",
"the",
"name",
"of",
"venue",
"for",
"the",
"game",
"with",
"a",
"win",
"margin",
"of",
"138",
"points",
"."
] | [
{
"id": 0,
"type": "column",
"value": "venue_name"
},
{
"id": 3,
"type": "column",
"value": "win_margin"
},
{
"id": 5,
"type": "column",
"value": "venue_id"
},
{
"id": 1,
"type": "table",
"value": "Match"
},
{
"id": 2,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
10,
11
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entity_i... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O"
] |
1,541 | student_club | bird:dev.json:1431 | List the last name of the members of the club that attended the women's soccer event. | SELECT T3.last_name FROM attendance AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event INNER JOIN member AS T3 ON T1.link_to_member = T3.member_id WHERE T2.event_name = 'Women''s Soccer' AND T3.position = 'Member' | [
"List",
"the",
"last",
"name",
"of",
"the",
"members",
"of",
"the",
"club",
"that",
"attended",
"the",
"women",
"'s",
"soccer",
"event",
"."
] | [
{
"id": 4,
"type": "column",
"value": "link_to_member"
},
{
"id": 7,
"type": "value",
"value": "Women's Soccer"
},
{
"id": 11,
"type": "column",
"value": "link_to_event"
},
{
"id": 2,
"type": "table",
"value": "attendance"
},
{
"id": 6,
"type":... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
11
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-TABLE",
"O"
] |
1,542 | planet_1 | bird:test.json:1866 | What is the clearance level of a physician? | SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position = "Physician"; | [
"What",
"is",
"the",
"clearance",
"level",
"of",
"a",
"physician",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "has_clearance"
},
{
"id": 6,
"type": "column",
"value": "employeeid"
},
{
"id": 4,
"type": "column",
"value": "Physician"
},
{
"id": 2,
"type": "table",
"value": "employee"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"... | [
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"O"
] |
1,543 | works_cycles | bird:train.json:7070 | Among the active employees, how many of them have a courtesy title of "Mr"? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.CurrentFlag = 1 AND T2.Title = 'Mr.' | [
"Among",
"the",
"active",
"employees",
",",
"how",
"many",
"of",
"them",
"have",
"a",
"courtesy",
"title",
"of",
"\"",
"Mr",
"\"",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "businessentityid"
},
{
"id": 3,
"type": "column",
"value": "currentflag"
},
{
"id": 0,
"type": "table",
"value": "employee"
},
{
"id": 1,
"type": "table",
"value": "person"
},
{
"id": 5,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
12
... | [
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
1,544 | retail_complains | bird:train.json:263 | How many days delay for the complaint call from Mr. Brantley Julian Stanley on 2012/5/18? | SELECT 365 * (strftime('%Y', T2.`Date sent to company`) - strftime('%Y', T2.`Date received`)) + 30 * (strftime('%M', T2.`Date sent to company`) - strftime('%M', T2.`Date received`)) + (strftime('%d', T2.`Date sent to company`) - strftime('%d', T2.`Date received`)) AS days FROM client AS T1 INNER JOIN events AS T2 ON T1... | [
"How",
"many",
"days",
"delay",
"for",
"the",
"complaint",
"call",
"from",
"Mr.",
"Brantley",
"Julian",
"Stanley",
"on",
"2012/5/18",
"?"
] | [
{
"id": 16,
"type": "column",
"value": "Date sent to company"
},
{
"id": 3,
"type": "column",
"value": "Date received"
},
{
"id": 4,
"type": "value",
"value": "2012-05-18"
},
{
"id": 2,
"type": "column",
"value": "client_id"
},
{
"id": 8,
"type... | [
{
"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": [
14
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,546 | real_estate_rentals | bird:test.json:1412 | What is the first name of the user who owns the greatest number of properties? | SELECT T1.first_name FROM Users AS T1 JOIN Properties AS T2 ON T2.owner_user_id = T1.User_id GROUP BY T1.User_id ORDER BY count(*) DESC LIMIT 1; | [
"What",
"is",
"the",
"first",
"name",
"of",
"the",
"user",
"who",
"owns",
"the",
"greatest",
"number",
"of",
"properties",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "owner_user_id"
},
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "table",
"value": "properties"
},
{
"id": 0,
"type": "column",
"value": "user_id"
},
{
"id": 2,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,547 | college_2 | spider:train_spider.json:1435 | What are the names of all instructors who advise students in the math depart sorted by total credits of the student. | SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred | [
"What",
"are",
"the",
"names",
"of",
"all",
"instructors",
"who",
"advise",
"students",
"in",
"the",
"math",
"depart",
"sorted",
"by",
"total",
"credits",
"of",
"the",
"student",
"."
] | [
{
"id": 6,
"type": "table",
"value": "instructor"
},
{
"id": 2,
"type": "column",
"value": "dept_name"
},
{
"id": 4,
"type": "column",
"value": "tot_cred"
},
{
"id": 1,
"type": "table",
"value": "student"
},
{
"id": 5,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
20
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12
]
},
{
"entity_id": 4,
"token_idxs": [
16,
17
]
},
{... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O"
] |
1,548 | customers_card_transactions | spider:train_spider.json:694 | What are the ids, full names, and phones of each customer? | SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers | [
"What",
"are",
"the",
"ids",
",",
"full",
"names",
",",
"and",
"phones",
"of",
"each",
"customer",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "customer_first_name"
},
{
"id": 3,
"type": "column",
"value": "customer_last_name"
},
{
"id": 4,
"type": "column",
"value": "customer_phone"
},
{
"id": 1,
"type": "column",
"value": "customer_id"
},
{
"id": 0,... | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,549 | college_3 | spider:train_spider.json:4654 | What are the full names of faculties with sex M and who live in building NEB? | SELECT Fname , Lname FROM FACULTY WHERE sex = "M" AND Building = "NEB" | [
"What",
"are",
"the",
"full",
"names",
"of",
"faculties",
"with",
"sex",
"M",
"and",
"who",
"live",
"in",
"building",
"NEB",
"?"
] | [
{
"id": 5,
"type": "column",
"value": "building"
},
{
"id": 0,
"type": "table",
"value": "faculty"
},
{
"id": 1,
"type": "column",
"value": "fname"
},
{
"id": 2,
"type": "column",
"value": "lname"
},
{
"id": 3,
"type": "column",
"value": "s... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"O"
] |
1,550 | storm_record | spider:train_spider.json:2714 | List the name for storms and the number of affected regions for each storm. | SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id | [
"List",
"the",
"name",
"for",
"storms",
"and",
"the",
"number",
"of",
"affected",
"regions",
"for",
"each",
"storm",
"."
] | [
{
"id": 3,
"type": "table",
"value": "affected_region"
},
{
"id": 0,
"type": "column",
"value": "storm_id"
},
{
"id": 2,
"type": "table",
"value": "storm"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"B-TABLE",
"O"
] |
1,551 | car_retails | bird:train.json:1571 | List out full name of employees who are working in Tokyo? | SELECT T1.firstName, T1.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Tokyo' | [
"List",
"out",
"full",
"name",
"of",
"employees",
"who",
"are",
"working",
"in",
"Tokyo",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "officecode"
},
{
"id": 0,
"type": "column",
"value": "firstname"
},
{
"id": 2,
"type": "table",
"value": "employees"
},
{
"id": 1,
"type": "column",
"value": "lastname"
},
{
"id": 3,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,552 | college_2 | spider:train_spider.json:1363 | What is the title of a course that is listed in both the Statistics and Psychology departments? | SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology' | [
"What",
"is",
"the",
"title",
"of",
"a",
"course",
"that",
"is",
"listed",
"in",
"both",
"the",
"Statistics",
"and",
"Psychology",
"departments",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Statistics"
},
{
"id": 4,
"type": "value",
"value": "Psychology"
},
{
"id": 2,
"type": "column",
"value": "dept_name"
},
{
"id": 0,
"type": "table",
"value": "course"
},
{
"id": 1,
"type": "column",
"va... | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
3
]
},
{
"entity_id": 2,
"token_idxs": [
16
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,553 | local_govt_mdm | spider:train_spider.json:2651 | What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'? | SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz' | [
"What",
"are",
"the",
"renting",
"arrears",
"tax",
"ids",
"related",
"to",
"the",
"customer",
"master",
"index",
"whose",
"detail",
"is",
"not",
"'",
"Schmidt",
",",
"Kertzmann",
"and",
"Lubowitz",
"'",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Schmidt , Kertzmann and Lubowitz"
},
{
"id": 1,
"type": "table",
"value": "customer_master_index"
},
{
"id": 5,
"type": "table",
"value": "cmi_cross_references"
},
{
"id": 6,
"type": "column",
"value": "master_custome... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
11,
12
]
},
{
"entity_id": 2,
"token_idxs": [
14
]
},
{
"entity_id": 3,
"token_idxs": [
18,
19,
20,
21,
22
]
},
{
"entity_id": 4,
... | [
"O",
"O",
"O",
"B-TABLE",
"I-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"B-TABLE",
"I-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O"
] |
1,554 | customers_and_invoices | spider:train_spider.json:1612 | Return the last name, id and phone number of the customer who has made the greatest number of orders. | SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 | [
"Return",
"the",
"last",
"name",
",",
"i",
"d",
"and",
"phone",
"number",
"of",
"the",
"customer",
"who",
"has",
"made",
"the",
"greatest",
"number",
"of",
"orders",
"."
] | [
{
"id": 1,
"type": "column",
"value": "customer_last_name"
},
{
"id": 2,
"type": "column",
"value": "phone_number"
},
{
"id": 0,
"type": "column",
"value": "customer_id"
},
{
"id": 4,
"type": "table",
"value": "customers"
},
{
"id": 3,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
1,
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
8,
9
]
},
{
"entity_id": 3,
"token_idxs": [
20
]
},
{
"entity_id": 4,
"token_idxs": [
1... | [
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,555 | movie_3 | bird:train.json:9172 | In 2006, how many restricted films were released? | SELECT COUNT(film_id) FROM film WHERE rating = 'R' AND release_year = 2006 | [
"In",
"2006",
",",
"how",
"many",
"restricted",
"films",
"were",
"released",
"?"
] | [
{
"id": 4,
"type": "column",
"value": "release_year"
},
{
"id": 1,
"type": "column",
"value": "film_id"
},
{
"id": 2,
"type": "column",
"value": "rating"
},
{
"id": 0,
"type": "table",
"value": "film"
},
{
"id": 5,
"type": "value",
"value":... | [
{
"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": [
8
]
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O"
] |
1,556 | bike_1 | spider:train_spider.json:141 | What are the ids of stations that are located in San Francisco and have average bike availability above 10. | SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10 | [
"What",
"are",
"the",
"ids",
"of",
"stations",
"that",
"are",
"located",
"in",
"San",
"Francisco",
"and",
"have",
"average",
"bike",
"availability",
"above",
"10",
"."
] | [
{
"id": 7,
"type": "column",
"value": "bikes_available"
},
{
"id": 5,
"type": "column",
"value": "San Francisco"
},
{
"id": 2,
"type": "column",
"value": "station_id"
},
{
"id": 0,
"type": "table",
"value": "station"
},
{
"id": 1,
"type": "tabl... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"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",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,557 | book_press | bird:test.json:1987 | find the number of authors who are older than 30 for each gender. | SELECT count(*) , gender FROM author WHERE age > 30 GROUP BY gender | [
"find",
"the",
"number",
"of",
"authors",
"who",
"are",
"older",
"than",
"30",
"for",
"each",
"gender",
"."
] | [
{
"id": 0,
"type": "table",
"value": "author"
},
{
"id": 1,
"type": "column",
"value": "gender"
},
{
"id": 2,
"type": "column",
"value": "age"
},
{
"id": 3,
"type": "value",
"value": "30"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
6
]
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O"
] |
1,558 | customers_and_invoices | spider:train_spider.json:1594 | What are the ids and names of accounts with 4 or more transactions? | SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4 | [
"What",
"are",
"the",
"ids",
"and",
"names",
"of",
"accounts",
"with",
"4",
"or",
"more",
"transactions",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "financial_transactions"
},
{
"id": 1,
"type": "column",
"value": "account_name"
},
{
"id": 0,
"type": "column",
"value": "account_id"
},
{
"id": 3,
"type": "table",
"value": "accounts"
},
{
"id": 4,
"type":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
12
]
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O",
"O",
"B-TABLE",
"O"
] |
1,559 | synthea | bird:train.json:1370 | For how long did Elly Koss's cystitis last? | SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Cystitis' | [
"For",
"how",
"long",
"did",
"Elly",
"Koss",
"'s",
"cystitis",
"last",
"?"
] | [
{
"id": 7,
"type": "column",
"value": "description"
},
{
"id": 1,
"type": "table",
"value": "conditions"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 8,
"type": "value",
"value": "Cystitis"
},
{
"id": 2,
"type": "column",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"token_idxs": [
8
... | [
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,560 | cars | bird:train.json:3090 | Calculate the swept volume of the $34538.97449 car. | SELECT T1.displacement / T1.cylinders FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 34538.97449 | [
"Calculate",
"the",
"swept",
"volume",
"of",
"the",
"$",
"34538.97449",
"car",
"."
] | [
{
"id": 4,
"type": "column",
"value": "displacement"
},
{
"id": 3,
"type": "value",
"value": "34538.97449"
},
{
"id": 5,
"type": "column",
"value": "cylinders"
},
{
"id": 1,
"type": "table",
"value": "price"
},
{
"id": 2,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
1,561 | olympics | bird:train.json:5038 | What are the id of the games held in London? | SELECT T1.games_id FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'London' | [
"What",
"are",
"the",
"i",
"d",
"of",
"the",
"games",
"held",
"in",
"London",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "games_city"
},
{
"id": 3,
"type": "column",
"value": "city_name"
},
{
"id": 0,
"type": "column",
"value": "games_id"
},
{
"id": 5,
"type": "column",
"value": "city_id"
},
{
"id": 4,
"type": "value",
"va... | [
{
"entity_id": 0,
"token_idxs": [
7
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
10
]
},
{
"entity_id": 5,
"token_idxs":... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O"
] |
1,562 | baseball_1 | spider:train_spider.json:3700 | Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. | SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000; | [
"Count",
"the",
"total",
"number",
"of",
"games",
"the",
"team",
"Boston",
"Red",
"Stockings",
"attended",
"from",
"1990",
"to",
"2000",
"."
] | [
{
"id": 6,
"type": "value",
"value": "Boston Red Stockings"
},
{
"id": 4,
"type": "column",
"value": "team_id_br"
},
{
"id": 0,
"type": "table",
"value": "home_game"
},
{
"id": 3,
"type": "column",
"value": "team_id"
},
{
"id": 2,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O"
] |
1,563 | customer_complaints | spider:train_spider.json:5810 | What is first names of the top 5 staff who have handled the greatest number of complaints? | SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5 | [
"What",
"is",
"first",
"names",
"of",
"the",
"top",
"5",
"staff",
"who",
"have",
"handled",
"the",
"greatest",
"number",
"of",
"complaints",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "first_name"
},
{
"id": 3,
"type": "table",
"value": "complaints"
},
{
"id": 0,
"type": "column",
"value": "staff_id"
},
{
"id": 2,
"type": "table",
"value": "staff"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,564 | codebase_community | bird:dev.json:679 | Which post has the highest score? Please give its id and title's name. | SELECT T1.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId ORDER BY T2.Score DESC LIMIT 1 | [
"Which",
"post",
"has",
"the",
"highest",
"score",
"?",
"Please",
"give",
"its",
"i",
"d",
"and",
"title",
"'s",
"name",
"."
] | [
{
"id": 5,
"type": "column",
"value": "owneruserid"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 2,
"type": "table",
"value": "users"
},
{
"id": 3,
"type": "table",
"value": "posts"
},
{
"id": 4,
"type": "column",
"value": "s... | [
{
"entity_id": 0,
"token_idxs": [
10,
11
]
},
{
"entity_id": 1,
"token_idxs": [
13
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
1
]
},
{
"entity_id": 4,
"token_idxs": [
5
]
},
{
... | [
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"O"
] |
1,565 | movie_3 | bird:train.json:9382 | For how long can you rent the movie 'Dirty Ace'? | SELECT rental_duration FROM film WHERE title = 'DIRTY ACE' | [
"For",
"how",
"long",
"can",
"you",
"rent",
"the",
"movie",
"'",
"Dirty",
"Ace",
"'",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "rental_duration"
},
{
"id": 3,
"type": "value",
"value": "DIRTY ACE"
},
{
"id": 2,
"type": "column",
"value": "title"
},
{
"id": 0,
"type": "table",
"value": "film"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
1,566 | news_report | spider:train_spider.json:2809 | Show the most common nationality for journalists. | SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | [
"Show",
"the",
"most",
"common",
"nationality",
"for",
"journalists",
"."
] | [
{
"id": 1,
"type": "column",
"value": "nationality"
},
{
"id": 0,
"type": "table",
"value": "journalist"
}
] | [
{
"entity_id": 0,
"token_idxs": [
6
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O"
] |
1,567 | dorm_1 | spider:train_spider.json:5719 | What are the amenities in alphabetical order that Anonymous Donor Hall has? | SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name | [
"What",
"are",
"the",
"amenities",
"in",
"alphabetical",
"order",
"that",
"Anonymous",
"Donor",
"Hall",
"has",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Anonymous Donor Hall"
},
{
"id": 0,
"type": "column",
"value": "amenity_name"
},
{
"id": 4,
"type": "table",
"value": "dorm_amenity"
},
{
"id": 5,
"type": "table",
"value": "has_amenity"
},
{
"id": 2,
"type... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
8,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"tok... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-TABLE",
"B-VALUE",
"O",
"O"
] |
1,568 | cre_Docs_and_Epenses | spider:train_spider.json:6416 | What are project ids of projects that have 2 or more corresponding documents? | SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2 | [
"What",
"are",
"project",
"ids",
"of",
"projects",
"that",
"have",
"2",
"or",
"more",
"corresponding",
"documents",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "project_id"
},
{
"id": 0,
"type": "table",
"value": "documents"
},
{
"id": 2,
"type": "value",
"value": "2"
}
] | [
{
"entity_id": 0,
"token_idxs": [
12
]
},
{
"entity_id": 1,
"token_idxs": [
2,
3
]
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id"... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"B-TABLE",
"O"
] |
1,569 | local_govt_and_lot | spider:train_spider.json:4857 | List the customer event id and the corresponding move in date and property id. | SELECT customer_event_id , date_moved_in , property_id FROM customer_events | [
"List",
"the",
"customer",
"event",
"i",
"d",
"and",
"the",
"corresponding",
"move",
"in",
"date",
"and",
"property",
"i",
"d."
] | [
{
"id": 1,
"type": "column",
"value": "customer_event_id"
},
{
"id": 0,
"type": "table",
"value": "customer_events"
},
{
"id": 2,
"type": "column",
"value": "date_moved_in"
},
{
"id": 3,
"type": "column",
"value": "property_id"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
4,
5
]
},
{
"entity_id": 2,
"token_idxs": [
9,
10
]
},
{
"entity_id": 3,
"token_idxs": [
13,
14,
15
]
},
{
"entity_i... | [
"O",
"O",
"B-TABLE",
"I-TABLE",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN"
] |
1,570 | hospital_1 | spider:train_spider.json:3899 | Find the department with the most employees. | SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1; | [
"Find",
"the",
"department",
"with",
"the",
"most",
"employees",
"."
] | [
{
"id": 1,
"type": "column",
"value": "departmentid"
},
{
"id": 0,
"type": "table",
"value": "department"
},
{
"id": 2,
"type": "column",
"value": "name"
}
] | [
{
"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"
] |
1,571 | government_shift | bird:test.json:363 | Find the details of the services that have been used by more than 3 times . | select t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id = t2.service_id group by t1.service_details having count(*) > 3 | [
"Find",
"the",
"details",
"of",
"the",
"services",
"that",
"have",
"been",
"used",
"by",
"more",
"than",
"3",
"times",
"."
] | [
{
"id": 2,
"type": "table",
"value": "customers_and_services"
},
{
"id": 0,
"type": "column",
"value": "service_details"
},
{
"id": 4,
"type": "column",
"value": "service_id"
},
{
"id": 1,
"type": "table",
"value": "services"
},
{
"id": 3,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
4
]
},
{
"entity_id": 3,
"token_idxs": [
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O"
] |
1,572 | university | bird:train.json:8115 | Give the student staff ratio of university ID 35. | SELECT student_staff_ratio FROM university_year WHERE university_id = 35 | [
"Give",
"the",
"student",
"staff",
"ratio",
"of",
"university",
"ID",
"35",
"."
] | [
{
"id": 1,
"type": "column",
"value": "student_staff_ratio"
},
{
"id": 0,
"type": "table",
"value": "university_year"
},
{
"id": 2,
"type": "column",
"value": "university_id"
},
{
"id": 3,
"type": "value",
"value": "35"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": []
},
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"B-VALUE",
"O"
] |
1,573 | shipping | bird:train.json:5678 | List the driver's name of the shipment shipped on February 22, 2016. | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_date = '2016-02-22' | [
"List",
"the",
"driver",
"'s",
"name",
"of",
"the",
"shipment",
"shipped",
"on",
"February",
"22",
",",
"2016",
"."
] | [
{
"id": 0,
"type": "column",
"value": "first_name"
},
{
"id": 5,
"type": "value",
"value": "2016-02-22"
},
{
"id": 1,
"type": "column",
"value": "last_name"
},
{
"id": 4,
"type": "column",
"value": "ship_date"
},
{
"id": 6,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
8
]
},
{... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,574 | works_cycles | bird:train.json:7405 | What type of employee is David Bradley? | SELECT PersonType FROM Person WHERE FirstName = 'David' AND LastName = 'Bradley' | [
"What",
"type",
"of",
"employee",
"is",
"David",
"Bradley",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "persontype"
},
{
"id": 2,
"type": "column",
"value": "firstname"
},
{
"id": 4,
"type": "column",
"value": "lastname"
},
{
"id": 5,
"type": "value",
"value": "Bradley"
},
{
"id": 0,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
5
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
6
... | [
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"B-VALUE",
"O"
] |
1,575 | manufacturer | spider:train_spider.json:3390 | Return the name and id of the furniture with the highest market rate. | SELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1 | [
"Return",
"the",
"name",
"and",
"i",
"d",
"of",
"the",
"furniture",
"with",
"the",
"highest",
"market",
"rate",
"."
] | [
{
"id": 2,
"type": "column",
"value": "furniture_id"
},
{
"id": 3,
"type": "column",
"value": "market_rate"
},
{
"id": 0,
"type": "table",
"value": "furniture"
},
{
"id": 1,
"type": "column",
"value": "name"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
12,
13
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,576 | college_1 | spider:train_spider.json:3296 | What is the average GPA of students taking ACCT-211? | SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' | [
"What",
"is",
"the",
"average",
"GPA",
"of",
"students",
"taking",
"ACCT-211",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "class_code"
},
{
"id": 1,
"type": "column",
"value": "crs_code"
},
{
"id": 2,
"type": "value",
"value": "ACCT-211"
},
{
"id": 3,
"type": "column",
"value": "stu_gpa"
},
{
"id": 5,
"type": "table",
"val... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": [
4
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-VALUE",
"O"
] |
1,577 | books | bird:train.json:6056 | How many books were published in 2017? | SELECT COUNT(*) FROM book WHERE STRFTIME('%Y', publication_date) = '2017' | [
"How",
"many",
"books",
"were",
"published",
"in",
"2017",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "publication_date"
},
{
"id": 0,
"type": "table",
"value": "book"
},
{
"id": 1,
"type": "value",
"value": "2017"
},
{
"id": 2,
"type": "value",
"value": "%Y"
}
] | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,578 | document_management | spider:train_spider.json:4539 | Find the number of users in each role. | SELECT count(*) , role_code FROM users GROUP BY role_code | [
"Find",
"the",
"number",
"of",
"users",
"in",
"each",
"role",
"."
] | [
{
"id": 1,
"type": "column",
"value": "role_code"
},
{
"id": 0,
"type": "table",
"value": "users"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
7
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O"
] |
1,579 | voter_2 | spider:train_spider.json:5487 | Count the number of male students who had class senator votes in the fall election cycle. | SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = "M" AND T2.Election_Cycle = "Fall" | [
"Count",
"the",
"number",
"of",
"male",
"students",
"who",
"had",
"class",
"senator",
"votes",
"in",
"the",
"fall",
"election",
"cycle",
"."
] | [
{
"id": 3,
"type": "column",
"value": "class_senator_vote"
},
{
"id": 6,
"type": "column",
"value": "election_cycle"
},
{
"id": 1,
"type": "table",
"value": "voting_record"
},
{
"id": 0,
"type": "table",
"value": "student"
},
{
"id": 2,
"type":... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": [
8,
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,... | [
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,580 | college_2 | spider:train_spider.json:1433 | What are the names and salaries of instructors who advise students in the Math department? | SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' | [
"What",
"are",
"the",
"names",
"and",
"salaries",
"of",
"instructors",
"who",
"advise",
"students",
"in",
"the",
"Math",
"department",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "instructor"
},
{
"id": 3,
"type": "column",
"value": "dept_name"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 5,
"type": "table",
"value": "advisor"
},
{
"id": 1,
"type": "column",
"valu... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
5
]
},
{
"entity_id": 2,
"token_idxs": [
10
]
},
{
"entity_id": 3,
"token_idxs": [
14
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,581 | tracking_grants_for_research | spider:train_spider.json:4388 | How many tasks are there in total? | SELECT count(*) FROM Tasks | [
"How",
"many",
"tasks",
"are",
"there",
"in",
"total",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "tasks"
}
] | [
{
"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"
] |
1,582 | insurance_fnol | spider:train_spider.json:906 | Find the claim that has the largest total settlement amount. Return the effective date of the claim. | SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1 | [
"Find",
"the",
"claim",
"that",
"has",
"the",
"largest",
"total",
"settlement",
"amount",
".",
"Return",
"the",
"effective",
"date",
"of",
"the",
"claim",
"."
] | [
{
"id": 4,
"type": "column",
"value": "settlement_amount"
},
{
"id": 1,
"type": "column",
"value": "effective_date"
},
{
"id": 3,
"type": "table",
"value": "settlements"
},
{
"id": 0,
"type": "column",
"value": "claim_id"
},
{
"id": 2,
"type": ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
13,
14
]
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": [
8
]
},
{
"entity_id": 4,
"token_idxs": [
9
]
},
{
... | [
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O"
] |
1,583 | food_inspection_2 | bird:train.json:6126 | How many inspections did All Style Buffet Restaurant have? | SELECT COUNT(T2.inspection_id) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.facility_type = 'Restaurant' AND T1.dba_name = 'All Style Buffet' | [
"How",
"many",
"inspections",
"did",
"All",
"Style",
"Buffet",
"Restaurant",
"have",
"?"
] | [
{
"id": 7,
"type": "value",
"value": "All Style Buffet"
},
{
"id": 0,
"type": "table",
"value": "establishment"
},
{
"id": 2,
"type": "column",
"value": "inspection_id"
},
{
"id": 4,
"type": "column",
"value": "facility_type"
},
{
"id": 1,
"typ... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-TABLE",
"B-COLUMN",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"B-VALUE",
"O",
"O"
] |
1,585 | formula_1 | bird:dev.json:908 | What is the most laps f1 races had? Name the race, year and circuit location where the races with most laps was hosted. | SELECT T3.lap, T2.name, T2.year, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId INNER JOIN lapTimes AS T3 ON T3.raceId = T2.raceId ORDER BY T3.lap DESC LIMIT 1 | [
"What",
"is",
"the",
"most",
"laps",
"f1",
"races",
"had",
"?",
"Name",
"the",
"race",
",",
"year",
"and",
"circuit",
"location",
"where",
"the",
"races",
"with",
"most",
"laps",
"was",
"hosted",
"."
] | [
{
"id": 8,
"type": "column",
"value": "circuitid"
},
{
"id": 3,
"type": "column",
"value": "location"
},
{
"id": 4,
"type": "table",
"value": "laptimes"
},
{
"id": 5,
"type": "table",
"value": "circuits"
},
{
"id": 7,
"type": "column",
"val... | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
9
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
22
]
},
... | [
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O"
] |
1,586 | synthea | bird:train.json:1442 | Calculate the number of female patients who accepted "HPV quadrivalent" immunization. | SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'HPV quadrivalent' AND T1.gender = 'F' | [
"Calculate",
"the",
"number",
"of",
"female",
"patients",
"who",
"accepted",
"\"",
"HPV",
"quadrivalent",
"\"",
"immunization",
"."
] | [
{
"id": 4,
"type": "value",
"value": "HPV quadrivalent"
},
{
"id": 1,
"type": "table",
"value": "immunizations"
},
{
"id": 3,
"type": "column",
"value": "description"
},
{
"id": 0,
"type": "table",
"value": "patients"
},
{
"id": 2,
"type": "co... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
12
]
},
{
"entity_id": 2,
"token_idxs": [
5
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": [
9,
10
]
},
{
"entity_id... | [
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"O",
"B-TABLE",
"O"
] |
1,587 | language_corpus | bird:train.json:5749 | Which word has the most repetitions in the Catalan language? | SELECT T2.word FROM langs_words AS T1 INNER JOIN words AS T2 ON T1.wid = T2.wid WHERE T1.occurrences = ( SELECT MAX(occurrences) FROM langs_words ) | [
"Which",
"word",
"has",
"the",
"most",
"repetitions",
"in",
"the",
"Catalan",
"language",
"?"
] | [
{
"id": 1,
"type": "table",
"value": "langs_words"
},
{
"id": 3,
"type": "column",
"value": "occurrences"
},
{
"id": 2,
"type": "table",
"value": "words"
},
{
"id": 0,
"type": "column",
"value": "word"
},
{
"id": 4,
"type": "column",
"value... | [
{
"entity_id": 0,
"token_idxs": [
1
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
... | [
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,589 | movielens | bird:train.json:2309 | How many actors have acted in both US or UK films? | SELECT COUNT(T1.actorid) FROM movies2actors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'USA' OR T2.country = 'UK' | [
"How",
"many",
"actors",
"have",
"acted",
"in",
"both",
"US",
"or",
"UK",
"films",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "movies2actors"
},
{
"id": 2,
"type": "column",
"value": "actorid"
},
{
"id": 3,
"type": "column",
"value": "movieid"
},
{
"id": 4,
"type": "column",
"value": "country"
},
{
"id": 1,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
2
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
7
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O"
] |
1,590 | college_2 | spider:train_spider.json:1416 | Find the name and salary of the instructors who are advisors of any student from History department? | SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History' | [
"Find",
"the",
"name",
"and",
"salary",
"of",
"the",
"instructors",
"who",
"are",
"advisors",
"of",
"any",
"student",
"from",
"History",
"department",
"?"
] | [
{
"id": 6,
"type": "table",
"value": "instructor"
},
{
"id": 3,
"type": "column",
"value": "dept_name"
},
{
"id": 2,
"type": "table",
"value": "student"
},
{
"id": 4,
"type": "value",
"value": "History"
},
{
"id": 5,
"type": "table",
"value... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": [
13
]
},
{
"entity_id": 3,
"token_idxs": [
16
]
},
{
"entity_id": 4,
"token_idxs": [
15
]
},
... | [
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"O",
"B-TABLE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,591 | restaurant | bird:train.json:1766 | List the food type of the restaurant located in 22779 6th St., Hayward City. | SELECT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_num = 22779 AND T1.street_name = '6th St' AND T2.city = 'hayward' | [
"List",
"the",
"food",
"type",
"of",
"the",
"restaurant",
"located",
"in",
"22779",
"6th",
"St.",
",",
"Hayward",
"City",
"."
] | [
{
"id": 3,
"type": "column",
"value": "id_restaurant"
},
{
"id": 2,
"type": "table",
"value": "generalinfo"
},
{
"id": 6,
"type": "column",
"value": "street_name"
},
{
"id": 4,
"type": "column",
"value": "street_num"
},
{
"id": 0,
"type": "colu... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": [
7,
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"en... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"I-TABLE",
"B-VALUE",
"B-VALUE",
"I-VALUE",
"O",
"B-VALUE",
"B-COLUMN",
"O"
] |
1,592 | warehouse_1 | bird:test.json:1718 | What are the locations of warehouses in which boxes that contain Rocks and Scissors are kept? | SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors' | [
"What",
"are",
"the",
"locations",
"of",
"warehouses",
"in",
"which",
"boxes",
"that",
"contain",
"Rocks",
"and",
"Scissors",
"are",
"kept",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "warehouses"
},
{
"id": 6,
"type": "column",
"value": "warehouse"
},
{
"id": 0,
"type": "column",
"value": "location"
},
{
"id": 3,
"type": "column",
"value": "contents"
},
{
"id": 5,
"type": "value",
"v... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
8
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
10
]
},
{
"entity_id": 4,
"token_idxs": [
11
]
},
{
"entit... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"B-VALUE",
"O",
"O",
"O"
] |
1,593 | california_schools | bird:dev.json:76 | What is the city location of the high school level school with Lunch Provision 2 whose lowest grade is 9 and the highest grade is 12 in the county of Merced? | SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Lunch Provision 2' AND T2.County = 'Merced' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12 AND T2.EILCode = 'HS' | [
"What",
"is",
"the",
"city",
"location",
"of",
"the",
"high",
"school",
"level",
"school",
"with",
"Lunch",
"Provision",
"2",
"whose",
"lowest",
"grade",
"is",
"9",
"and",
"the",
"highest",
"grade",
"is",
"12",
"in",
"the",
"county",
"of",
"Merced",
"?"
... | [
{
"id": 4,
"type": "column",
"value": "NSLP Provision Status"
},
{
"id": 5,
"type": "value",
"value": "Lunch Provision 2"
},
{
"id": 10,
"type": "column",
"value": "High Grade"
},
{
"id": 8,
"type": "column",
"value": "Low Grade"
},
{
"id": 2,
... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
8
]
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-VALUE",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,594 | machine_repair | spider:train_spider.json:2244 | What is the starting year for the oldest technician? | SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1 | [
"What",
"is",
"the",
"starting",
"year",
"for",
"the",
"oldest",
"technician",
"?"
] | [
{
"id": 1,
"type": "column",
"value": "starting_year"
},
{
"id": 0,
"type": "table",
"value": "technician"
},
{
"id": 2,
"type": "column",
"value": "age"
}
] | [
{
"entity_id": 0,
"token_idxs": [
8
]
},
{
"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",
"O",
"B-TABLE",
"O"
] |
1,595 | synthea | bird:train.json:1488 | Name the reason Walter Bahringer visited medical professionals in July 2009. | SELECT T2.REASONDESCRIPTION FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Walter' AND T1.last = 'Bahringer' AND T2.DATE LIKE '2009-07%' | [
"Name",
"the",
"reason",
"Walter",
"Bahringer",
"visited",
"medical",
"professionals",
"in",
"July",
"2009",
"."
] | [
{
"id": 0,
"type": "column",
"value": "reasondescription"
},
{
"id": 2,
"type": "table",
"value": "encounters"
},
{
"id": 7,
"type": "value",
"value": "Bahringer"
},
{
"id": 1,
"type": "table",
"value": "patients"
},
{
"id": 9,
"type": "value",... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
},
{
"entity_id... | [
"O",
"O",
"O",
"B-COLUMN",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,596 | legislator | bird:train.json:4907 | Give the alphanumeric ID of the Catholic legislators in Nebraska. | SELECT T1.bioguide FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.religion_bio = 'Catholic' AND T1.state = 'NE' | [
"Give",
"the",
"alphanumeric",
"ID",
"of",
"the",
"Catholic",
"legislators",
"in",
"Nebraska",
"."
] | [
{
"id": 1,
"type": "table",
"value": "current-terms"
},
{
"id": 4,
"type": "column",
"value": "religion_bio"
},
{
"id": 3,
"type": "column",
"value": "bioguide_id"
},
{
"id": 0,
"type": "column",
"value": "bioguide"
},
{
"id": 5,
"type": "value... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": [
6
]
},
{
... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O"
] |
1,597 | online_exams | bird:test.json:198 | Find the exams whose subject code is not "Database". What are the exam dates and exam names? | SELECT Exam_Date , Exam_Name FROM Exams WHERE Subject_Code != 'Database' | [
"Find",
"the",
"exams",
"whose",
"subject",
"code",
"is",
"not",
"\"",
"Database",
"\"",
".",
"What",
"are",
"the",
"exam",
"dates",
"and",
"exam",
"names",
"?"
] | [
{
"id": 3,
"type": "column",
"value": "subject_code"
},
{
"id": 1,
"type": "column",
"value": "exam_date"
},
{
"id": 2,
"type": "column",
"value": "exam_name"
},
{
"id": 4,
"type": "value",
"value": "Database"
},
{
"id": 0,
"type": "table",
... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
15,
16
]
},
{
"entity_id": 2,
"token_idxs": [
18,
19
]
},
{
"entity_id": 3,
"token_idxs": [
4,
5
]
},
{
"entity_id": 4,
"token_... | [
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O"
] |
1,598 | election_representative | spider:train_spider.json:1175 | List the votes of elections in descending order. | SELECT Votes FROM election ORDER BY Votes DESC | [
"List",
"the",
"votes",
"of",
"elections",
"in",
"descending",
"order",
"."
] | [
{
"id": 0,
"type": "table",
"value": "election"
},
{
"id": 1,
"type": "column",
"value": "votes"
}
] | [
{
"entity_id": 0,
"token_idxs": [
4
]
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O"
] |
1,599 | match_season | spider:train_spider.json:1064 | Show the draft pick numbers and draft classes of players whose positions are defenders. | SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = "Defender" | [
"Show",
"the",
"draft",
"pick",
"numbers",
"and",
"draft",
"classes",
"of",
"players",
"whose",
"positions",
"are",
"defenders",
"."
] | [
{
"id": 1,
"type": "column",
"value": "draft_pick_number"
},
{
"id": 0,
"type": "table",
"value": "match_season"
},
{
"id": 2,
"type": "column",
"value": "draft_class"
},
{
"id": 3,
"type": "column",
"value": "position"
},
{
"id": 4,
"type": "c... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2,
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
6,
7
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
1... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"I-COLUMN",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-COLUMN",
"O"
] |
1,600 | ice_hockey_draft | bird:train.json:6962 | List out the seasons that Niklas Eckerblom played. | SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom' | [
"List",
"out",
"the",
"seasons",
"that",
"Niklas",
"Eckerblom",
"played",
"."
] | [
{
"id": 4,
"type": "value",
"value": "Niklas Eckerblom"
},
{
"id": 1,
"type": "table",
"value": "seasonstatus"
},
{
"id": 2,
"type": "table",
"value": "playerinfo"
},
{
"id": 3,
"type": "column",
"value": "playername"
},
{
"id": 5,
"type": "col... | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
4
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
7
]
},
{
"entity_id": 4,
"token_idxs": [
5,
6
]
},
{
... | [
"O",
"O",
"O",
"B-COLUMN",
"B-TABLE",
"B-VALUE",
"I-VALUE",
"B-COLUMN",
"O"
] |
1,601 | retail_world | bird:train.json:6340 | For the order paying the highest freight, how many kinds of products does it contain? | SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID | [
"For",
"the",
"order",
"paying",
"the",
"highest",
"freight",
",",
"how",
"many",
"kinds",
"of",
"products",
"does",
"it",
"contain",
"?"
] | [
{
"id": 2,
"type": "table",
"value": "Order Details"
},
{
"id": 4,
"type": "column",
"value": "productid"
},
{
"id": 0,
"type": "column",
"value": "orderid"
},
{
"id": 3,
"type": "column",
"value": "freight"
},
{
"id": 1,
"type": "table",
"... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
2
]
},
{
"entity_id": 2,
"token_idxs": [
3
]
},
{
"entity_id": 3,
"token_idxs": [
6
]
},
{
"entity_id": 4,
"token_idxs": [
12
]
},
{
"entity... | [
"O",
"O",
"B-TABLE",
"B-TABLE",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"O"
] |
1,602 | image_and_language | bird:train.json:7555 | State the object class of the image with tallest bounding box. | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID ORDER BY T1.H DESC LIMIT 1 | [
"State",
"the",
"object",
"class",
"of",
"the",
"image",
"with",
"tallest",
"bounding",
"box",
"."
] | [
{
"id": 4,
"type": "column",
"value": "obj_class_id"
},
{
"id": 2,
"type": "table",
"value": "obj_classes"
},
{
"id": 0,
"type": "column",
"value": "obj_class"
},
{
"id": 1,
"type": "table",
"value": "img_obj"
},
{
"id": 3,
"type": "column",
... | [
{
"entity_id": 0,
"token_idxs": [
2,
3
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": []
... | [
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,603 | college_1 | spider:train_spider.json:3328 | What are the first names and offices of history professors who don't have Ph.D.s? | SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree != 'Ph.D.' | [
"What",
"are",
"the",
"first",
"names",
"and",
"offices",
"of",
"history",
"professors",
"who",
"do",
"n't",
"have",
"Ph",
".",
"D.s",
"?"
] | [
{
"id": 8,
"type": "column",
"value": "prof_high_degree"
},
{
"id": 1,
"type": "column",
"value": "prof_office"
},
{
"id": 2,
"type": "table",
"value": "department"
},
{
"id": 0,
"type": "column",
"value": "emp_fname"
},
{
"id": 3,
"type": "tab... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
9
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"O",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-VALUE",
"I-VALUE",
"I-VALUE",
"O"
] |
1,605 | art_1 | bird:test.json:1274 | What are the names of paintings whose width is less than 600 or height is larger than 800? | SELECT title FROM paintings WHERE width_mm < 600 OR height_mm > 800 | [
"What",
"are",
"the",
"names",
"of",
"paintings",
"whose",
"width",
"is",
"less",
"than",
"600",
"or",
"height",
"is",
"larger",
"than",
"800",
"?"
] | [
{
"id": 0,
"type": "table",
"value": "paintings"
},
{
"id": 4,
"type": "column",
"value": "height_mm"
},
{
"id": 2,
"type": "column",
"value": "width_mm"
},
{
"id": 1,
"type": "column",
"value": "title"
},
{
"id": 3,
"type": "value",
"value... | [
{
"entity_id": 0,
"token_idxs": [
5
]
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": [
13
]
},
{
"entit... | [
"O",
"O",
"O",
"O",
"O",
"B-TABLE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-VALUE",
"O"
] |
1,606 | disney | bird:train.json:4638 | Who is the voice actor of the character "Binkie Muddlefoot"? | SELECT `voice-actor` FROM `voice-actors` WHERE character = 'Binkie Muddlefoot' | [
"Who",
"is",
"the",
"voice",
"actor",
"of",
"the",
"character",
"\"",
"Binkie",
"Muddlefoot",
"\"",
"?"
] | [
{
"id": 3,
"type": "value",
"value": "Binkie Muddlefoot"
},
{
"id": 0,
"type": "table",
"value": "voice-actors"
},
{
"id": 1,
"type": "column",
"value": "voice-actor"
},
{
"id": 2,
"type": "column",
"value": "character"
}
] | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": [
3,
4
]
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
9,
10
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"e... | [
"O",
"O",
"O",
"B-COLUMN",
"I-COLUMN",
"O",
"O",
"B-COLUMN",
"O",
"B-VALUE",
"I-VALUE",
"O",
"O"
] |
1,607 | superhero | bird:dev.json:740 | How many female superheroes have a strength value of 100? | SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.attribute_name = 'Strength' AND T2.attribute_value = 100 AND T4.gender = 'Female' | [
"How",
"many",
"female",
"superheroes",
"have",
"a",
"strength",
"value",
"of",
"100",
"?"
] | [
{
"id": 6,
"type": "column",
"value": "attribute_value"
},
{
"id": 4,
"type": "column",
"value": "attribute_name"
},
{
"id": 11,
"type": "table",
"value": "hero_attribute"
},
{
"id": 12,
"type": "column",
"value": "attribute_id"
},
{
"id": 2,
"... | [
{
"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": [
6
]
},
{
... | [
"O",
"O",
"B-VALUE",
"B-TABLE",
"O",
"B-COLUMN",
"B-VALUE",
"B-COLUMN",
"O",
"B-VALUE",
"O"
] |
1,608 | thrombosis_prediction | bird:dev.json:1211 | Provide the ID and age of patient with lactate dehydrogenase (LDH) between 100-300 index above the normal range. | SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 600 AND T2.LDH < 800 | [
"Provide",
"the",
"ID",
"and",
"age",
"of",
"patient",
"with",
"lactate",
"dehydrogenase",
"(",
"LDH",
")",
"between",
"100",
"-",
"300",
"index",
"above",
"the",
"normal",
"range",
"."
] | [
{
"id": 2,
"type": "table",
"value": "laboratory"
},
{
"id": 7,
"type": "column",
"value": "birthday"
},
{
"id": 1,
"type": "table",
"value": "patient"
},
{
"id": 3,
"type": "column",
"value": "ldh"
},
{
"id": 4,
"type": "value",
"value": "... | [
{
"entity_id": 0,
"token_idxs": [
2
]
},
{
"entity_id": 1,
"token_idxs": [
6
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": [
11
]
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
... | [
"O",
"O",
"B-COLUMN",
"O",
"O",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"B-COLUMN",
"O",
"O",
"B-VALUE",
"O",
"O",
"O",
"O",
"O",
"O",
"O",
"O"
] |
1,609 | hospital_1 | spider:train_spider.json:3949 | Which patient is undergoing the most recent treatment? | SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1 | [
"Which",
"patient",
"is",
"undergoing",
"the",
"most",
"recent",
"treatment",
"?"
] | [
{
"id": 2,
"type": "column",
"value": "dateundergoes"
},
{
"id": 0,
"type": "table",
"value": "undergoes"
},
{
"id": 1,
"type": "column",
"value": "patient"
}
] | [
{
"entity_id": 0,
"token_idxs": [
3
]
},
{
"entity_id": 1,
"token_idxs": [
1
]
},
{
"entity_id": 2,
"token_idxs": []
},
{
"entity_id": 3,
"token_idxs": []
},
{
"entity_id": 4,
"token_idxs": []
},
{
"entity_id": 5,
"token_idxs": ... | [
"O",
"B-COLUMN",
"O",
"B-TABLE",
"O",
"O",
"O",
"O",
"O"
] |
1,610 | planet_1 | bird:test.json:1907 | Calculate total weight of package shipped on Mars. | SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID WHERE T3.Name = "Mars"; | [
"Calculate",
"total",
"weight",
"of",
"package",
"shipped",
"on",
"Mars",
"."
] | [
{
"id": 9,
"type": "column",
"value": "shipmentid"
},
{
"id": 5,
"type": "table",
"value": "shipment"
},
{
"id": 7,
"type": "column",
"value": "planetid"
},
{
"id": 8,
"type": "column",
"value": "shipment"
},
{
"id": 4,
"type": "table",
"va... | [
{
"entity_id": 0,
"token_idxs": []
},
{
"entity_id": 1,
"token_idxs": []
},
{
"entity_id": 2,
"token_idxs": [
7
]
},
{
"entity_id": 3,
"token_idxs": [
2
]
},
{
"entity_id": 4,
"token_idxs": [
4
]
},
{
"entity_id": 5,
"... | [
"O",
"O",
"B-COLUMN",
"O",
"B-TABLE",
"B-COLUMN",
"I-COLUMN",
"B-COLUMN",
"O"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.