context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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 demographic (
subject_id text,
hadm_id t... | how many patients whose admission type is emergency and drug type is main? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_37550 (
"Date" text,
"City" text,
"Opponent" text,
"Results\u00b9" text,
"Type of game" text
) | What day did Yugoslavia play Luxembourg? | SELECT "Date" FROM table_37550 WHERE "Opponent" = 'luxembourg' | wikisql |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartment_Buildin... | Return the apartment number and the number of rooms for each apartment, sort by the bars in desc. | SELECT apt_number, room_count FROM Apartments ORDER BY apt_number DESC | nvbench |
CREATE TABLE table_name_85 (
lungchang VARCHAR,
halang VARCHAR,
rera VARCHAR
) | Which Lungchang has a Halang of , and a Rera of o ? | SELECT lungchang FROM table_name_85 WHERE halang = "ʒɯ²" AND rera = "ʒo²" | sql_create_context |
CREATE TABLE table_68773 (
"Estimate" text,
"Name" text,
"Nat." text,
"Ship type" text,
"Where sunk" text,
"Date" text
) | What nation had a ship named Roma? | SELECT "Nat." FROM table_68773 WHERE "Name" = 'roma' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org... | whats patient 3229 minimum arterial bp mean on the first icu visit? | SELECT MIN(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 = 3229) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid I... | 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 wdmzjzjlb (
CYBQDM text,
CYBQ... | 在医院8629178的就诊记录里找出院科室的名字不包括胃肠的部分,列出其中属于金正志患者的记录 | SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '金正志' AND hz_info.YLJGDM = '8629178' AND NOT wdmzjzjlb.CYKSMC LIKE '%胃肠%' UNION SELECT * FROM person_info JO... | css |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGE... | Find the last name and age of the student who has allergy to both milk and cat Show a bar chart, order in asc by the Y. | SELECT LName, Age FROM Student WHERE StuID IN (SELECT StuID FROM Has_Allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_Allergy WHERE Allergy = "Cat") ORDER BY Age | nvbench |
CREATE TABLE table_15887683_17 (
dar VARCHAR,
television_service VARCHAR
) | Name the dar for telenord | SELECT dar FROM table_15887683_17 WHERE television_service = "Telenord" | sql_create_context |
CREATE TABLE table_name_81 (
position VARCHAR,
birthplace VARCHAR
) | What is the Position of the person with a birthplace of phoenix, new york? | SELECT position FROM table_name_81 WHERE birthplace = "phoenix, new york" | sql_create_context |
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,
... | 把在门诊被诊断为慢性咽炎的病人的检测指标491442数值的平均值以及最值查看一下 | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjl... | css |
CREATE TABLE table_name_50 (
against INTEGER,
wins VARCHAR,
draws VARCHAR,
losses VARCHAR
) | Which Against has a Draws larger than 0, a Losses smaller than 16, and a Wins smaller than 4? | SELECT MAX(against) FROM table_name_50 WHERE draws > 0 AND losses < 16 AND wins < 4 | sql_create_context |
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 demographic (
subject_id text,
hadm_id t... | How many patients categorized under a chemistry lab test are diagnosed with esophageal varices in diseases classified elsewhere (with bleeding)? | 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 = "Bleed esoph var oth dis" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_name_35 (
builder VARCHAR,
country VARCHAR,
location VARCHAR
) | What is Builder, when Country is 'United Kingdom', and when Location is 'Chatham, Kent'? | SELECT builder FROM table_name_35 WHERE country = "united kingdom" AND location = "chatham, kent" | sql_create_context |
CREATE TABLE table_8560 (
"Episode Number" real,
"Air Date" text,
"Event 1" text,
"Event 2" text,
"Event 3" text,
"Event 4" text
) | What is the earliest episode aired on 8 June 2008? | SELECT MIN("Episode Number") FROM table_8560 WHERE "Air Date" = '8 june 2008' | wikisql |
CREATE TABLE table_71446 (
"Tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
) | What is the 2009 value with a q1 in 2006 in the French Open? | SELECT "2009" FROM table_71446 WHERE "2006" = 'q1' AND "Tournament" = 'french open' | wikisql |
CREATE TABLE table_name_20 (
elevation VARCHAR,
county VARCHAR
) | Tell me the elevation for oslo | SELECT elevation FROM table_name_20 WHERE county = "oslo" | sql_create_context |
CREATE TABLE table_73201 (
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"Television order" text
) | who wrote s01e06 | SELECT "Written by" FROM table_73201 WHERE "Television order" = 'S01E06' | wikisql |
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... | what number of patients admitted before the year 2125 have lab test item id 51484? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2125" AND lab.itemid = "51484" | mimicsql_data |
CREATE TABLE table_49927 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) | WHAT IS THE POSITION FOR CANADA, ROUND SMALLER THAN 7, PLAYER ZACH BOYCHUK? | SELECT "Position" FROM table_49927 WHERE "Nationality" = 'canada' AND "Round" < '7' AND "Player" = 'zach boychuk' | wikisql |
CREATE TABLE table_28473 (
"Character" text,
"Played by" text,
"Season 1" real,
"Season 2" real,
"Season 3" real,
"Season 4" real,
"First Appearance" text
) | How many season 3 appearances by Morgan the Dog? | SELECT MAX("Season 3") FROM table_28473 WHERE "Played by" = 'Morgan the Dog' | wikisql |
CREATE TABLE table_test_16 (
"id" int,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"severe_hypertension" bool,
"adrenaline" bool,
"stroke" bool,
"renal_disease" bool,
"severe_uncontrolled_arterial_hypertension" bool,
"hepatic_disease" bool,
"... | recent stroke ( within the last six month ) | SELECT * FROM table_test_16 WHERE stroke = 1 | criteria2sql |
CREATE TABLE table_62407 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What player scored 68-66=134? | SELECT "Player" FROM table_62407 WHERE "Score" = '68-66=134' | wikisql |
CREATE TABLE table_1341865_44 (
incumbent VARCHAR,
district VARCHAR
) | what's incumbent with district being tennessee 5 | SELECT incumbent FROM table_1341865_44 WHERE district = "Tennessee 5" | sql_create_context |
CREATE TABLE table_27411 (
"Country" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot %" real
) | Name the ends won for blank ends for 0 | SELECT "Ends Won" FROM table_27411 WHERE "Blank Ends" = '0' | wikisql |
CREATE TABLE table_35256 (
"Rank" real,
"Airport" text,
"Location" text,
"Code (IATA)" text,
"Total Cargo (Metric Tonnes)" text,
"2003 Rank" text,
"% Change" text
) | What is the IATA code of the airport that has a Total Cargo of 1,838,894 Metric Tonnes? | SELECT "Code (IATA)" FROM table_35256 WHERE "Total Cargo (Metric Tonnes)" = '1,838,894' | wikisql |
CREATE TABLE table_name_13 (
date_of_birth VARCHAR,
position_s_ VARCHAR,
seasons VARCHAR
) | What is the date of birth of the goalkeeper from the 1st season? | SELECT date_of_birth FROM table_name_13 WHERE position_s_ = "goalkeeper" AND seasons = "1st" | sql_create_context |
CREATE TABLE table_27696 (
"Round" real,
"Circuit" text,
"Location" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Supporting" text
) | Who got the pole position if the supporting is USAC National Midget Series? | SELECT "Pole position" FROM table_27696 WHERE "Supporting" = 'USAC National Midget Series' | wikisql |
CREATE TABLE table_77710 (
"Name" text,
"Bodyweight" real,
"Snatch" real,
"Clean & jerk" real,
"Total (kg)" real
) | Name the average clean and jerk for snatch of 140 and total kg less than 315 | SELECT AVG("Clean & jerk") FROM table_77710 WHERE "Snatch" = '140' AND "Total (kg)" < '315' | wikisql |
CREATE TABLE table_41741 (
"Date" text,
"Opponent" text,
"Location" text,
"Score" text,
"Loss" text,
"Record" text
) | What is the name of the Opponent when there is a Record of 39-19? | SELECT "Opponent" FROM table_41741 WHERE "Record" = '39-19' | wikisql |
CREATE TABLE table_21582 (
"County" text,
"Kerry%" text,
"Kerry#" real,
"Bush%" text,
"Bush#" real,
"Others%" text,
"Others#" real
) | What is the percentage of others when the number of others is 2286? | SELECT "Others%" FROM table_21582 WHERE "Others#" = '2286' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
C... | Uber Employees on Stack Overflow by reputation. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Users.AboutMe) LIKE LOWER('% Uber %') ORDER BY Reputation DESC | sede |
CREATE TABLE table_670 (
"Year" real,
"Finish position" text,
"1st day" text,
"2nd day" text,
"3rd day" text,
"4th Day" text
) | what's the 4th day with 3rd day being bumped by downing | SELECT "4th Day" FROM table_670 WHERE "3rd day" = 'bumped by Downing' | wikisql |
CREATE TABLE technician (
Name VARCHAR,
technician_ID VARCHAR
)
CREATE TABLE machine (
Machine_series VARCHAR,
machine_id VARCHAR
)
CREATE TABLE repair_assignment (
machine_id VARCHAR,
technician_ID VARCHAR
) | Show names of technicians and series of machines they are assigned to repair. | SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID | sql_create_context |
CREATE TABLE table_10007452_3 (
fuel_propulsion VARCHAR,
fleet_series__quantity_ VARCHAR
) | what is the fuel propulsion where the fleet series (quantity) is 310-329 (20)? | SELECT fuel_propulsion FROM table_10007452_3 WHERE fleet_series__quantity_ = "310-329 (20)" | sql_create_context |
CREATE TABLE table_54250 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
) | What is the Height for Years for Rockets of 2005-06? | SELECT "Height in Ft." FROM table_54250 WHERE "Years for Rockets" = '2005-06' | wikisql |
CREATE TABLE table_204_888 (
id number,
"location" text,
"mile" number,
"destinations" text,
"notes" text
) | how many miles is the us 522 south - berkeley springs , wv location ? | SELECT "mile" FROM table_204_888 WHERE "destinations" = 'us 522 south - berkeley springs, wv' | squall |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | what's the total output of patient 033-3992 today? | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-3992')) AND intakeoutput.cellpath LIKE '%out... | eicu |
CREATE TABLE table_204_980 (
id number,
"name" text,
"type" text,
"elevation\n(ground station)" number,
"elevation\n(mountain station)" number,
"slope length" number,
"capacity\n(persons/hour)" number,
"construction year" number
) | what name was in the last construction year ? | SELECT "name" FROM table_204_980 ORDER BY "construction year" DESC LIMIT 1 | squall |
CREATE TABLE table_11820 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
) | Name the record when the visitor is mavericks | SELECT "Record" FROM table_11820 WHERE "Visitor" = 'mavericks' | wikisql |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
h... | count the number of times patient 26849 during the last year had received a venous cath nec procedure. | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'venous cath nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26849) AND DATETIME(procedures_icd.... | mimic_iii |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeri... | how many hours has elapsed since the last time that patient 006-133605 took a enteral tube intake: orogastric oral 16 intake on the current icu visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 ... | eicu |
CREATE TABLE table_10268 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which away team scored 17.17 (119)? | SELECT "Away team" FROM table_10268 WHERE "Away team score" = '17.17 (119)' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | 患者对应的住院就诊中开出的检验报告单59958686158上的姓名是什么? | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb JOIN zyjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = zyjzjlb_jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB AND zy... | css |
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... | 哪些医务人员为患者何莹琇在12年2月15日到17年2月23日期间进行过检测指标048093的检查姓名和工号都是什么? | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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.J... | css |
CREATE TABLE table_55622 (
"Year" real,
"Rank" real,
"Games" real,
"Win%" real,
"Postseason" text
) | What postseason has a win% between 0.40700000000000003 and 108 with a rank of 1? | SELECT "Postseason" FROM table_55622 WHERE "Win%" > '0.40700000000000003' AND "Games" < '108' AND "Rank" = '1' | wikisql |
CREATE TABLE table_name_38 (
winter_olympics VARCHAR,
country VARCHAR
) | What was the Winter Olympics was Japan as the country? | SELECT winter_olympics FROM table_name_38 WHERE country = "japan" | sql_create_context |
CREATE TABLE table_44379 (
"Number" text,
"Builder" text,
"Type" text,
"Date" text,
"Works number" text
) | What is Type, when Works Number is 75823? | SELECT "Type" FROM table_44379 WHERE "Works number" = '75823' | wikisql |
CREATE TABLE table_30845 (
"taluka Name" text,
"Population (2001 census)" real,
"% of District Population" text,
"Male" real,
"Male(%)" text,
"Female" real,
"Female(%)" text,
"Sex Ratio" real,
"Literacy" real,
"Literacy(%)" text,
"Literate Male" real,
"Literate Male(%)" t... | How many literate male (%) are there in the district that has a population of 3.28? | SELECT COUNT("Literate Male(%)") FROM table_30845 WHERE "% of District Population" = '3.28' | wikisql |
CREATE TABLE table_15346009_1 (
date VARCHAR,
location VARCHAR
) | On what day was the tournament in Alabama? | SELECT date FROM table_15346009_1 WHERE location = "Alabama" | sql_create_context |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE... | Highest Scoring Comments by User. Finds the highest-scoring comments by a user. | SELECT Id AS "comment_link", PostId AS "post_link", CreationDate AS "comment_date", Score FROM Comments WHERE '##UserId:int##' = UserId AND Score > 0 ORDER BY Score DESC, CreationDate DESC LIMIT 1000 | sede |
CREATE TABLE table_name_91 (
score VARCHAR,
attendance VARCHAR,
away_team VARCHAR
) | What is the score when the attendance is less than 83 and Raunds Town is the away team? | SELECT score FROM table_name_91 WHERE attendance < 83 AND away_team = "raunds town" | sql_create_context |
CREATE TABLE table_10935548_1 (
title VARCHAR,
directed_by VARCHAR
) | Which episode was directed by Jean de Segonzac? | SELECT title FROM table_10935548_1 WHERE directed_by = "Jean de Segonzac" | sql_create_context |
CREATE TABLE list (
classroom VARCHAR,
grade VARCHAR
) | Report the total number of students for each fourth-grade classroom. | SELECT classroom, COUNT(*) FROM list WHERE grade = "4" GROUP BY classroom | 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 diagnoses (
... | count the number of patients whose admission type is elective and primary disease is coronary artery disease? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.diagnosis = "CORONARY ARTERY DISEASE" | mimicsql_data |
CREATE TABLE table_name_80 (
laps INTEGER,
year VARCHAR
) | How many laps were in 1958? | SELECT SUM(laps) FROM table_name_80 WHERE year = "1958" | sql_create_context |
CREATE TABLE table_name_48 (
body_width_mm INTEGER,
lead_pitch_mm VARCHAR,
body_length_mm VARCHAR
) | Which Body Width/mm has a Lead Pitch/mm smaller than 0.55, and a Body Length/mm larger than 18.4? | SELECT MIN(body_width_mm) FROM table_name_48 WHERE lead_pitch_mm < 0.55 AND body_length_mm > 18.4 | sql_create_context |
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... | 82940377602的医疗就诊中格列美脲片属于保险三大目录类别中的什么类别 | SELECT t_kc22.DIRE_TYPE FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '82940377602' AND t_kc22.SOC_SRT_DIRE_NM = '格列美脲片' | css |
CREATE TABLE table_name_11 (
week INTEGER,
game_site VARCHAR,
date VARCHAR
) | What average week has shea stadium as the game site, and 1979-12-09 as the date? | SELECT AVG(week) FROM table_name_11 WHERE game_site = "shea stadium" AND date = "1979-12-09" | sql_create_context |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
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 tex... | 和检验指标记录37036653223相同的检测指标结果定量单位与检测指标名称与检测指标结果定量检验指标记录都有哪些? | SELECT * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '37036653223') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '37036653223') AND jyjgzbb.JCZBJGDL = (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '37036653223') | css |
CREATE TABLE table_76405 (
"Year" text,
"2009" text,
"2008" text,
"2007" text,
"2006" text,
"2005" text,
"2004" text,
"2003" text
) | What is the 2007 for the 2003 desert prince? | SELECT "2007" FROM table_76405 WHERE "2003" = 'desert prince' | wikisql |
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | give the number of patients who have been transferred within this facility and have stayed in the hospital for more than 30 days. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.days_stay > "30" | mimicsql_data |
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,... | what is the number of patients categorized under chemistry lab test who have diagnoses of unspecified procedure as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at the time of procedure? | 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 = "Abn react-procedure NOS" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_204_781 (
id number,
"name(s)" text,
"yard no." number,
"type (as built)" text,
"owner" text,
"imo number" number,
"laid down" text,
"launched" text,
"delivered/\ncommissioned" text,
"fate/\ndecommissioned" text,
"notes" text
) | who is the first owner listed in the top portion of the table ? | SELECT "owner" FROM table_204_781 WHERE id = 1 | squall |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | how many hours have passed since the first time that patient 016-27397 was given a procedure during the current hospital visit? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-27397... | eicu |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | what is the number of patients whose admission year is less than 2129 and item id is 50993? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2129" AND lab.itemid = "50993" | mimicsql_data |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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... | how many patients in the ccu careunit in 2105? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'ccu' AND STRFTIME('%y', transfers.intime) = '2105') | mimic_iii |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREA... | when was the first time since 05/2105 that a medication prescribed to patient 022-89058. | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-89058')) AND STRFTIME('%y-%m', medication.drugstarttime) >... | eicu |
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 microlab (
microl... | what are the top four most frequently given diagnoses that patients were given in the same hospital visit after being diagnosed with drug withdrawal syndrome - alcohol? | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'drug ... | eicu |
CREATE TABLE Room (
RoomNumber INTEGER,
RoomType VARCHAR(30),
BlockFloor INTEGER,
BlockCode INTEGER,
Unavailable BOOLEAN
)
CREATE TABLE Physician (
EmployeeID INTEGER,
Name VARCHAR(30),
Position VARCHAR(30),
SSN INTEGER
)
CREATE TABLE Stay (
StayID INTEGER,
Patient INTEGER,... | A bar chart for listing the number of the names of patients who have made appointments, and order from low to high by the y axis. | SELECT Name, COUNT(Name) FROM Appointment AS T1 JOIN Patient AS T2 ON T1.Patient = T2.SSN GROUP BY Name ORDER BY COUNT(Name) | nvbench |
CREATE TABLE table_1140082_2 (
location VARCHAR,
race VARCHAR
) | Where is the German Grand Prix? | SELECT location FROM table_1140082_2 WHERE race = "German Grand Prix" | sql_create_context |
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,
... | give the number of patients who were admitted before the year 2198 and undergone the procedure circumcision. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2198" AND procedures.long_title = "Circumcision" | 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(... | For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a scatter chart about the correlation between employee_id and commission_pct . | SELECT EMPLOYEE_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_78172 (
"Season" real,
"Belonging league" text,
"Matches" real,
"league point" real,
"Draw" real,
"Lose" real,
"Goal difference" real,
"Point" real,
"Lost point" real,
"Final rank" real
) | I want the average lose for lost point more than 16 and goal difference less than 37 and point less than 43 | SELECT AVG("Lose") FROM table_78172 WHERE "Lost point" > '16' AND "Goal difference" < '37' AND "Point" < '43' | wikisql |
CREATE TABLE invoice_line_items (
order_item_id number,
invoice_number number,
product_id number,
product_title text,
product_quantity text,
product_price number,
derived_product_cost number,
derived_vat_payable number,
derived_total_cost number
)
CREATE TABLE orders (
order_id ... | Show the number of customers for each gender. | SELECT gender, COUNT(*) FROM customers GROUP BY gender | spider |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE labevents (
row... | when did patient 51977 last year for the first time leave the hospital? | SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 51977 AND DATETIME(admissions.dischtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.dischtime LIMIT 1 | mimic_iii |
CREATE TABLE table_name_21 (
nationality VARCHAR,
pick VARCHAR
) | Which nationality's pick was 415? | SELECT nationality FROM table_name_21 WHERE pick = "415" | sql_create_context |
CREATE TABLE table_name_17 (
opposition VARCHAR,
city VARCHAR
) | Which Opposition has a City of taunton? | SELECT opposition FROM table_name_17 WHERE city = "taunton" | sql_create_context |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id... | what are the three most commonly prescribed medications for patients who have previously been diagnosed with opioid/other dep-unspec within 2 months, since 4 years ago? | 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,
... | 列出患者18784112就诊科室名称包含神外的所有门诊在医院0131624中就诊记录的流水号是什么? | SELECT mzjzjlb.JZLSH 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_info_mzj... | css |
CREATE TABLE table_2794180_11 (
radio_commentator VARCHAR,
television_commentator VARCHAR
) | Who made the comments for radio broadcast when Jan Gabrielsson made them for television broadcast? | SELECT radio_commentator FROM table_2794180_11 WHERE television_commentator = "Jan Gabrielsson" | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name te... | Short WHYT comments, Id only. | SELECT Id AS "comment_link" FROM Comments WHERE LOWER(Text) LIKE 'what have you tried%' AND LENGTH(Text) < 75 ORDER BY LENGTH(Text), Id | sede |
CREATE TABLE table_31288 (
"Season" text,
"Level" text,
"Division" text,
"Section" text,
"Position" text,
"Movements" text
) | what is the name of the movement in the 7th position | SELECT "Movements" FROM table_31288 WHERE "Position" = '7th' | wikisql |
CREATE TABLE diagnoses (
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,
... | How many patients admitted before the year 2164 had a test for PTT? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2146" AND lab.label = "PTT" | mimicsql_data |
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... | what is admission time and discharge time of subject name tracy farmer? | SELECT demographic.admittime, demographic.dischtime FROM demographic WHERE demographic.name = "Tracy Farmer" | mimicsql_data |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepi... | had patient 017-59454 excreted any output (ml)-urethral catheter latex;temperature probe 14 fr. since 89 months ago? | 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 = '017-59454')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu... | eicu |
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... | 57735254801的医疗就诊记录里益心舒胶囊社保报销三目录的统一编码 | SELECT t_kc22.SOC_SRT_DIRE_CD FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '57735254801' AND t_kc22.SOC_SRT_DIRE_NM = '益心舒胶囊' | css |
CREATE TABLE table_74945 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | If played is 22 and the tries against are 43, what are the points? | SELECT "Points for" FROM table_74945 WHERE "Played" = '22' AND "Tries against" = '43' | wikisql |
CREATE TABLE table_25604014_9 (
production_code VARCHAR,
written_by VARCHAR
) | Name the production code for theresa rebeck | SELECT production_code FROM table_25604014_9 WHERE written_by = "Theresa Rebeck" | sql_create_context |
CREATE TABLE table_name_68 (
fleet_numbers VARCHAR,
diagram VARCHAR,
built VARCHAR
) | What fleet numbers have a diagram less than 99 and built in 1960? | SELECT fleet_numbers FROM table_name_68 WHERE diagram < 99 AND built = "1960" | sql_create_context |
CREATE TABLE table_48183 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" text
) | What engine has the Mercedes AMG Petronas f1 team, and 93 points? | SELECT "Engine" FROM table_48183 WHERE "Entrant" = 'mercedes amg petronas f1 team' AND "Points" = '93' | wikisql |
CREATE TABLE table_44347 (
"Rank" text,
"Time" text,
"Athlete" text,
"Nation" text,
"Date" text,
"Race" text
) | What is the name of the athlete with a time of 30:48? | SELECT "Athlete" FROM table_44347 WHERE "Time" = '30:48' | wikisql |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_... | when was the last time when patient 65582 had the maximum value of calculated total co2 since 08/2104? | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65582) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calculated total co2') AND STRFTIME('%y-%m', labevents.charttime) >= '2104-08' ... | mimic_iii |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of manufacturer , and group by attribute headquarter, I want to sort by the x-axis in descending. | SELECT Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC | nvbench |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | For all employees who have the letters D or S in their first name, show me the trend about salary over hire_date with a line chart, I want to show x axis in desc order. | SELECT HIRE_DATE, SALARY FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE table_71569 (
"Rank" real,
"Name" text,
"Nationality" text,
"Score" text,
"Perfection" text
) | What was the rank of Svetlana Fedorenko? | SELECT "Rank" FROM table_71569 WHERE "Name" = 'svetlana fedorenko' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 患者32179054的医保医疗费有多少是在04年2月21日到2013年8月10日期间使用的? | SELECT SUM(MED_AMOUT) FROM t_kc24 WHERE PERSON_ID = '32179054' AND CLINIC_SLT_DATE BETWEEN '2004-02-21' AND '2013-08-10' | css |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, visualize a scatter chart about the correlation between code and price , and group by attribute headquarter. | SELECT T1.Code, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE table_78872 (
"Team" text,
"City" text,
"Venue" text,
"Capacity" real,
"Head Coach" text,
"Team Captain" text,
"Past Season" text
) | What is the Capacity of the Venue of Head Coach Farhad Kazemi? | SELECT SUM("Capacity") FROM table_78872 WHERE "Head Coach" = 'farhad kazemi' | wikisql |
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... | count the number of patients whose diagnosis short title is pyelonephritis nos and lab test abnormal status is delta. | 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 = "Pyelonephritis NOS" AND lab.flag = "delta" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.