instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_52 (
year VARCHAR,
chassis VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of years for talbot-lago t26c and points less than 3
| SELECT COUNT(year) FROM table_name_52 WHERE chassis = "talbot-lago t26c" AND points < 3 | sql_create_context |
CREATE TABLE table_27537870_3 (
october VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On how many days in October was the score 6-1?
| SELECT COUNT(october) FROM table_27537870_3 WHERE score = "6-1" | sql_create_context |
CREATE TABLE table_name_17 (
runners_up VARCHAR,
individual VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the runners-up when the individual winner was Tiger Woods?
| SELECT runners_up FROM table_name_17 WHERE individual = "tiger woods" | sql_create_context |
CREATE TABLE table_16986 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text,
"Nickname" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the institution barton college
| SELECT "Location" FROM table_16986 WHERE "Institution" = 'Barton College' | wikisql |
CREATE TABLE table_name_84 (
tournament VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament is on October 27, 2003?
| SELECT tournament FROM table_name_84 WHERE date = "october 27, 2003" | sql_create_context |
CREATE TABLE table_35079 (
"Date" text,
"Kicker" text,
"Kicking team" text,
"Opponent" text,
"Yards" real,
"Result" text,
"Game time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Opponent of new york giants, and a Yards smaller than 68 is ... | SELECT "Kicker" FROM table_35079 WHERE "Opponent" = 'new york giants' AND "Yards" < '68' | wikisql |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ORALHEAL' AND number = 811 | advising |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT (SELECT vitalperiodic.systemicsystolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-19005') AND NOT patient.unitdischarget... | eicu |
CREATE TABLE table_16423070_4 (
basketball VARCHAR,
cross_country VARCHAR,
track_ VARCHAR,
_field VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who won basketball when ashland won track & field and cross country
| SELECT basketball FROM table_16423070_4 WHERE track_ & _field = "Ashland" AND cross_country = "Ashland" | sql_create_context |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | SELECT zzmzjzjlb.SG, zzmzjzjlb.TZ, zzmzjzjlb.TW, zzmzjzjlb.SSY, zzmzjzjlb.SZY, zzmzjzjlb.XL, zzmzjzjlb.HXPLC, zzmzjzjlb.ML FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '84028994033' UNION SELECT fzzmzjzjlb.SG, fzzmzjzjlb.TZ, fzzmzjzjlb.TW, fzzmzjzjlb.SSY, fzzmzjzjlb.SZY, fzzmzjzjlb.XL, fzzmzjzjlb.HXPLC, fzzmzjzjlb.ML FROM fz... | css |
CREATE TABLE table_14007 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points are in the scor... | SELECT SUM("Scored") FROM table_14007 WHERE "Points" = '8' AND "Position" < '10' | wikisql |
CREATE TABLE table_15092 (
"Tournament" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2009 value with q1 in 2010?
| SELECT "2009" FROM table_15092 WHERE "2010" = 'q1' | wikisql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '9681293' GROUP BY IN_DIAG_DIS_NM | css |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
... | SELECT p.Id AS "post_link" FROM Posts AS p INNER JOIN PostHistory AS e ON e.PostId = p.Id WHERE e.PostHistoryTypeId = 13 AND p.OwnerUserId = '##userid##' GROUP BY p.Id, p.CreationDate ORDER BY p.CreationDate DESC | sede |
CREATE TABLE table_25369796_1 (
series VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the series where a team scored 56 points?
| SELECT series FROM table_25369796_1 WHERE points = "56" | sql_create_context |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE chart... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54390) AND STRFTIME('%y', procedures_icd.charttime) = '2102' ORDER BY procedures_icd.charttime DESC LIMIT 1 | mimic_iii |
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 jybgb (
BBCJBW text,
BBDM tex... | SELECT txmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE person_info.XM = '陈淑兰' AND NOT txmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2010-02-1... | css |
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... | 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 = '40200914' AND t_kc22.STA_DATE BETWEEN '2007-11-20' AND '2017-11-08' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE table_58663 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ... | SELECT MAX("Goals For") FROM table_58663 WHERE "Team" = 'cheadle town' AND "Drawn" > '7' | wikisql |
CREATE TABLE table_57831 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the years for Redhill school, authority of state?
| SELECT "Years" FROM table_57831 WHERE "Authority" = 'state' AND "Name" = 'redhill school' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "85" AND prescriptions.route = "NEB" | mimicsql_data |
CREATE TABLE table_name_29 (
sunday_surya__the_sun_ VARCHAR,
monday_soma__the_moon_ VARCHAR,
tuesday_mangala__mars_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result on Sunday that's somav r on Monday and mangalav r on Tuesday?
| SELECT sunday_surya__the_sun_ FROM table_name_29 WHERE monday_soma__the_moon_ = "सोमवार somavār" AND tuesday_mangala__mars_ = "मंगलवार mangalavār" | sql_create_context |
CREATE TABLE table_74863 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was their record when they were at Pittsburgh?
| SELECT "Record" FROM table_74863 WHERE "Home" = 'pittsburgh' | wikisql |
CREATE TABLE table_74477 (
"Rank" real,
"School" text,
"Appearances" real,
"Wins" real,
"Losses" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the average Rank for lossess less than 6 and wins less than 11 for michigan state
| SELECT AVG("Rank") FROM table_74477 WHERE "Losses" < '6' AND "Wins" < '11' AND "School" = 'michigan state' | wikisql |
CREATE TABLE table_65446 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of laps with a dnf pos.?
| SELECT AVG("Laps") FROM table_65446 WHERE "Pos." = 'dnf' | wikisql |
CREATE TABLE table_30587 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the young r... | SELECT COUNT("Young rider classification") FROM table_30587 WHERE "Winner" = 'Diego Ulissi' | wikisql |
CREATE TABLE table_7819 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue held the 1966 fifa world cup qualification on may 7, 1965?
| SELECT "Venue" FROM table_7819 WHERE "Competition" = '1966 fifa world cup qualification' AND "Date" = 'may 7, 1965' | wikisql |
CREATE TABLE table_72451 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result for t... | SELECT "Result" FROM table_72451 WHERE "Race" = 'Railway Stakes' | wikisql |
CREATE TABLE table_name_4 (
laps INTEGER,
driver VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the driver peter gethin has a grid less than 25, what is the average number of laps?
| SELECT AVG(laps) FROM table_name_4 WHERE driver = "peter gethin" AND grid < 25 | sql_create_context |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT decor, COUNT(*) FROM Rooms WHERE bedType = "King" GROUP BY decor | nvbench |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT vitalperiodic.systemicmean FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-92657')) AND NOT vitalperiodic.systemicmean IS NUL... | eicu |
CREATE TABLE table_203_105 (
id number,
"name" text,
"street address" text,
"years as tallest" text,
"height\nft (m)" text,
"floors" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- after ids tower what is the second tallest building in minneapo... | SELECT "name" FROM table_203_105 WHERE "name" <> 'ids tower' ORDER BY "height\nft (m)" DESC LIMIT 1 | squall |
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 zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT (SELECT COUNT(*) FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '12121203' AND wdmzjzjlb.JZKSRQ BETWEEN '2001-05-07' AND '2020-07-12' UNION SELECT COUNT(*) FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjl... | css |
CREATE TABLE table_name_35 (
player VARCHAR,
pick VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player had a pick higher than 53, and a position of defensive tackle?
| SELECT player FROM table_name_35 WHERE pick > 53 AND position = "defensive tackle" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Skin disorders NEC" AND lab.fluid = "Joint Fluid" | mimicsql_data |
CREATE TABLE table_61417 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has an Away team of middlesbrough?
| SELECT "Score" FROM table_61417 WHERE "Away team" = 'middlesbrough' | wikisql |
CREATE TABLE Properties (
property_id INTEGER,
property_type_code CHAR(15),
property_address VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_details VARCHAR(255)
)
CREATE TABLE Customer_Events (
Customer_Event_ID INTEGER,
customer_id IN... | SELECT organization_details, COUNT(organization_details) FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details ORDER BY organization_details | nvbench |
CREATE TABLE table_17837 (
"Colt model no." text,
"Name" text,
"Stock" text,
"Fire control" text,
"Rear sight" text,
"Forward assist" text,
"Barrel length" text,
"Barrel profile" text,
"Barrel twist" text,
"Hand guards" text,
"Bayonet Lug" text,
"Muzzle device" text
)
-... | SELECT "Bayonet Lug" FROM table_17837 WHERE "Barrel profile" = 'M4 HBAR' AND "Name" = 'M4LE Carbine' | wikisql |
CREATE TABLE table_name_64 (
singapore_gross VARCHAR,
director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the film with director listed as 1998, what was the gross in Singapore?
| SELECT singapore_gross FROM table_name_64 WHERE director = "1998" | sql_create_context |
CREATE TABLE table_12834315_4 (
forward_assist VARCHAR,
barrel_profile VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the forward assist for a2 barrel profile
| SELECT forward_assist FROM table_12834315_4 WHERE barrel_profile = "A2" | sql_create_context |
CREATE TABLE table_train_214 (
"id" int,
"gender" string,
"lead_ecg" bool,
"systolic_blood_pressure_sbp" int,
"qt_interval" bool,
"urine_dipstick_protein" int,
"stroke" bool,
"transient_ischemic_attack" bool,
"qtc" int,
"long_qt_syndrome" bool,
"cardiovascular_disease" bool,
... | SELECT * FROM table_train_214 WHERE age >= 18 AND body_mass_index_bmi >= 25 | criteria2sql |
CREATE TABLE table_22896 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many u.s.... | SELECT "U.S. viewers (million)" FROM table_22896 WHERE "Production code" = '5.09' | wikisql |
CREATE TABLE table_1708 (
"Episode #" real,
"US air date" text,
"Rating" text,
"Share" text,
"Rating/Share (18\u201349)" text,
"Viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many share values are listed for the episode w... | SELECT COUNT("Share") FROM table_1708 WHERE "Rating/Share (18\u201349)" = '2.6/8' | wikisql |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'annuloplasty') AND DA... | mimic_iii |
CREATE TABLE table_name_10 (
ordered VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many ships are named Monge?
| SELECT COUNT(ordered) FROM table_name_10 WHERE name = "monge" | sql_create_context |
CREATE TABLE table_21664 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what i... | SELECT "Score" FROM table_21664 WHERE "Team" = 'Boston Celtics' | wikisql |
CREATE TABLE diagnoses (
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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND procedures.short_title = "Aortocor bypas-3 cor art" | mimicsql_data |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
econ... | 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 = 'MILWAUKEE' AND date_day.day_number = 23 AND date_day.month_number = 4 AND... | atis |
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Pr... | SELECT Company, COUNT(*) FROM station_company AS T1 JOIN company AS T2 ON T1.Company_ID = T2.Company_ID GROUP BY T1.Company_ID | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "64" AND diagnoses.icd9_code = "28529" | mimicsql_data |
CREATE TABLE table_21804 (
"County" text,
"Kerry%" text,
"Kerry#" real,
"Bush%" text,
"Bush#" real,
"Others%" text,
"Others#" real,
"2000 result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest vote for others?
| SELECT MAX("Others#") FROM table_21804 | wikisql |
CREATE TABLE table_2950964_1 (
published VARCHAR,
audiobook_narrator VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the publication date of the book that is narrated by Michael Maloney?
| SELECT published FROM table_2950964_1 WHERE audiobook_narrator = "Michael Maloney" | sql_create_context |
CREATE TABLE table_54152 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the away team score at Windy Hill?
| SELECT "Away team score" FROM table_54152 WHERE "Venue" = 'windy hill' | wikisql |
CREATE TABLE table_name_61 (
draws VARCHAR,
losses VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of draws for the team with more than 8 losses and 13 points?
| SELECT draws FROM table_name_61 WHERE losses > 8 AND points = 13 | sql_create_context |
CREATE TABLE table_name_21 (
years VARCHAR,
soap_opera VARCHAR,
actor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the years when the soap opera is glenroe and the actor is mick lally?
| SELECT years FROM table_name_21 WHERE soap_opera = "glenroe" AND actor = "mick lally" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'atelectasis/collapse') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1... | eicu |
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | 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 = "50801" | mimicsql_data |
CREATE TABLE table_41360 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the label Dos or Die Recordings?
| SELECT "Date" FROM table_41360 WHERE "Label" = 'dos or die recordings' | wikisql |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 643 AND semester.semester_id = course_offering.semester AND semester.year IN (2016, 2017) | advising |
CREATE TABLE table_76942 (
"Year" real,
"Championship" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year has a Score of 5 7, 4 6, 6 3, 1 6?
| SELECT "Year" FROM table_76942 WHERE "Score" = '5–7, 4–6, 6–3, 1–6' | wikisql |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'procedures_icd' AND cost.event_id IN (SELECT procedures_icd.row_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject/infuse nec')) | mimic_iii |
CREATE TABLE table_name_66 (
home VARCHAR,
visitor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team of the game with the Raptors as the visitor team?
| SELECT home FROM table_name_66 WHERE visitor = "raptors" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'lactulose' AND admissions.subject_id = 69289 AND STRFTIME('%y-%m', prescriptions.startdate) = '2104-04') AS t1 JOIN (SELECT admissi... | mimic_iii |
CREATE TABLE table_204_780 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which competition was there not a position ?
| SELECT "competition" FROM table_204_780 WHERE "position" IS NULL | squall |
CREATE TABLE table_45983 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Attendance in the game against the New Orleans Saints?
| SELECT COUNT("Attendance") FROM table_45983 WHERE "Opponent" = 'new orleans saints' | wikisql |
CREATE TABLE table_name_90 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the competition on November 10?
| SELECT score FROM table_name_90 WHERE date = "november 10" | sql_create_context |
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(... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | SELECT t3.drug FROM (SELECT t2.drug, 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 ... | mimic_iii |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '81933693578') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '81933693578') AND jyjgzbb.JCZBJGDL = (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '81933693578') | css |
CREATE TABLE table_64572 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Ioannis Christou with a rank smaller than 6 has what notes?
| SELECT "Notes" FROM table_64572 WHERE "Rank" < '6' AND "Athlete" = 'ioannis christou' | wikisql |
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... | SELECT wdmzjzjlb.JZLSH FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '50833760' AND hz_info.YLJGDM = '0729314' AND wdmzjzjlb.JZKSMC LIKE '%妇产科%' UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGD... | css |
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... | SELECT gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6465348' GROUP BY gwyjzb.OUT_DIAG_DIS_NM UNION SELECT fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6465348' GROUP BY fgwyjzb.OUT_DIAG_DIS_NM | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "24" AND prescriptions.route = "ID" | mimicsql_data |
CREATE TABLE table_66708 (
"Riding" text,
"Candidate's Name" text,
"Gender" text,
"Residence" text,
"Occupation" text,
"Votes" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many votes did the security guard get?
| SELECT "Votes" FROM table_66708 WHERE "Occupation" = 'security guard' | wikisql |
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
... | SELECT Location, COUNT(Location) FROM shop GROUP BY Location ORDER BY Location | nvbench |
CREATE TABLE fires (
fire_year number,
discovery_date number,
discovery_doy number,
discovery_time text,
stat_cause_code number,
stat_cause_descr text,
cont_date text,
cont_doy text,
cont_time text,
fire_size number,
fire_size_class text,
latitude number,
longitude nu... | SELECT fire_year FROM fires GROUP BY fire_year ORDER BY COUNT(*) DESC LIMIT 1 | uswildfires |
CREATE TABLE table_64540 (
"Rank" real,
"Player" text,
"County" text,
"Tally" text,
"Total" real,
"Opposition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of totals for ranks under 3 with tallies of 2-5?
| SELECT SUM("Total") FROM table_64540 WHERE "Rank" < '3' AND "Tally" = '2-5' | wikisql |
CREATE TABLE table_17941032_2 (
points_against VARCHAR,
try_bonus VARCHAR,
points_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all points against with a 0 try bonus and points for of 150.
| SELECT points_against FROM table_17941032_2 WHERE try_bonus = "0" AND points_for = "150" | sql_create_context |
CREATE TABLE table_50550 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tire" text,
"Sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tire has a Sponsor of Duracell?
| SELECT "Tire" FROM table_50550 WHERE "Sponsor" = 'duracell' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-83264')) AND lab.labname = 'total protein' AND STRFTIME('%y', lab.labresulttime) = '... | eicu |
CREATE TABLE table_17984 (
"No." real,
"Air Date" text,
"Rating" text,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" text,
"Night" real,
"Timeslot" real,
"Overall" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many ai... | SELECT COUNT("Air Date") FROM table_17984 WHERE "Overall" = '83/95' | wikisql |
CREATE TABLE table_204_394 (
id number,
"year" number,
"album" text,
"label" text,
"peak chart\npositions\nus" number,
"peak chart\npositions\nus r&b" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- number of albums released under the ode label... | SELECT COUNT("album") FROM table_204_394 WHERE "label" = 'ode' | squall |
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Single lb in-hosp w cs" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_2618152_1 (
directed_by VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The episode with the production code E0208 is directed by who?
| SELECT directed_by FROM table_2618152_1 WHERE production_code = "E0208" | sql_create_context |
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "WIDOWED" AND diagnoses.long_title = "Cardiac arrest" | mimicsql_data |
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(... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImage... | SELECT turnaround AS turnaround_hours, COUNT(turnaround) AS qty FROM (SELECT CAST((JULIANDAY(ClosedDate) - JULIANDAY(ph.CreationDate)) AS INT) AS Turnaround FROM Posts AS p INNER JOIN PostHistory AS ph ON ph.PostId = p.Id WHERE ph.PostHistoryTypeId = 17 AND NOT ClosedDate IS NULL) AS T GROUP BY turnaround | sede |
CREATE TABLE table_76233 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Frank Nobilo plays for what country?
| SELECT "Country" FROM table_76233 WHERE "Player" = 'frank nobilo' | wikisql |
CREATE TABLE table_name_77 (
wickets VARCHAR,
average VARCHAR,
runs VARCHAR,
matches VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wickets have runs under 7531, matches over 44, and an average of 22.17?
| SELECT wickets FROM table_name_77 WHERE runs < 7531 AND matches > 44 AND average = 22.17 | sql_create_context |
CREATE TABLE Document_Types (
document_type_code VARCHAR(10),
document_description VARCHAR(255)
)
CREATE TABLE Organisations (
organisation_id INTEGER,
organisation_type VARCHAR(10),
organisation_details VARCHAR(255)
)
CREATE TABLE Documents (
document_id INTEGER,
document_type_code VARCHA... | SELECT date_to, COUNT(date_to) FROM Project_Staff | nvbench |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND course.has_projects = 'Y' AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_203_208 (
id number,
"team" text,
"location" text,
"venue" text,
"capacity" number,
"position in 1993-94" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which team held first position during the 1993-94 season ?
| SELECT "team" FROM table_203_208 WHERE "position in 1993-94" = 1 | squall |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admi... | SELECT DISTINCT name, number FROM course WHERE department = 'EECS' AND has_lab = 'N' AND number < 400 + 100 AND number >= 400 | advising |
CREATE TABLE table_name_80 (
film VARCHAR,
director_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What film was directed by Sandro Aguilar?
| SELECT film FROM table_name_80 WHERE director_s_ = "sandro aguilar" | sql_create_context |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT COUNT(DISTINCT course.department, course.name, course.number, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('FA', 'WN') AND semester.semester_id = co... | advising |
CREATE TABLE table_47318 (
"Title" text,
"Parent magazine" text,
"Magazine type" text,
"Frequency" text,
"First published" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the parent magazine for the manga magazine, dengeki moeoh that was iss... | SELECT "Parent magazine" FROM table_47318 WHERE "Frequency" = 'bimonthly' AND "Magazine type" = 'manga' AND "Title" = 'dengeki moeoh' | wikisql |
CREATE TABLE table_203_449 (
id number,
"name" text,
"lifetime" text,
"nationality" text,
"notable as" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long did elisabeth irwin live ?
| SELECT "lifetime" - "lifetime" FROM table_203_449 WHERE "name" = 'elisabeth irwin' | squall |
CREATE TABLE table_name_44 (
location_attendance VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location for the game with a score of w 106-81?
| SELECT location_attendance FROM table_name_44 WHERE score = "w 106-81" | sql_create_context |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
h... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99647) AND microbiologyevents.spec_type_desc = 'blood culture - neonate' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.charttime... | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.