Unnamed: 0
int64
0
3k
text
stringlengths
74
2.32k
400
###HUMAN: what are the top three most frequently used specimen tests given to patients in the same hospital visit after being diagnosed with poison-medicinal agt nos?, ###ASSISTANT: SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id 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 = 'poison-medicinal agt nos')) AS t1 JOIN (SELECT admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id FROM microbiologyevents JOIN admissions ON microbiologyevents.hadm_id = admissions.hadm_id) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND t1.hadm_id = t2.hadm_id GROUP BY t2.spec_type_desc) AS t3 WHERE t3.c1 <= 3
401
###HUMAN: what are the five most frequently prescribed drugs since 5 years ago for patients prescribed with atropine 0.1 mg/ml inj syringe at the same time?, ###ASSISTANT: SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'atropine 0.1 mg/ml inj syringe' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5
402
###HUMAN: When was the date of death for the person married to Charles II?, ###ASSISTANT: SELECT death FROM table_name_86 WHERE spouse = "charles ii"
403
###HUMAN: count the number of patients whose gender is f and procedure icd9 code is 4610?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.icd9_code = "4610"
404
###HUMAN: How many points did Carlin have when they had 3 wins?, ###ASSISTANT: SELECT points FROM table_name_90 WHERE wins = "3" AND team = "carlin"
405
###HUMAN: In the final, who are the opponents of partner Simon Aspelin?, ###ASSISTANT: SELECT "Opponents in the final" FROM table_35942 WHERE "Partner" = 'simon aspelin'
406
###HUMAN: how much does the arterial bp [systolic] of patient 8116 vary second measured on the current intensive care unit visit compared to the first value measured on the current intensive care unit visit?, ###ASSISTANT: SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1 OFFSET 1) - (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8116) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systolic]' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1)
407
###HUMAN: Name the representative for party of whig, ###ASSISTANT: SELECT "Representative" FROM table_69618 WHERE "Party" = 'whig'
408
###HUMAN: What is the status of the district where the result is 63% 37%?, ###ASSISTANT: SELECT status FROM table_16185956_1 WHERE results = "63% 37%"
409
###HUMAN: What is the Kashmiri word for the Indonesian word senin?, ###ASSISTANT: SELECT kashmiri FROM table_name_90 WHERE indonesian = "senin"
410
###HUMAN: how many female patients followed the procedure ven cath renal dialysis?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "Ven cath renal dialysis"
411
###HUMAN: Which City of license has a Call sign of k241an?, ###ASSISTANT: SELECT city_of_license FROM table_name_68 WHERE call_sign = "k241an"
412
###HUMAN: Where is the orchestra when the year of recording is 1934?, ###ASSISTANT: SELECT "Orchestra" FROM table_73366 WHERE "Year of Recording" = '1934'
413
###HUMAN: How many number of site have May 1, 2004 as the date?, ###ASSISTANT: SELECT COUNT(site) FROM table_22098274_1 WHERE date = "May 1, 2004"
414
###HUMAN: how many times has patient 015-56390 recieved a enteral tube intake: nasoduodenal nostril, r 10f intake in 12/last year?, ###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 = '015-56390')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'enteral tube intake: nasoduodenal nostril, r 10f' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', intakeoutput.intakeoutputtime) = '12'
415
###HUMAN: What is Current Rank, when Ring Name is Kimurayama Mamoru?, ###ASSISTANT: SELECT "Current rank" FROM table_40076 WHERE "Ring name" = 'kimurayama mamoru'
416
###HUMAN: What was the nationality of the skater with 108.8 points?, ###ASSISTANT: SELECT nation FROM table_name_52 WHERE points = 108.8
417
###HUMAN: what are the top four most frequently diagnosed diagnoses among the patients in the 20s since 1 year ago?, ###ASSISTANT: SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 4
418
###HUMAN: What is the total number of To Par, when Score is '70-75-76=221'?, ###ASSISTANT: SELECT COUNT("To par") FROM table_45574 WHERE "Score" = '70-75-76=221'
419
###HUMAN: For CS , are there any upper elective courses offered ?, ###ASSISTANT: SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id
420
###HUMAN: Number of unanswered question (zero answers) per month., ###ASSISTANT: SELECT LAST_DATE_OF_MONTH(q.CreationDate), COUNT(q.Id) AS Count FROM Posts AS q WHERE (q.PostTypeId = 1) AND (q.AnswerCount = 0) GROUP BY LAST_DATE_OF_MONTH(q.CreationDate) ORDER BY LAST_DATE_OF_MONTH(q.CreationDate)
421
###HUMAN: flights from KANSAS CITY to CLEVELAND on wednesday before 1700, ###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 ((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.departure_time < 1700 AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CLEVELAND' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'KANSAS CITY' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
422
###HUMAN: What is the total number of 2012 Employees (Total) when 2007 Employees (Total) is 8,985, and rank (2010) is smaller than 9?, ###ASSISTANT: SELECT COUNT("2012 Employees (Total)") FROM table_63078 WHERE "2007 Employees (Total)" = '8,985' AND "Rank (2010)" < '9'
423
###HUMAN: With a rank of 2 what is the second quarter?, ###ASSISTANT: SELECT "Second quarter" FROM table_36998 WHERE "Rank" = '2'
424
###HUMAN: What party did hilda solis represent?, ###ASSISTANT: SELECT "Party" FROM table_22126 WHERE "Incumbent" = 'Hilda Solis'
425
###HUMAN: what was the last height of patient 005-73237 in the last month., ###ASSISTANT: SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-73237') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY patient.unitadmittime DESC LIMIT 1
426
###HUMAN: how old was patient 035-18528's age during the first hospital visit?, ###ASSISTANT: SELECT patient.age FROM patient WHERE patient.uniquepid = '035-18528' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1
427
###HUMAN: What is the score for Greg Norman, ###ASSISTANT: SELECT "Score" FROM table_12721 WHERE "Player" = 'greg norman'
428
###HUMAN: What is the Artist with a Date that is june 1979?, ###ASSISTANT: SELECT "Artist" FROM table_40579 WHERE "Date" = 'june 1979'
429
###HUMAN: how many married patients have lab test item id 51214?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.itemid = "51214"
430
###HUMAN: Name the total number of series for march 19, 2000, ###ASSISTANT: SELECT COUNT("No. in series") FROM table_22590 WHERE "Original air date" = 'March 19, 2000'
431
###HUMAN: What is the line of the station in Toolamba that is currently demolished and closed in the late 1970s?, ###ASSISTANT: SELECT "Line" FROM table_14710 WHERE "Current Status" = 'demolished' AND "Closed" = 'late 1970s' AND "Location" = 'toolamba'
432
###HUMAN: What is every value on Thursday August 25 for rank 3?, ###ASSISTANT: SELECT thurs_25_aug FROM table_30058355_3 WHERE rank = 3
433
###HUMAN: what diagnosis did patient 025-53910 receive last?, ###ASSISTANT: SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-53910')) ORDER BY diagnosis.diagnosistime DESC LIMIT 1
434
###HUMAN: What is the location for the club trophy?, ###ASSISTANT: SELECT location FROM table_name_69 WHERE type = "club trophy"
435
###HUMAN: How many values of total top 3 placements does Taiwan have?, ###ASSISTANT: SELECT COUNT(total_top_3_placements) FROM table_2876467_3 WHERE region_represented = "Taiwan"
436
###HUMAN: What are the names of the airports in the city of Goroka?, ###ASSISTANT: SELECT name FROM airports WHERE city = 'Goroka'
437
###HUMAN: Questions by date - backwards., ###ASSISTANT: SELECT Id, Score, ViewCount, Title, Tags, LastActivityDate, CreationDate FROM Posts WHERE PostTypeId = 1 ORDER BY CreationDate LIMIT 50
438
###HUMAN: What is the Date for the game at michie stadium west point, ny?, ###ASSISTANT: SELECT date FROM table_name_80 WHERE location = "michie stadium • west point, ny"
439
###HUMAN: Can you tell me the highest Against that has the Losses larger than 9, and the Byes of 2, and the Draws larger than 0?, ###ASSISTANT: SELECT MAX(against) FROM table_name_56 WHERE losses > 9 AND byes = 2 AND draws > 0
440
###HUMAN: When is a Type of tko, and an Opponent of jesse brinkley, ###ASSISTANT: SELECT date FROM table_name_53 WHERE type = "tko" AND opponent = "jesse brinkley"
441
###HUMAN: What was Shaun Murphy's outcome in the Premier League Snooker championship held before 2010?, ###ASSISTANT: SELECT outcome FROM table_name_1 WHERE championship = "premier league snooker" AND year < 2010
442
###HUMAN: Which commission was launched 28 june 1934, and has a Pennant number of h.78?, ###ASSISTANT: SELECT commissioned FROM table_name_40 WHERE launched = "28 june 1934" AND pennant_number = "h.78"
443
###HUMAN: Which Total Pts have a 2001 02 Pts smaller than 38?, ###ASSISTANT: SELECT MIN("Total Pts") FROM table_78639 WHERE "2001\u201302 Pts" < '38'
444
###HUMAN: give me the difference between the total of the input and the output of patient 26057 on 12/27/this year., ###ASSISTANT: SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26057)) AND DATETIME(inputevents_cv.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m-%d', inputevents_cv.charttime) = '12-27') - (SELECT SUM(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 = 26057)) AND DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m-%d', outputevents.charttime) = '12-27')
445
###HUMAN: Find the dates on which more than one revisions were made, and the bin the date of latest revision into weekday interval and count them as a line chart., ###ASSISTANT: SELECT date_of_latest_revision, COUNT(date_of_latest_revision) FROM Catalogs
446
###HUMAN: What is the acronym for the name Malay of Kolej Komuniti Sungai Petani?, ###ASSISTANT: SELECT "Acronym" FROM table_61910 WHERE "Name in Malay" = 'kolej komuniti sungai petani'
447
###HUMAN: What year has earnings of $557,158?, ###ASSISTANT: SELECT MAX("Year") FROM table_35365 WHERE "Earnings ($)" = '557,158'
448
###HUMAN: what's the points against with won being 11, ###ASSISTANT: SELECT points_against FROM table_14058433_4 WHERE won = "11"
449
###HUMAN: What was the team score when Tim Duncan (12) got the high rebounds?, ###ASSISTANT: SELECT "Score" FROM table_29788 WHERE "High rebounds" = 'Tim Duncan (12)'
450
###HUMAN: what was the name of the drug that patient 433 had been prescribed two or more times?, ###ASSISTANT: SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 433) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 >= 2
451
###HUMAN: did patient 027-151154 receive angiogram - with coiling at other hospitals?, ###ASSISTANT: SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '027-151154' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '027-151154' AND patient.hospitaldischargetime IS NULL)) AND treatment.treatmentname = 'angiogram - with coiling'
452
###HUMAN: Which Constellation has an Apparent magnitude larger that 7.7, and an NGC number of 7777, ###ASSISTANT: SELECT constellation FROM table_name_60 WHERE apparent_magnitude > 7.7 AND ngc_number = 7777
453
###HUMAN: until 95 months ago, had entacapone ever been prescribed to patient 7241?, ###ASSISTANT: SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7241) AND prescriptions.drug = 'entacapone' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-95 month')
454
###HUMAN: what was last value of heart rate of patient 14467 today?, ###ASSISTANT: SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14467)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_items.linksto = 'chartevents') AND DATETIME(chartevents.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') ORDER BY chartevents.charttime DESC LIMIT 1
455
###HUMAN: What is the place of the Pinyin transcription Xi Wangri?, ###ASSISTANT: SELECT MAX(standard_order) FROM table_1805919_1 WHERE transcription__based_on_pinyin_ = "Xi Wangri"
456
###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 hire_date and the average of salary bin hire_date by weekday., ###ASSISTANT: SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
457
###HUMAN: Count the number of patients on a main drug type prescription with diagnoses icd9 code 41512., ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "41512" AND prescriptions.drug_type = "MAIN"
458
###HUMAN: Name the least game for score of l 93 109 (ot), ###ASSISTANT: SELECT MIN(game) FROM table_23186738_9 WHERE score = "L 93–109 (OT)"
459
###HUMAN: Top 10 Users from India by Reputation., ###ASSISTANT: SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%IND' ORDER BY Reputation DESC LIMIT 100
460
###HUMAN: Show me about the distribution of meter_300 and meter_100 in a bar chart, and I want to show Y from low to high order., ###ASSISTANT: SELECT meter_300, meter_100 FROM swimmer ORDER BY meter_100
461
###HUMAN: How many completion students in each day? Return a bar chart binning date of completion by weekday, and I want to sort y-axis in asc order., ###ASSISTANT: SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_completion)
462
###HUMAN: had patient 016-9636 excreted output amt-chest tube a in 12/this year?, ###ASSISTANT: SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.celllabel = 'output amt-chest tube a' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', intakeoutput.intakeoutputtime) = '12'
463
###HUMAN: Count the names of all the products in the store and return me a bar chart, could you order Name in asc order?, ###ASSISTANT: SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY Name
464
###HUMAN: who was the pitcher in seasons 1982, 1984, 1985, 1987, 1988, 1989, ###ASSISTANT: SELECT pitcher FROM table_19864214_3 WHERE seasons = "1982, 1984, 1985, 1987, 1988, 1989"
465
###HUMAN: List first name and last name of customers that have more than 2 payments., ###ASSISTANT: SELECT T2.first_name, T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING COUNT(*) > 2
466
###HUMAN: what was the number of patients that were tested since 5 years ago for sputum, tracheal specimen microbiology?, ###ASSISTANT: SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, tracheal specimen' AND DATETIME(microlab.culturetakentime) >= DATETIME(CURRENT_TIME(), '-5 year'))
467
###HUMAN: What is the player listed when the score is 68-70-68-69=275, ###ASSISTANT: SELECT player FROM table_28498999_5 WHERE score = 68 - 70 - 68 - 69 = 275
468
###HUMAN: what's the name of the specimen test that was first given to patient 40967 during the last hospital encounter?, ###ASSISTANT: SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40967 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) ORDER BY microbiologyevents.charttime LIMIT 1
469
###HUMAN: What is the Loan Club from Eng that ended on 22 February?, ###ASSISTANT: SELECT loan_club FROM table_name_57 WHERE country = "eng" AND ended = "22 february"
470
###HUMAN: What is the maximum renewable energy (gw h) for the state of Delaware?, ###ASSISTANT: SELECT MAX(renewable_electricity__gw) AS •h_ FROM table_25244412_1 WHERE state = "Delaware"
471
###HUMAN: How many competitions in each competition type? And split them by country, show in desc by the x-axis., ###ASSISTANT: SELECT Country, COUNT(Country) FROM competition GROUP BY Competition_type, Country ORDER BY Country DESC
472
###HUMAN: Which game had a result of 126-95?, ###ASSISTANT: SELECT "Game" FROM table_75338 WHERE "Result" = '126-95'
473
###HUMAN: All posts of a user., ###ASSISTANT: SELECT OwnerUserId AS "user_link", u.DisplayName, p.Id AS "post_link", ParentId AS "post_link", Title FROM Posts AS p LEFT OUTER JOIN Users AS u ON u.Id = OwnerUserId WHERE OwnerUserId = 65889
474
###HUMAN: In which club is Ledley King a captain?, ###ASSISTANT: SELECT club FROM table_name_3 WHERE captain = "ledley king"
475
###HUMAN: Which team had 21 points?, ###ASSISTANT: SELECT "Team" FROM table_20007 WHERE "Points" = '21'
476
###HUMAN: With Round 3 and Pick # over 10, what is the higher Overall number?, ###ASSISTANT: SELECT MAX(overall) FROM table_name_38 WHERE round = 3 AND pick__number > 10
477
###HUMAN: Who is the tournament winner in the Atlantic Coast Conference?, ###ASSISTANT: SELECT tournament_winner FROM table_22779004_1 WHERE conference = "Atlantic Coast conference"
478
###HUMAN: what is the latest FIRST class flight of the day leaving DALLAS for SAN FRANCISCO, ###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, fare, fare_basis, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time = (SELECT MAX(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, fare AS FAREalias1, fare_basis AS FARE_BASISalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE (CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'SAN FRANCISCO' AND FARE_BASISalias1.class_type = 'FIRST' AND FAREalias1.fare_basis_code = FARE_BASISalias1.fare_basis_code AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'DALLAS' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code)
479
###HUMAN: has patient 030-8973 had any enteral osmolte 1.5 intake since 66 months ago., ###ASSISTANT: SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-8973')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'enteral osmolte 1.5' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-66 month')
480
###HUMAN: which district has the greatest total number of electorates ?, ###ASSISTANT: SELECT "district" FROM table_204_255 GROUP BY "district" ORDER BY SUM("number of electorates (2009)") DESC LIMIT 1
481
###HUMAN: What is the title and source for the game developed by Hydravision Entertainment?, ###ASSISTANT: SELECT "Title and source" FROM table_3580 WHERE "Developer" = 'Hydravision Entertainment'
482
###HUMAN: give me the number of patients whose year of death is less than or equal to 2158 and procedure icd9 code is 3615?, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2158.0" AND procedures.icd9_code = "3615"
483
###HUMAN: Which college has fewer than 2 rounds?, ###ASSISTANT: SELECT "College" FROM table_35540 WHERE "Round" < '2'
484
###HUMAN: What was the score for a game with the odds of p + 2 after 1847?, ###ASSISTANT: SELECT score FROM table_name_36 WHERE odds = "p + 2" AND date > 1847
485
###HUMAN: What is the district with the result mac collins (r) unopposed?, ###ASSISTANT: SELECT district FROM table_27021001_1 WHERE result = "Mac Collins (R) unopposed"
486
###HUMAN: what are the four most commonly prescribed drugs for patients who are prescribed cefepime 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 = 'cefepime') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id) 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 <= 4
487
###HUMAN: Name the least world rank for south american rank 3, ###ASSISTANT: SELECT MIN(world_rank) FROM table_2249087_1 WHERE south_american_rank = 3
488
###HUMAN: what is the color quality when the proxy is x, the encryption is x, the webclient is x and authentication is ?, ###ASSISTANT: SELECT "Color Quality" FROM table_65068 WHERE "Proxy" = 'x' AND "Encryption" = 'x' AND "Web Client" = 'x' AND "Authentication" = '✓'
489
###HUMAN: Which Advanced Portuguese courses have 8 credits , can you show me ?, ###ASSISTANT: SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Advanced Portuguese%' OR name LIKE '%Advanced Portuguese%') AND credits = 8
490
###HUMAN: select Title, Posts.Id, PostLinks.RelatedPostId, PostLinks.PostId from Posts inner join PostLinks O., ###ASSISTANT: SELECT Title, Posts.Id, PostLinks.RelatedPostId, PostLinks.PostId FROM Posts INNER JOIN PostLinks ON PostLinks.LinkTypeId = 3 AND (Posts.Id = PostLinks.PostId OR Posts.Id = PostLinks.RelatedPostId)
491
###HUMAN: How many faculty members did the university that conferred the most degrees in 2002 have?, ###ASSISTANT: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1
492
###HUMAN: which was the first state to be formed ?, ###ASSISTANT: SELECT "name" FROM table_203_190 ORDER BY "formed" LIMIT 1
493
###HUMAN: what was the number of winners from spain ?, ###ASSISTANT: SELECT "winners" FROM table_203_600 WHERE "country" = 'spain'
494
###HUMAN: how many patients were diagnosed as having transaminase elevation within 2 months after being diagnosed with hypoglycemia?, ###ASSISTANT: SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'transaminase elevation') AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypoglycemia') AS t2 WHERE t1.diagnosistime < t2.diagnosistime AND DATETIME(t2.diagnosistime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month')
495
###HUMAN: Calculate the total number of patients admitted before the year 2174, ###ASSISTANT: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admityear < "2174"
496
###HUMAN: What is the for the f136fb engine?, ###ASSISTANT: SELECT "Usage" FROM table_14101 WHERE "Engine" = 'f136fb'
497
###HUMAN: When middle assyrian empire is the ubaid period in mesopotamia what is the copper age?, ###ASSISTANT: SELECT copper_age FROM table_23537091_1 WHERE ubaid_period_in_mesopotamia = "Middle Assyrian Empire"
498
###HUMAN: Top 100K users by hit rate (accepted answer percentage rate). 100 users having the highest accepted answer percentage rate (among users with >100 answers), ###ASSISTANT: SELECT u.Id AS "user_link", COUNT(a.Id), (CAST(SUM(CASE WHEN a.Id = q.AcceptedAnswerId THEN 1 ELSE 0 END) AS FLOAT) / COUNT(a.Id)) * 100 AS HitRate FROM Users AS u JOIN Posts AS a ON a.OwnerUserId = u.Id AND a.PostTypeId = 2 JOIN Posts AS q ON a.ParentId = q.Id GROUP BY u.Id HAVING COUNT(a.Id) > 25 ORDER BY HitRate DESC LIMIT 100000
499
###HUMAN: How many Against have a Team of hespanha, and Points smaller than 30?, ###ASSISTANT: SELECT COUNT("Against") FROM table_40250 WHERE "Team" = 'hespanha' AND "Points" < '30'