Unnamed: 0
int64
0
3k
text
stringlengths
74
2.32k
200
###HUMAN: show me all flights from TORONTO, ###ASSISTANT: SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'TORONTO' AND flight.from_airport = airport_service.airport_code
201
###HUMAN: Find Answer by Text and UserId., ###ASSISTANT: SELECT * FROM Posts WHERE OwnerUserId = '##UserId##' AND ParentId > 0 AND Body LIKE '%##Text##%'
202
###HUMAN: What school had a team name of the Trojans?, ###ASSISTANT: SELECT "School" FROM table_37988 WHERE "Team Name" = 'trojans'
203
###HUMAN: how many patients whose admission year is less than 2166 and drug name is loperamide?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2166" AND prescriptions.drug = "Loperamide"
204
###HUMAN: How many tree species are in the kitechura reserve?, ###ASSISTANT: SELECT tree_species FROM table_16577990_1 WHERE central_forest_reserve = "Kitechura"
205
###HUMAN: Tell me the horse when the faults are 9 and the total is 46.36, ###ASSISTANT: SELECT "Horse" FROM table_12013 WHERE "Faults" = '9' AND "Total" = '46.36'
206
###HUMAN: What average total has 0 as the gold, with 6 as the rank?, ###ASSISTANT: SELECT AVG(total) FROM table_name_69 WHERE gold = 0 AND rank = "6"
207
###HUMAN: does patient 85169 had any drain out #1 jackson pratt output?, ###ASSISTANT: SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85169)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'drain out #1 jackson pratt' AND d_items.linksto = 'outputevents')
208
###HUMAN: What are the different names of the colleges involved in the tryout in alphabetical order?, ###ASSISTANT: SELECT DISTINCT cname FROM tryout ORDER BY cname
209
###HUMAN: what is the place when the score is 68-70-68=206?, ###ASSISTANT: SELECT place FROM table_name_3 WHERE score = 68 - 70 - 68 = 206
210
###HUMAN: For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and commission_pct , order in ascending by the total number., ###ASSISTANT: SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT
211
###HUMAN: what year did the rush allow the most goals ?, ###ASSISTANT: SELECT "season" FROM table_204_32 ORDER BY "ga" DESC LIMIT 1
212
###HUMAN: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday, and I want to order from low to high by the y axis., ###ASSISTANT: SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(MANAGER_ID)
213
###HUMAN: How many of the female patients belonged to a black/cape verdean ethnic origin?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "BLACK/CAPE VERDEAN"
214
###HUMAN: what are the five most frequently prescribed drugs in 2101 for patients prescribed with dexmedetomidine hcl at the same time?, ###ASSISTANT: SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'dexmedetomidine hcl' AND STRFTIME('%y', prescriptions.startdate) = '2101') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE STRFTIME('%y', prescriptions.startdate) = '2101') AS t2 ON t1.subject_id = t2.subject_id WHERE DATETIME(t1.startdate) = DATETIME(t2.startdate) GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 5
215
###HUMAN: Return a bar chart on how many movie reviews does each director get?, and order in asc by the bars., ###ASSISTANT: SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director ORDER BY director
216
###HUMAN: Total weeks of 49,980 attendance?, ###ASSISTANT: SELECT SUM(week) FROM table_name_55 WHERE attendance = 49 OFFSET 980
217
###HUMAN: Name the 2008 for 2012 of sf, ###ASSISTANT: SELECT 2008 FROM table_name_41 WHERE 2012 = "sf"
218
###HUMAN: nejat konuk and dervi &#351; ero &#287; lu are from which party ?, ###ASSISTANT: SELECT "party" FROM table_203_694 WHERE "name" IN ('nejat konuk', 'dervis eroglu')
219
###HUMAN: How many ansi codes are there for longitude 46.415037?, ###ASSISTANT: SELECT COUNT(ansi_code) FROM table_18600760_20 WHERE latitude = "46.415037"
220
###HUMAN: What's the railway number of a D(rebuild) class?, ###ASSISTANT: SELECT railway_number_s_ FROM table_name_28 WHERE class = "d(rebuild)"
221
###HUMAN: screening egfr < 60 ml / min / 1.73 m2, ###ASSISTANT: SELECT * FROM table_train_169 WHERE estimated_glomerular_filtration_rate_egfr < 60
222
###HUMAN: what is the name of the drug that patient 002-41152 has been prescribed two or more times last month?, ###ASSISTANT: SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-41152')) AND DATETIME(medication.drugstarttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') GROUP BY medication.drugname) AS t1 WHERE t1.c1 >= 2
223
###HUMAN: What is the average number lost when the PCT is more than 0.7334 and the total number of games is larger than 48?, ###ASSISTANT: SELECT AVG("Lost") FROM table_10468 WHERE "Pct." > '0.7334' AND "Total Games" > '48'
224
###HUMAN: how many times did patient 010-6098 since 128 months ago receive crystalloids?, ###ASSISTANT: SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-6098')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'crystalloids' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-128 month')
225
###HUMAN: how much does the minimum hospital cost including a procedure called hypotonic fluid administration - d5w until 1 year ago?, ###ASSISTANT: SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'hypotonic fluid administration - d5w')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY cost.patienthealthsystemstayid) AS t1
226
###HUMAN: How much is the lowest Operating Expenditures when Contributions are more than 8,245,241?, ###ASSISTANT: SELECT MIN("Operating Expenditures") FROM table_54361 WHERE "Contributions" > '8,245,241'
227
###HUMAN: what is the daily maximum amount of the foley of patient 14458 during their first hospital visit?, ###ASSISTANT: SELECT MAX(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14458 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'foley' AND d_items.linksto = 'outputevents') GROUP BY STRFTIME('%y-%m-%d', outputevents.charttime)
228
###HUMAN: How many gold medals does the country ranked higher than 2 with more than 8 bronze have?, ###ASSISTANT: SELECT SUM("Gold") FROM table_70723 WHERE "Rank" < '2' AND "Bronze" > '8'
229
###HUMAN: total number of models created ., ###ASSISTANT: SELECT COUNT(DISTINCT "model name") FROM table_203_873
230
###HUMAN: Which engine has a Year larger than 1969?, ###ASSISTANT: SELECT engine FROM table_name_7 WHERE year > 1969
231
###HUMAN: Who was the home team when the away team was Footscray?, ###ASSISTANT: SELECT "Home team" FROM table_53738 WHERE "Away team" = 'footscray'
232
###HUMAN: Which position was active in Jazz in 2002-03?, ###ASSISTANT: SELECT position FROM table_name_59 WHERE years_for_jazz = "2002-03"
233
###HUMAN: on this month/27 what was the respiration minimum value of patient 005-87465?, ###ASSISTANT: SELECT MIN(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465')) AND NOT vitalperiodic.respiration IS NULL AND DATETIME(vitalperiodic.observationtime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', vitalperiodic.observationtime) = '27'
234
###HUMAN: Which actor won in 1966?, ###ASSISTANT: SELECT actor FROM table_name_43 WHERE year = 1966
235
###HUMAN: i would like the earliest morning flight from ATLANTA to PHILADELPHIA on wednesday morning, ###ASSISTANT: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 0 AND 1200) AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, flight AS FLIGHTalias1 WHERE ((CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'PHILADELPHIA' AND DATE_DAYalias1.day_number = 23 AND DATE_DAYalias1.month_number = 4 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'ATLANTA' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND FLIGHTalias1.departure_time BETWEEN 0 AND 1200)
236
###HUMAN: For outgoing manager is alberto malesani mention all the applicable replaced by person, ###ASSISTANT: SELECT "Replaced by" FROM table_3703 WHERE "Outgoing manager" = 'Alberto Malesani'
237
###HUMAN: How many losses are there for team tembetary?, ###ASSISTANT: SELECT losses FROM table_18703133_6 WHERE team = "Tembetary"
238
###HUMAN: What is the main presenter of bulgaria?, ###ASSISTANT: SELECT main_presenters FROM table_1053802_1 WHERE region_country = "Bulgaria"
239
###HUMAN: What is the original artist when the vocal percussionist is Alexei Kalveks?, ###ASSISTANT: SELECT original_artist FROM table_28715942_5 WHERE vocal_percussionist = "Alexei Kalveks"
240
###HUMAN: How many documents in different ending date? Return a line chart grouping by ending date., ###ASSISTANT: SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Date_in_Locaton_To
241
###HUMAN: What is the sum of all total medals with more than 2 bronze medals and more than 1 gold medal for the United States?, ###ASSISTANT: SELECT SUM(total) FROM table_name_27 WHERE bronze > 2 AND nation = "united states" AND gold > 1
242
###HUMAN: What was the winning score of the Buy.com Siouxland Open?, ###ASSISTANT: SELECT "Winning score" FROM table_70472 WHERE "Tournament" = 'buy.com siouxland open'
243
###HUMAN: Provide me the number of patients born before 1846 who have an abnormal lab test status., ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "1846" AND lab.flag = "abnormal"
244
###HUMAN: What is Country, when Previous Team (League) is 'Kingston Frontenacs ( OHL )', and when Player is 'Anthony Stewart Category:Articles with hCards'?, ###ASSISTANT: SELECT "Country" FROM table_59768 WHERE "Previous team (League)" = 'kingston frontenacs ( ohl )' AND "Player" = 'anthony stewart category:articles with hcards'
245
###HUMAN: Find the title and star rating of the movie that got the least rating star for each reviewer., ###ASSISTANT: SELECT T2.title, T1.rid, T1.stars, MIN(T1.stars) FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid GROUP BY T1.rid
246
###HUMAN: List roles that have more than one employee. List the role description and number of employees., ###ASSISTANT: SELECT roles.role_description, COUNT(employees.employee_id) FROM roles JOIN employees ON employees.role_code = roles.role_code GROUP BY employees.role_code HAVING COUNT(employees.employee_id) > 1
247
###HUMAN: What nations participated in 2007?, ###ASSISTANT: SELECT "Nations" FROM table_66466 WHERE "Year" = '2007'
248
###HUMAN: How many tourists visited the country that had 2.5 million tourists in 2011?, ###ASSISTANT: SELECT "International tourist arrivals (2012)" FROM table_34550 WHERE "International tourist arrivals (2011)" = '2.5 million'
249
###HUMAN: What stage did team Carrera Jeans-Tassoni have when Mario Cipollini won and Claudio Chiappucci had the points?, ###ASSISTANT: SELECT "Stage" FROM table_11219 WHERE "Trofeo Fast Team" = 'carrera jeans-tassoni' AND "Winner" = 'mario cipollini' AND "Points classification" = 'claudio chiappucci'
250
###HUMAN: Name the replaced by for august 9, ###ASSISTANT: SELECT "Replaced by" FROM table_27597 WHERE "Date of vacancy" = 'August 9' AND "Date of appointment" = 'August 9'
251
###HUMAN: What venue was on 27 May 2000?, ###ASSISTANT: SELECT venue FROM table_name_81 WHERE date = "27 may 2000"
252
###HUMAN: has patient 029-584 ever had a medication prescribed the last year?, ###ASSISTANT: SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-584')) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
253
###HUMAN: What is Socket, when Part Number(s) is au80610003495aa?, ###ASSISTANT: SELECT "Socket" FROM table_9828 WHERE "Part number(s)" = 'au80610003495aa'
254
###HUMAN: how many hours have passed since the patient 95057 was admitted to the hospital?, ###ASSISTANT: SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 95057 AND admissions.dischtime IS NULL
255
###HUMAN: how many of the patients aged below 76 had migraine unspecified w/o ntrc mgrn?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "76" AND diagnoses.short_title = "Migrne unsp wo ntrc mgrn"
256
###HUMAN: Which To par has a Year of 1994?, ###ASSISTANT: SELECT to_par FROM table_name_24 WHERE year = 1994
257
###HUMAN: Draw a bar chart about the distribution of meter_700 and ID , and rank meter_700 in desc order., ###ASSISTANT: SELECT meter_700, ID FROM swimmer ORDER BY meter_700 DESC
258
###HUMAN: Which year was the peter jackson classic?, ###ASSISTANT: SELECT year FROM table_name_36 WHERE championship = "peter jackson classic"
259
###HUMAN: TOTAL number of SUCCESSFUL questions., ###ASSISTANT: SELECT COUNT(DISTINCT p.Id) FROM Posts AS p WHERE p.PostTypeId = 1 AND NOT p.AcceptedAnswerId IS NULL
260
###HUMAN: when did patient 19040 first get a procedure on their first hospital visit?, ###ASSISTANT: SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19040 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) ORDER BY procedures_icd.charttime LIMIT 1
261
###HUMAN: what are the procedures that are the top four most commonly received?, ###ASSISTANT: SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4
262
###HUMAN: what is the number of patients whose gender is f and primary disease is st elevated myocardial infarction\cardiac cath?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH"
263
###HUMAN: give me the number of patients whose diagnoses short title is enterococcus group d?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Enterococcus group d"
264
###HUMAN: What district has a constituency of 60?, ###ASSISTANT: SELECT district FROM table_name_27 WHERE constituency_number = "60"
265
###HUMAN: When were there less than 1 point with a cosworth v8 engine in jolly club switzerland?, ###ASSISTANT: SELECT "Year" FROM table_14553 WHERE "Points" < '1' AND "Engine" = 'cosworth v8' AND "Entrant" = 'jolly club switzerland'
266
###HUMAN: For the flyers, what's the minimum capacity?, ###ASSISTANT: SELECT MIN("Capacity") FROM table_20718 WHERE "Team Nickname" = 'Flyers'
267
###HUMAN: give the number of patients who are born before 2180 with a ivpca drug route., ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2180" AND prescriptions.route = "IVPCA"
268
###HUMAN: You can return a bar chart with employees' first names and their salaries, display by the y axis from high to low., ###ASSISTANT: SELECT FIRST_NAME, SALARY FROM employees ORDER BY SALARY DESC
269
###HUMAN: Name the scores for chris ramsey and carol vorderman, ###ASSISTANT: SELECT scores FROM table_23292220_17 WHERE seans_team = "Chris Ramsey and Carol Vorderman"
270
###HUMAN: What is the number of games for the season with 10 ties?, ###ASSISTANT: SELECT games FROM table_name_86 WHERE tied = 10
271
###HUMAN: What year did she place 8th in the junior race?, ###ASSISTANT: SELECT year FROM table_name_9 WHERE event = "junior race" AND position = "8th"
272
###HUMAN: A bar chart for what are the number of the descriptions of the categories that products with product descriptions that contain the letter t are in?, and rank y-axis in ascending order., ###ASSISTANT: SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY COUNT(product_category_description)
273
###HUMAN: What is the smallest Earnings that has a Money list rank of 6 and Starts smaller than 22?, ###ASSISTANT: SELECT MIN("Earnings ($)") FROM table_56530 WHERE "Money list rank" = '6' AND "Starts" < '22'
274
###HUMAN: What year had 32 moves?, ###ASSISTANT: SELECT SUM("Year") FROM table_8509 WHERE "Moves" = '32'
275
###HUMAN: how long was the m1894 rifle 's barrel ?, ###ASSISTANT: SELECT "barrel length" FROM table_204_343 WHERE "model" = 'm1894 rifle'
276
###HUMAN: How many Atts that have Yards of 43 and a Long larger than 43?, ###ASSISTANT: SELECT SUM(att) FROM table_name_65 WHERE yards = 43 AND long > 43
277
###HUMAN: How many times are listed for 31 May for the rider ranked 5?, ###ASSISTANT: SELECT COUNT(mon_31_may) FROM table_25220821_4 WHERE rank = 5
278
###HUMAN: Plot how many name by grouped by name as a bar graph, and sort by the total number in descending., ###ASSISTANT: SELECT name, COUNT(name) FROM train GROUP BY name ORDER BY COUNT(name) DESC
279
###HUMAN: Which constructor has a Time/Retired of +37.311?, ###ASSISTANT: SELECT "Constructor" FROM table_56316 WHERE "Time/Retired" = '+37.311'
280
###HUMAN: What is the 2007 result when the 2010 result was 2r, at the US Open?, ###ASSISTANT: SELECT 2007 FROM table_name_91 WHERE 2010 = "2r" AND tournament = "us open"
281
###HUMAN: when does the train arriving at bourne at 11.45 departure, ###ASSISTANT: SELECT "Departure" FROM table_22277 WHERE "Going to" = 'Bourne' AND "Arrival" = '11.45'
282
###HUMAN: Users with close-vote privileges ordered by last access date.., ###ASSISTANT: SELECT ROW_NUMBER() OVER (ORDER BY LastAccessDate DESC) AS " ", Id AS "user_link", LastAccessDate FROM Users WHERE Reputation > 3000 ORDER BY LastAccessDate DESC
283
###HUMAN: Which Time/Retired has a Grid smaller than 3, and a Driver of mika h kkinen?, ###ASSISTANT: SELECT time_retired FROM table_name_58 WHERE grid < 3 AND driver = "mika häkkinen"
284
###HUMAN: What was the higest attendance on November 9, 1958?, ###ASSISTANT: SELECT MAX(attendance) FROM table_name_4 WHERE date = "november 9, 1958"
285
###HUMAN: How many losses did the team with 22 goals for andmore than 8 games played have?, ###ASSISTANT: SELECT COUNT("Losses") FROM table_78521 WHERE "Goals For" = '22' AND "Games Played" > '8'
286
###HUMAN: What is the largest overall number of major hurricanes?, ###ASSISTANT: SELECT MAX(number_of_major_hurricanes) FROM table_2930244_3
287
###HUMAN: count the number of patients whose primary disease is morbid obesity/sda and drug name is soln.?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND prescriptions.drug = "Soln."
288
###HUMAN: What is Position, when Caps is Example, and When Player is Shane Kelly?, ###ASSISTANT: SELECT "Position" FROM table_41531 WHERE "Caps" = 'example' AND "Player" = 'shane kelly'
289
###HUMAN: Which Proto-Austronesian has a Proto-Oceanic of *lima?, ###ASSISTANT: SELECT proto_austronesian FROM table_name_97 WHERE proto_oceanic = "*lima"
290
###HUMAN: What is the Away team at the Wolverhampton Wanderers Home game with a Score of 2 0?, ###ASSISTANT: SELECT "Away team" FROM table_60349 WHERE "Score" = '2–0' AND "Home team" = 'wolverhampton wanderers'
291
###HUMAN: The match against Oleg Taktarov had what result?, ###ASSISTANT: SELECT res FROM table_name_19 WHERE opponent = "oleg taktarov"
292
###HUMAN: what is the four most frequently ordered procedure for a patient with an age 40s?, ###ASSISTANT: SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4
293
###HUMAN: What was the featured in Engine through rounds 10-13?, ###ASSISTANT: SELECT "Engine" FROM table_55779 WHERE "Rounds" = '10-13'
294
###HUMAN: What was Laurel's division record?, ###ASSISTANT: SELECT "Division Record" FROM table_67113 WHERE "School" = 'laurel'
295
###HUMAN: What is the lowest Games, when Name is Jeremiah Massey, and when Points is less than 340?, ###ASSISTANT: SELECT MIN(games) FROM table_name_91 WHERE name = "jeremiah massey" AND points < 340
296
###HUMAN: How many people wrote the episode directed by Arvin Brown?, ###ASSISTANT: SELECT COUNT(written_by) FROM table_30030227_1 WHERE directed_by = "Arvin Brown"
297
###HUMAN: How many years was ensign n180b a Chassis with 4 points?, ###ASSISTANT: SELECT SUM("Year") FROM table_70406 WHERE "Points" = '4' AND "Chassis" = 'ensign n180b'
298
###HUMAN: among patients who were diagnosed with routine circumcision during a year before, what are the top three most frequent procedures that followed afterwards within 2 months?, ###ASSISTANT: SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'routine circumcision') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, procedures_icd.icd9_code, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t2.charttime) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.icd9_code) AS t3 WHERE t3.c1 <= 3)
299
###HUMAN: Which Opponent has an Away of 1 1, and a Home of 3 3?, ###ASSISTANT: SELECT "Opponent" FROM table_75827 WHERE "Away" = '1–1' AND "Home" = '3–3'