context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_89 (
player VARCHAR,
finish VARCHAR
) | Who has a finish of t66? | SELECT player FROM table_name_89 WHERE finish = "t66" | sql_create_context |
CREATE TABLE table_49601 (
"Building" text,
"Location" text,
"Height" text,
"Floors" real,
"Status" text
) | Which Status has a Building of the rhombus? | SELECT "Status" FROM table_49601 WHERE "Building" = 'the rhombus' | wikisql |
CREATE TABLE table_69519 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | What is the most recent championship for FISA? | SELECT MAX("Year") FROM table_69519 WHERE "Entrant" = 'fisa' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | count the number of patients who were admitted before 2166 and who have also undergone arterial catheterization. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2166" AND procedures.long_title = "Arterial catheterization" | mimicsql_data |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number... | how many patients were prescribed the drug amoxicillin-clavulanic acid in 2104? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'amoxicillin-clavulanic acid' AND STRFTIME('%y', prescriptions.startdate) = '2104') | mimic_iii |
CREATE TABLE table_name_48 (
grid INTEGER,
laps VARCHAR,
constructor VARCHAR
) | What is the lowest grid value with fewer than 17 laps and constructor Sauber - Petronas? | SELECT MIN(grid) FROM table_name_48 WHERE laps < 17 AND constructor = "sauber - petronas" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | what is age and primary disease of subject name steven sepulveda? | SELECT demographic.age, demographic.diagnosis FROM demographic WHERE demographic.name = "Steven Sepulveda" | mimicsql_data |
CREATE TABLE table_name_86 (
laps INTEGER,
grid VARCHAR,
manufacturer VARCHAR,
time VARCHAR
) | What is the total laps when manufacturer of gilera has time of 40:19.910 and grid is larger than 3? | SELECT SUM(laps) FROM table_name_86 WHERE manufacturer = "gilera" AND time = "40:19.910" AND grid > 3 | sql_create_context |
CREATE TABLE table_42802 (
"Office" text,
"Democratic ticket" text,
"Republican ticket" text,
"Prohibition ticket" text,
"Greenback ticket" text
) | Who was on the prohibition ticket when the Greenback ticket had Thomas Armstrong? | SELECT "Prohibition ticket" FROM table_42802 WHERE "Greenback ticket" = 'thomas armstrong' | wikisql |
CREATE TABLE table_1342198_18 (
party VARCHAR,
incumbent VARCHAR
) | What is the party where the incumbent is overton brooks? | SELECT party FROM table_1342198_18 WHERE incumbent = "Overton Brooks" | sql_create_context |
CREATE TABLE table_24369 (
"Type of Record" text,
"Attendance" real,
"Date/Year" text,
"Stadium" text,
"Result/Games" text
) | What is the result/games of Sun 11/28/10 as the date/year? | SELECT "Result/Games" FROM table_24369 WHERE "Date/Year" = 'Sun 11/28/10' | wikisql |
CREATE TABLE table_67565 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | Pick # that has a Name of jaimie thomas, and a Round smaller than 7 is how many numbers? | SELECT COUNT("Pick #") FROM table_67565 WHERE "Name" = 'jaimie thomas' AND "Round" < '7' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text ... | Number of Posts with Ids in a given interval. | SELECT COUNT(Id) FROM Posts WHERE Id >= '##minId##' AND Id < '##maxId##' | sede |
CREATE TABLE table_63087 (
"Country" text,
"Date" text,
"Label" text,
"Format" text,
"Catalogue No." text
) | what is the format for the country united kingdom on 20 october 2008? | SELECT "Format" FROM table_63087 WHERE "Country" = 'united kingdom' AND "Date" = '20 october 2008' | wikisql |
CREATE TABLE table_39968 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) | On 10 November 2007, what was the venue? | SELECT "Venue" FROM table_39968 WHERE "Date" = '10 november 2007' | wikisql |
CREATE TABLE table_36043 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What is the highest attendance for the game that was before week 6 on October 22, 1967? | SELECT MAX("Attendance") FROM table_36043 WHERE "Date" = 'october 22, 1967' AND "Week" < '6' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | when was the last time that patient 006-80884 had the foley cath output since 876 days ago? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884')) AND intakeoutput.cellpath LIKE '%output%... | eicu |
CREATE TABLE table_22883 (
"Performer" text,
"Performances" real,
"Category" text,
"First performance" text,
"Last performance" text
) | what is the first performance of the last performance on 03/29/1957 | SELECT "First performance" FROM table_22883 WHERE "Last performance" = '03/29/1957' | wikisql |
CREATE TABLE table_63447 (
"Locks & Dam" text,
"Location [L ]" text,
"River Mile" real,
"Lock Side" text,
"Lock Lift/Drop (in feet)" text,
"Pool Length (miles)" text
) | What is the highest River Mile that has a pool length of 42.2 miles or a lock/lift drop of 21 feet? | SELECT MAX("River Mile") FROM table_63447 WHERE "Pool Length (miles)" = '42.2' AND "Lock Lift/Drop (in feet)" = '21' | wikisql |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 编号为18755221的病患从2009年12月20日至2012年11月10日之间被开出药品829624550一共有多少次? | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '18755221' AND t_kc22.STA_DATE BETWEEN '2009-12-20' AND '2012-11-10' AND t_kc22.SOC_SRT_DIRE_CD = '829624550' | css |
CREATE TABLE store (
store_id TINYINT UNSIGNED,
manager_staff_id TINYINT UNSIGNED,
address_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE staff (
staff_id TINYINT UNSIGNED,
first_name VARCHAR(45),
last_name VARCHAR(45),
address_id SMALLINT UNSIGNED,
picture BLOB,
ema... | List the genre name and genre id using a bar chart. | SELECT T2.name, T1.category_id FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id | nvbench |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time... | bring up flights from MILWAUKEE to ORLANDO on wednesday night or thursday morning | 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 ((((flight.departure_time <= 2359 AND flight.departure_time >= 1800) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year... | atis |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Delet... | My answers: Votes and question viewcount. | SELECT a.Id AS "post_link", a.Score AS AnswerScore, q.ViewCount FROM Posts AS a JOIN Posts AS q ON a.ParentId = q.Id WHERE a.OwnerUserId = @UserId ORDER BY a.Score DESC, q.ViewCount DESC | sede |
CREATE TABLE table_name_59 (
country VARCHAR,
finish VARCHAR
) | What country had a Finish of t8? | SELECT country FROM table_name_59 WHERE finish = "t8" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is the number of patients whose days of hospital stay is greater than 20 and diagnoses short title is hx of breast malignancy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "20" AND diagnoses.short_title = "Hx of breast malignancy" | mimicsql_data |
CREATE TABLE table_name_90 (
points INTEGER,
entrant VARCHAR,
year VARCHAR
) | How many points for the cooper car company after 1959? | SELECT SUM(points) FROM table_name_90 WHERE entrant = "cooper car company" AND year > 1959 | sql_create_context |
CREATE TABLE table_20251343_4 (
competition VARCHAR,
head_to_head VARCHAR
) | Name the competition for australia 13, new zealand 40, drawn 3 | SELECT competition FROM table_20251343_4 WHERE head_to_head = "Australia 13, New Zealand 40, Drawn 3" | sql_create_context |
CREATE TABLE table_7982 (
"Frequency" text,
"Call sign" text,
"Branding" text,
"Format" text,
"Owner" text
) | Who owns the kool-fm branding? | SELECT "Owner" FROM table_7982 WHERE "Branding" = 'kool-fm' | wikisql |
CREATE TABLE table_29011 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | How many picks did the Chicago Black Hawks get? | SELECT COUNT("Pick #") FROM table_29011 WHERE "NHL team" = 'Chicago Black Hawks' | wikisql |
CREATE TABLE table_18641 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | How many parties does william b. cravens represent? | SELECT COUNT("Party") FROM table_18641 WHERE "Incumbent" = 'William B. Cravens' | wikisql |
CREATE TABLE table_24283 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | How many total positions are there for utah college? | SELECT COUNT("Position") FROM table_24283 WHERE "College" = 'Utah' | wikisql |
CREATE TABLE table_41500 (
"Tournament" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text
) | What 2009 has grand slam tournaments of 2008? | SELECT "2009" FROM table_41500 WHERE "2008" = 'grand slam tournaments' | wikisql |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by time, and I want to list by the mean salary in asc. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 医疗就诊34573036541挂的门诊号是哪个?或者提供下相对应的住院号 | SELECT t_kc21.CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '34573036541' | css |
CREATE TABLE table_12820 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) | What is 2nd Party, when 1st Member is 'Alan Dower'? | SELECT "2nd Party" FROM table_12820 WHERE "1st Member" = 'alan dower' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 在患者任英媛的医疗记录中,他的药品消费金额在2878.63元以上的医疗就诊有哪几次?编号是什么 | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '任英媛' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 2878.63) | css |
CREATE TABLE player (
birth_country VARCHAR
) | List three countries which are the origins of the least players. | SELECT birth_country FROM player GROUP BY birth_country ORDER BY COUNT(*) LIMIT 3 | sql_create_context |
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE writes (
paperid int,
... | How many papers on computer science education in 2016 ? | SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'computer science education' | scholar |
CREATE TABLE table_50383 (
"Tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | What was the 2009 results that has q1 for 2010, and A as the result for 2011? | SELECT "2009" FROM table_50383 WHERE "2010" = 'q1' AND "2011" = 'a' | wikisql |
CREATE TABLE table_203_8 (
id number,
"player" text,
"rec." number,
"yards" number,
"avg." number,
"td's" number,
"long" number
) | who is the only player to have a negative yard average ? | SELECT "player" FROM table_203_8 WHERE "yards" < 0 | squall |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | how many patients were admitted to the hospital before the year 2138 with a lab test folate? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2138" AND lab.label = "Folate" | mimicsql_data |
CREATE TABLE table_name_52 (
last_10_meetings VARCHAR,
overall_record VARCHAR
) | What is the last 10 meetings that have slu, 9-8 as the overall record? | SELECT last_10_meetings FROM table_name_52 WHERE overall_record = "slu, 9-8" | sql_create_context |
CREATE TABLE table_67511 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | What shows for 2007 at the Olympic Games as tournament. | SELECT "2007" FROM table_67511 WHERE "Tournament" = 'olympic games' | wikisql |
CREATE TABLE table_name_61 (
set_3 VARCHAR,
total VARCHAR,
time VARCHAR,
score VARCHAR
) | Which set 3 has a Time of 10:00, and a Score of 3 2, and a Total of 113 102? | SELECT set_3 FROM table_name_61 WHERE time = "10:00" AND score = "3–2" AND total = "113–102" | sql_create_context |
CREATE TABLE table_54769 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
) | What is the date of the race when Jack Brabham is in the pole position and the circuit is Spa-Francorchamps? | SELECT "Date" FROM table_54769 WHERE "Pole position" = 'jack brabham' AND "Circuit" = 'spa-francorchamps' | wikisql |
CREATE TABLE table_203_755 (
id number,
"singing position" number,
"song title" text,
"informal translation" text,
"act" text,
"percentage of votes" text,
"final position" text
) | which song did not have more than 15 % of the votes and was not unknown ? | SELECT "song title" FROM table_203_755 WHERE "percentage of votes" <= 15 | squall |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | what are the five most frequently occurring specimen tests in the last year? | SELECT t1.culturesite FROM (SELECT microlab.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microlab WHERE DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY microlab.culturesite) AS t1 WHERE t1.c1 <= 5 | eicu |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 之前患者62748683的就诊医院是哪里 | SELECT hz_info_mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz... | css |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | among patients who were diagnosed with congestive heart failure since 3 years ago, what are the top five most commonly prescribed drugs that followed afterwards in the same month to the patients aged 60 or above? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'congestive heart failure' AND DATETIME(diagnosis.d... | eicu |
CREATE TABLE table_15289 (
"First game" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Percentage" text
) | What is the average number of games played associated with a first game in 1997 and over 0 games drawn? | SELECT AVG("Played") FROM table_15289 WHERE "First game" = '1997' AND "Drawn" > '0' | wikisql |
CREATE TABLE table_73374 (
"Season" text,
"League" text,
"Division" text,
"GP" real,
"W" real,
"L" real,
"T" real,
"OTL" real,
"SOL" real,
"Pts" real,
"PCT" text,
"GF" real,
"GA" real,
"PIM" real,
"Coach(es)" text,
"Result" text
) | What was the season where the team reached a GP of 244? | SELECT "Season" FROM table_73374 WHERE "GF" = '244' | wikisql |
CREATE TABLE table_11070 (
"Pick" real,
"Round" real,
"Player" text,
"Position" text,
"School" text
) | What is the pick number for School of lsu? | SELECT SUM("Pick") FROM table_11070 WHERE "School" = 'lsu' | wikisql |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 给病患63491444开具的都超过3235.03元的药品在哪几次医疗记录中?列出来医疗就诊编号是多少? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '63491444' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 3235.03) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '63491444' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CL... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | calculate the average of female patients who have medicaid health insurance. | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.insurance = "Medicaid" | mimicsql_data |
CREATE TABLE table_53734 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | What is the Partner with Opponents in the final with roy emerson rod laver, with Date smaller than 1975? | SELECT "Partner" FROM table_53734 WHERE "Opponents in the final" = 'roy emerson rod laver' AND "Date" < '1975' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | count the number of patients whose gender is m and diagnoses long title is injury to femoral nerve? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Injury to femoral nerve" | mimicsql_data |
CREATE TABLE table_3351 (
"meas. num" real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
) | Name the least yes votes for yes passed | SELECT MIN("YES votes") FROM table_3351 WHERE "passed" = 'YES' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | count the number of patients whose death status is 1 and diagnoses long title is other persistent mental disorders due to conditions classified elsewhere? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.long_title = "Other persistent mental disorders due to conditions classified elsewhere" | mimicsql_data |
CREATE TABLE table_12746 (
"Nat." text,
"Name" text,
"Moving from" text,
"Type" text,
"Transfer window" text,
"Ends" real,
"Transfer fee" text
) | What is the transfer window for Hleb? | SELECT "Transfer window" FROM table_12746 WHERE "Name" = 'hleb' | wikisql |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
... | 66010048的患者自10.10.13起,到13.3.16止,看过的病总共有多少种 | SELECT COUNT(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_ID = '66010048' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-10-13' AND '2013-03-16' | css |
CREATE TABLE table_71236 (
"School" text,
"Location" text,
"Mascot" text,
"County" text,
"Enrollment IHSAA Class" text,
"Joined" real,
"Previous Conference" text
) | Which previous conference is associated with Penn school? | SELECT "Previous Conference" FROM table_71236 WHERE "School" = 'penn' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 在医院2592878中的各科室它们的编码、名称以及平均住院时长按照平均住院时长升序排序列出来是啥样? | SELECT qtb.MED_ORG_DEPT_CD, qtb.MED_ORG_DEPT_NM, AVG(qtb.IN_HOSP_DAYS) FROM qtb WHERE qtb.MED_SER_ORG_NO = '2592878' GROUP BY qtb.MED_ORG_DEPT_CD ORDER BY AVG(qtb.IN_HOSP_DAYS) UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.MED_ORG_DEPT_NM, AVG(gyb.IN_HOSP_DAYS) FROM gyb WHERE gyb.MED_SER_ORG_NO = '2592878' GROUP BY gyb.MED_ORG... | css |
CREATE TABLE table_204_217 (
id number,
"camp" text,
"div sec\ndivision" text,
"admin\ndistrict" text,
"9 feb" number,
"11 feb" number,
"16 feb" number,
"25 feb" number,
"27 feb" number,
"2 mar" number,
"4 mar" number,
"6 mar" number,
"11 mar" number,
"13 mar" num... | how many camps did vavuniya represent ? | SELECT COUNT("camp") FROM table_204_217 WHERE "div sec\ndivision" = 'vavuniya' | squall |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE DEPARTMENT (
DEPT_CODE var... | Draw a bar chart for how many different locations does each school have? | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_ADDRESS) FROM DEPARTMENT | nvbench |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of email and department_id , sort in desc by the X. | SELECT EMAIL, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL DESC | nvbench |
CREATE TABLE table_54833 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What date did the home team score 12.12 (84)? | SELECT "Date" FROM table_54833 WHERE "Home team score" = '12.12 (84)' | wikisql |
CREATE TABLE table_name_82 (
year_founded VARCHAR,
state__province VARCHAR,
institution_name VARCHAR
) | What year was Waynesburg University founded in Pennsylvania? | SELECT year_founded FROM table_name_82 WHERE state__province = "pennsylvania" AND institution_name = "waynesburg university" | sql_create_context |
CREATE TABLE table_name_71 (
attendance INTEGER,
date VARCHAR
) | What was the attendance on september 8? | SELECT AVG(attendance) FROM table_name_71 WHERE date = "september 8" | sql_create_context |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE compartment_class ... | what is the last flight from DALLAS to BOSTON in the evening | 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, flight WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTO... | atis |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restrict... | please show me the flights from WASHINGTON to SAN FRANCISCO | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN... | atis |
CREATE TABLE table_14043 (
"Rank" real,
"Artist" text,
"Album" text,
"Peak position" text,
"Sales" real,
"Certification" text
) | what is the lowest rank when the peak position is 2, certification is platinum and the album is my december? | SELECT MIN("Rank") FROM table_14043 WHERE "Peak position" = '2' AND "Certification" = 'platinum' AND "Album" = 'my december' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | Bin the hire date into Month interval, and then compute the average salary of employees in each month for a bar chart, note that just select those employees without the letter M in their first name, display by the the average of salary from high to low. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE table_name_97 (
position VARCHAR,
pick__number VARCHAR
) | What is the Position of Pick #321? | SELECT position FROM table_name_97 WHERE pick__number = 321 | sql_create_context |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | In regardless to upper-level classes , who teaches them ? | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_... | advising |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 病人韩飞烟在医疗机构8914725的门诊就诊过多少次?在2010-09-30到2019-07-07的这几年里 | SELECT COUNT(*) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '韩飞烟' AND mzjzjlb.JZKSRQ BETWEEN '2010-09-30' AND '2019-07-07' AND mzjzjlb.YLJGDM = '8914725' | css |
CREATE TABLE table_52539 (
"Rider" text,
"Horse" text,
"Faults" text,
"Round 1 + 2A + 2B + 3A Points" text,
"Total" real
) | What horse did not start and had a total of over 16.16? | SELECT "Horse" FROM table_52539 WHERE "Faults" = 'did not start' AND "Total" > '16.16' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE p... | tell me, what was the top five most common procedures of patients in the 30s since 1 year ago? | 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 30 AND 39) AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-1 yea... | eicu |
CREATE TABLE table_57849 (
"Information" text,
"Dysart" text,
"Shadow Ridge" text,
"Valley Vista" text,
"Willow Canyon" text
) | What Valley Vista has a Willow Canyon of 2169? | SELECT "Valley Vista" FROM table_57849 WHERE "Willow Canyon" = '2169' | wikisql |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
... | how many people had died after being diagnosed with ventltr assoc pneumonia during the same hospital encounter in 2103? | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id 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 FRO... | mimic_iii |
CREATE TABLE table_name_99 (
date_made VARCHAR,
fleet_numbers VARCHAR
) | What is the date made that has an associated fleet number of 4? | SELECT date_made FROM table_name_99 WHERE fleet_numbers = "4" | sql_create_context |
CREATE TABLE table_54817 (
"Marginal Ordinary Income Tax Rate" text,
"Single" text,
"Married Filing Jointly or Qualified Widow(er)" text,
"Married Filing Separately" text,
"Head of Household" text
) | Name the married filing separately for single of $0 $8,350 | SELECT "Married Filing Separately" FROM table_54817 WHERE "Single" = '$0–$8,350' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM ... | 给患者吴煜祺审核检验报告的人员工号及姓名是什么,在72786598852这个医疗就诊中 | SELECT zyjybgb.SHRGH, zyjybgb.SHRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '72786598852' UNION SELECT mzjybgb.SHRGH, mzjybgb.SHRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '72786598852' | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | list the number of patients with congestive heart failure. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CONGESTIVE HEART FAILURE" | mimicsql_data |
CREATE TABLE table_2375 (
"Title/Subject" text,
"Public Office" text,
"Artist" text,
"Date Painted/Created" text,
"Medium" text
) | Who was the subject of the bronze sculpture who was a colonist and soldier in Ville Marie, New France? | SELECT "Title/Subject" FROM table_2375 WHERE "Medium" = 'Bronze' AND "Public Office" = 'colonist and soldier in Ville Marie, New France' | wikisql |
CREATE TABLE table_name_52 (
frequency__mhz_ VARCHAR,
type VARCHAR,
call_letters VARCHAR
) | Frequency (MHz) that has a Type of primary, and a Call letters of ktbb-fm has what total number? | SELECT COUNT(frequency__mhz_) FROM table_name_52 WHERE type = "primary" AND call_letters = "ktbb-fm" | sql_create_context |
CREATE TABLE table_29824 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What is the team they played on november 25? | SELECT "Team" FROM table_29824 WHERE "Date" = 'November 25' | wikisql |
CREATE TABLE table_2261 (
"Episode Number" real,
"Episode" text,
"Rating" text,
"Share" real,
"Rating/Share (18-49)" text,
"Viewers (millions)" text,
"Rank (Timeslot)" text,
"Rank (Overall)" text
) | What is overall rank when viewers are at 6.59 million? | SELECT "Rank (Overall)" FROM table_2261 WHERE "Viewers (millions)" = '6.59' | wikisql |
CREATE TABLE table_16000 (
"Nomination" text,
"Actors Name" text,
"Film Name" text,
"Director" text,
"Country" text
) | What was the film Falling up nominated for? | SELECT "Nomination" FROM table_16000 WHERE "Film Name" = 'Falling Up' | wikisql |
CREATE TABLE table_15620 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | Who played Men's singles in 2007? | SELECT "Men's singles" FROM table_15620 WHERE "Year" = '2007' | wikisql |
CREATE TABLE genre (
g_name varchar2(20),
rating varchar2(10),
most_popular_in varchar2(50)
)
CREATE TABLE files (
f_id number(10),
artist_name varchar2(50),
file_size varchar2(20),
duration varchar2(20),
formats varchar2(20)
)
CREATE TABLE artist (
artist_name varchar2(50),
co... | What countries are the female artists who sung in the language Bangla from, and count them by a bar chart, list in desc by the X-axis. | SELECT T1.country, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" AND T2.languages = "bangla" GROUP BY T1.country ORDER BY T1.country DESC | nvbench |
CREATE TABLE table_5134 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the Final" text,
"Score" text
) | Final that has a Date of january 10, 2004 had what opponent? | SELECT "Opponent in the Final" FROM table_5134 WHERE "Date" = 'january 10, 2004' | wikisql |
CREATE TABLE table_name_22 (
round VARCHAR,
res VARCHAR,
record VARCHAR
) | What round was a loss with a record of 12-3? | SELECT round FROM table_name_22 WHERE res = "loss" AND record = "12-3" | sql_create_context |
CREATE TABLE table_80420 (
"Year" text,
"Carries" real,
"Rushing Yards" real,
"Average" real,
"Touchdowns" real,
"Points" real
) | What is the sum of carries associated with 80 points and fewer than 16 touchdowns? | SELECT SUM("Carries") FROM table_80420 WHERE "Points" = '80' AND "Touchdowns" < '16' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | what number of patients having expired in or before the year 2180 underwent the procedure for local excision of lesion or tissue of bone, scapula, clavicle, and thorax [ribs and sternum]? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2180.0" AND procedures.long_title = "Local excision of lesion or tissue of bone, scapula, clavicle, and thorax [ribs and sternum]" | mimicsql_data |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | what was the drug patient 016-27397 had been prescribed two times this month? | 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 = '016... | eicu |
CREATE TABLE table_3994 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | What is the production code that was written by matt robinson? | SELECT "Production code" FROM table_3994 WHERE "Written by" = 'Matt Robinson' | wikisql |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_... | Before ARCH 201 what are the essential courses that I should take ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ARCH' AND number = 201 | advising |
CREATE TABLE table_31960 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | I want the average bronze for total of 19 and silver of 8 with rank of 31 | SELECT AVG("Bronze") FROM table_31960 WHERE "Total" = '19' AND "Silver" = '8' AND "Rank" = '31' | wikisql |
CREATE TABLE asset_parts (
asset_id number,
part_id number
)
CREATE TABLE staff (
staff_id number,
staff_name text,
gender text,
other_staff_details text
)
CREATE TABLE skills (
skill_id number,
skill_code text,
skill_description text
)
CREATE TABLE skills_required_to_fix (
pa... | Which parts have more than 2 faults? Show the part name and id. | SELECT T1.part_name, T1.part_id FROM parts AS T1 JOIN part_faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2 | spider |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
las... | tell me the test that was last given to patient 29410 in 11/2102? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT labevents.itemid FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 29410) AND STRFTIME('%y-%m', labevents.charttime) = '2102-11' ORDER BY labevents.charttime DESC LIMIT 1) | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.