context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_train_59 (
"id" int,
"bone_marrow_transplant" bool,
"nephrolithiasis_history" bool,
"taking_vitamin_c" bool,
"immune_suppression" bool,
"neutrophil_count" int,
"monoclonal_antibodies_mab" int,
"sepsis" bool,
"glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int,
... | history of nephrolithiasis | SELECT * FROM table_train_59 WHERE nephrolithiasis_history = 1 | criteria2sql |
CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Students_in_Detentio... | Show the number of date of notes from each date of notes | SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes | nvbench |
CREATE TABLE table_16288 (
"Conference" text,
"# of Bids" real,
"Record" text,
"Win %" text,
"Round of 32" real,
"Sweet Sixteen" real,
"Elite Eight" real,
"Final Four" real,
"Championship Game" real
) | Name the total number of bids of the sun belt conference | SELECT COUNT("# of Bids") FROM table_16288 WHERE "Conference" = 'Sun Belt' | wikisql |
CREATE TABLE table_name_7 (
away_team VARCHAR,
home_team VARCHAR
) | When north melbourne played as the home team, what was the away team score? | SELECT away_team AS score FROM table_name_7 WHERE home_team = "north melbourne" | sql_create_context |
CREATE TABLE table_15893020_2 (
maidens INTEGER,
best_bowling VARCHAR
) | What is the highest number of maidens when the bowling best was 1/13? | SELECT MAX(maidens) FROM table_15893020_2 WHERE best_bowling = "1/13" | sql_create_context |
CREATE TABLE table_name_11 (
home_team VARCHAR,
away_team VARCHAR
) | What was the home team score at North Melbourne's away game? | SELECT home_team AS score FROM table_name_11 WHERE away_team = "north melbourne" | sql_create_context |
CREATE TABLE table_23798 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | Where did the ol go to college? | SELECT "College" FROM table_23798 WHERE "Position" = 'OL' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | what was the drug prescribed to patient 009-12985 until 65 months ago for the last time? | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-12985')) AND DATETIME(medication.drugstarttime) <= DATETIME(CUR... | eicu |
CREATE TABLE table_204_965 (
id number,
"year" text,
"city" text,
"state, province, dept., etc." text,
"country" text,
"notes" text
) | aspero and caral are both cities that can be found in which country ? | SELECT "country" FROM table_204_965 WHERE "city" = 'aspero' | squall |
CREATE TABLE table_19349 (
"Pos" real,
"Member Association" text,
"Points (total 500)" real,
"Clubs" text,
"Group stage" real,
"Play-off" real,
"AFC Cup" real
) | what is the minimum pos with clubs being 16 | SELECT MIN("Pos") FROM table_19349 WHERE "Clubs" = '16' | wikisql |
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
)
... | provide the number of patients whose gender is f and primary disease is atrial septal defect\mitral valve replacement;repair atrial-septal defect/sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" | mimicsql_data |
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,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | How many upvotes do I have for each tag (by User Name)?. how long before I get tag badges? | SELECT TagName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Users ON Posts.OwnerUserId = Users.Id INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Users.DisplayName = @UserName GROUP BY TagName ORDER BY... | sede |
CREATE TABLE table_name_28 (
crowd VARCHAR,
venue VARCHAR
) | What is the total number of the crowd at Glenferrie Oval? | SELECT COUNT(crowd) FROM table_name_28 WHERE venue = "glenferrie oval" | sql_create_context |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, a line chart shows the trend of employee_id over hire_date , could you order HIRE_DATE in descending order please? | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE table_41660 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | What is the Outcome of the match on 12 september 2004? | SELECT "Outcome" FROM table_41660 WHERE "Date" = '12 september 2004' | wikisql |
CREATE TABLE table_68952 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What was the Goal in Stade Roi Baudouin, Brussels? | SELECT AVG("Goal") FROM table_68952 WHERE "Venue" = 'stade roi baudouin, brussels' | wikisql |
CREATE TABLE table_2818164_8 (
no_in_series VARCHAR,
directed_by VARCHAR
) | the episode directed by art dielhenn was what number in the series? | SELECT no_in_series FROM table_2818164_8 WHERE directed_by = "Art Dielhenn" | sql_create_context |
CREATE TABLE table_204_574 (
id number,
"year" number,
"title" text,
"peak chart positions\nswe" number,
"peak chart positions\nswi" number,
"peak chart positions\nuk" number,
"album" text
) | which single did she first release ? | SELECT "title" FROM table_204_574 WHERE id = 1 | squall |
CREATE TABLE table_70790 (
"Model" text,
"Specification" text,
"Build date" text,
"Total produced" real,
"Wheel arrangement" text,
"Prime mover" text,
"Power output" text
) | Which model had a Specification of dl-718? | SELECT "Model" FROM table_70790 WHERE "Specification" = 'dl-718' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | for the first time, what procedure did during a year before patient 008-39015 receive? | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-39015')) AND DATETIME(treatment.treatmenttime, 'start of year... | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | Get me the number of protestant quaker religious background patients who had a thyroid stimulating hormone lab test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND lab.label = "Thyroid Stimulating Hormone" | mimicsql_data |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
chartt... | until 3 years ago how many patients were prescribed with metoprolol in the same hospital visit after they had undergone 1 int mam-cor art bypass? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id 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_... | mimic_iii |
CREATE TABLE table_79851 (
"Rider" text,
"Date" text,
"Place" text,
"Race" text,
"Event" text,
"Machine" text
) | What machine did Kenneth E. Herbert ride? | SELECT "Machine" FROM table_79851 WHERE "Rider" = 'kenneth e. herbert' | 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... | provide the number of patients whose religion is catholic and diagnoses long title is personal history, urinary (tract) infection? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.religion = "CATHOLIC" AND diagnoses.long_title = "Personal history, urinary (tract) infection" | mimicsql_data |
CREATE TABLE table_59336 (
"White" text,
"Black" text,
"Year" real,
"Result" text,
"Moves" real,
"Tournament" text,
"Opening" text
) | What is Opening, when White is Kramnik, when Year is less than 2001, and when Tournament is 'Siemens Giants'? | SELECT "Opening" FROM table_59336 WHERE "White" = 'kramnik' AND "Year" < '2001' AND "Tournament" = 'siemens giants' | wikisql |
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... | when was the last time that patient 030-40287 was tested for base excess during their last hospital visit? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-40287' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitala... | eicu |
CREATE TABLE royal_family (
royal_family_id number,
royal_family_details text
)
CREATE TABLE features (
feature_id number,
feature_details text
)
CREATE TABLE ref_hotel_star_ratings (
star_rating_code text,
star_rating_description text
)
CREATE TABLE staff (
staff_id number,
tourist_a... | How many tourists did not make any visit? | SELECT COUNT(*) FROM visitors WHERE NOT tourist_id IN (SELECT tourist_id FROM visits) | spider |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | 不同的入院诊断疾病结果与出院诊断疾病结果这种情况在医院4368636从06年9月30号到16年8月13号这期间有哪些次? | SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4368636' AND t_kc21.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2016-08-13' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4368636' AND t_kc21.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2016-08-13' AND t_kc21.IN_DIAG_DIS_CD = t_kc21.OUT_DIAG_DIS_CD | 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... | 在2002.11.25到2021.2.18这段时间,小儿眼底病科有多少蜜炼川贝枇杷膏被开出 | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.MED_ORG_DEPT_NM = '小儿眼底病科' AND t_kc22.STA_DATE BETWEEN '2002-11-25' AND '2021-02-18' AND t_kc22.SOC_SRT_DIRE_NM = '蜜炼川贝枇杷膏' | css |
CREATE TABLE table_dev_5 (
"id" int,
"anemia" bool,
"gender" string,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"panel_reactive_antibodies" int,
"psa" int,
"body_mass_index_bmi" float,
"NOUSE" float
) | psa > 4 in male | SELECT * FROM table_dev_5 WHERE psa > 4 AND gender = 'male' | criteria2sql |
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,
... | 在4933227这个医院的患者22167047的就诊记录中哪些名称中不包含重症的就诊科室 | SELECT * FROM t_kc21 WHERE t_kc21.PERSON_ID = '22167047' AND t_kc21.MED_SER_ORG_NO = '4933227' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%重症%' | css |
CREATE TABLE table_name_36 (
party VARCHAR,
candidate VARCHAR
) | Which party's candidate is Grech Louis Grech? | SELECT party FROM table_name_36 WHERE candidate = "grech louis grech" | sql_create_context |
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... | 列出患者俞夏岚所有检验报告单的审核日期时间在什么时候,在2002-05-16到2003-11-27范围内? | SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjl... | css |
CREATE TABLE table_39433 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | What location attendance had a score of l 92 116? | SELECT "Location Attendance" FROM table_39433 WHERE "Score" = 'l 92–116' | 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... | 从08年10月22日起的2年内,患者66306240的395514指标情况记录 | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.... | css |
CREATE TABLE table_61168 (
"Season" real,
"Season premiere" text,
"Season finale" text,
"TV season" text,
"Viewer rank (#)" text,
"Households/Viewers (in millions)" real
) | Which season had less than 25.4 viewers and had a viewer rank of #6? | SELECT MIN("Season") FROM table_61168 WHERE "Households/Viewers (in millions)" < '25.4' AND "Viewer rank (#)" = '#6' | wikisql |
CREATE TABLE table_180802_2 (
transcription VARCHAR,
thai_name VARCHAR
) | What's the transcription of the thai name of the month ? | SELECT transcription FROM table_180802_2 WHERE thai_name = "พฤษภาคม" | sql_create_context |
CREATE TABLE table_dev_10 (
"id" int,
"gender" string,
"hba1c" float,
"serum_creatinine" float,
"alcohol_abuse" bool,
"baseline_hemoglobin_hgb" float,
"NOUSE" float
) | hba1c > 7 % | SELECT * FROM table_dev_10 WHERE hba1c > 7 | criteria2sql |
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... | how many patients whose death status is 1 and diagnoses short title is surg compl-body syst nec? | 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.short_title = "Surg compl-body syst NEC" | mimicsql_data |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_... | show me all the flights from SAN FRANCISCO to BOSTON for 8 31 1991 | 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 = 'BOSTON' AND date_day.day_number = 31 AND date_day.month_number = 8 AND da... | atis |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | 在零零年六月二十二日到一三年十二月二十五日期间,有多少在脊柱外科门诊看病的人 | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.JZKSMC = '脊柱外科' AND mzjzjlb.JZKSRQ BETWEEN '2000-06-22' AND '2013-12-25' | css |
CREATE TABLE table_70096 (
"Value" text,
"Khmer" real,
"Word Form" text,
"UNGEGN" text,
"ALA-LC" text,
"Notes" text
) | What is the Word Form, when the Khmer is greater than , and the UNGEGN is (mu y) d b le n? | SELECT "Word Form" FROM table_70096 WHERE "Khmer" > '១០០០០០' AND "UNGEGN" = '(muŏy) dáb leăn' | wikisql |
CREATE TABLE table_32452 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff" text,
"Game site" text,
"Record" text,
"Attendance" text
) | What week has a Record of 12-2? | SELECT "Week" FROM table_32452 WHERE "Record" = '12-2' | wikisql |
CREATE TABLE table_1841901_1 (
bulgarian VARCHAR,
dutch VARCHAR
) | Name the bulgarian for jullie hadden gehoord | SELECT bulgarian FROM table_1841901_1 WHERE dutch = "jullie hadden gehoord" | sql_create_context |
CREATE TABLE table_name_39 (
to_par VARCHAR,
country VARCHAR
) | What is the To par of the Player from Argentina? | SELECT to_par FROM table_name_39 WHERE country = "argentina" | sql_create_context |
CREATE TABLE table_4166 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | What is the production code of the episode that was watched by 3.81 million U.S. viewers? | SELECT "Production code" FROM table_4166 WHERE "U.S. viewers (million)" = '3.81' | wikisql |
CREATE TABLE table_name_82 (
losingteam VARCHAR,
cup_finaldate VARCHAR
) | What team lost on 20 August 1989? | SELECT losingteam FROM table_name_82 WHERE cup_finaldate = "20 august 1989" | sql_create_context |
CREATE TABLE table_name_52 (
pick__number INTEGER,
overall VARCHAR
) | Name the most pick # for overall of 204 | SELECT MAX(pick__number) FROM table_name_52 WHERE overall = 204 | sql_create_context |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the sum of salary , and group by attribute job_id. | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID | nvbench |
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 primary disease and admission time of subject id 25167? | SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "25167" | mimicsql_data |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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 num... | what was the marital status of patient 81871 in the first hospital encounter? | SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 81871 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
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 all employees who have the letters D or S in their first name, show me about the distribution of job_id and the average of manager_id , and group by attribute job_id in a bar chart, rank bar from low to high order. | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE catalog_structure (
catalog_level_number number,
catalog_id number,
catalog_level_name text
)
CREATE TABLE catalogs (
catalog_id number,
catalog_name text,
catalog_publisher text,
date_of_publication time,
date_of_latest_revision time
)
CREATE TABLE attribute_definitions (... | What are the catalog entry names of the products with next entry ID above 8? | SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8 | spider |
CREATE TABLE table_283203_1 (
years_active VARCHAR,
home_venue VARCHAR
) | How long has the team who owns North Shore Events Centre Vector Arena been active? | SELECT years_active FROM table_283203_1 WHERE home_venue = "North Shore Events Centre Vector Arena" | sql_create_context |
CREATE TABLE table_name_47 (
pick VARCHAR,
school_club_team VARCHAR
) | How many picks does Auburn have? | SELECT COUNT(pick) FROM table_name_47 WHERE school_club_team = "auburn" | sql_create_context |
CREATE TABLE table_17482534_1 (
no_in_season VARCHAR,
directed_by VARCHAR
) | What number in season is the episode directed by Gene Stupnitsky? | SELECT no_in_season FROM table_17482534_1 WHERE directed_by = "Gene Stupnitsky" | sql_create_context |
CREATE TABLE table_10541 (
"Draw" real,
"Artist" text,
"Song" text,
"Points" real,
"Place" real
) | What is the draw total that has under 5 places, under 62 points, and a Song of 'ne izdajte me'? | SELECT SUM("Draw") FROM table_10541 WHERE "Place" < '5' AND "Points" < '62' AND "Song" = 'ne izdajte me' | wikisql |
CREATE TABLE table_23638 (
"County" text,
"Obama %" text,
"Obama #" real,
"McCain %" text,
"McCain #" real,
"Others %" text,
"Others #" real
) | What percentage of voters choise McCain in Burlington? | SELECT "McCain %" FROM table_23638 WHERE "County" = 'Burlington' | wikisql |
CREATE TABLE table_76404 (
"Year" text,
"2009" text,
"2008" text,
"2007" text,
"2006" text,
"2005" text,
"2004" text,
"2003" text
) | What year is the 2004 shake don't stir? | SELECT "Year" FROM table_76404 WHERE "2004" = 'shake don''t stir' | wikisql |
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... | 从2007年11月6日开始,截止到2012年5月8日,请把47198797的这位病人总共被开出的检验报告单的审核日期时间给列出来 | SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH ... | css |
CREATE TABLE table_5403 (
"Score" real,
"Opposition" text,
"Venue" text,
"City" text,
"Year" real
) | Which Venue has a Year larger than 1868, and an Opposition of derbyshire? | SELECT "Venue" FROM table_5403 WHERE "Year" > '1868' AND "Opposition" = 'derbyshire' | wikisql |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
C... | what is the least expensive one way fare from BOSTON to PITTSBURGH | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | atis |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | 08512792066的检验报告单相对应的患者就诊流水号是哪个 | SELECT JZLSH FROM jybgb WHERE BGDH = '08512792066' | css |
CREATE TABLE table_name_89 (
label VARCHAR,
catalog VARCHAR,
format VARCHAR,
country VARCHAR
) | Which Label has a Format of cd, a Country of Japan and a Catalog of vjcp-68403? | SELECT label FROM table_name_89 WHERE format = "cd" AND country = "japan" AND catalog = "vjcp-68403" | sql_create_context |
CREATE TABLE table_name_61 (
mainly_for VARCHAR,
year VARCHAR,
displacement VARCHAR
) | What is the Mainly For with a displacement of 997 cc in a year before 1962? | SELECT mainly_for FROM table_name_61 WHERE year < 1962 AND displacement = "997 cc" | sql_create_context |
CREATE TABLE table_70195 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | Name the country vijay singh is from | SELECT "Country" FROM table_70195 WHERE "Player" = 'vijay singh' | wikisql |
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE field (
fie... | What has Yejin Kim published at Immune network ? | SELECT DISTINCT paper.paperid FROM author, paper, venue, writes WHERE author.authorname = 'Yejin Kim' AND venue.venueid = paper.venueid AND venue.venuename = 'Immune network' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
CREATE TABLE table_16859 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
) | How many schools did darryl dawkins play for | SELECT COUNT("School/Club Team") FROM table_16859 WHERE "Player" = 'Darryl Dawkins' | wikisql |
CREATE TABLE table_76986 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | What is the Score of the game of the Player in Place 4? | SELECT "Score" FROM table_76986 WHERE "Place" = '4' | 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d... | was patient 72198 diagnosed with any in 2105? | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72198) AND STRFTIME('%y', diagnoses_icd.charttime) = '2105' | mimic_iii |
CREATE TABLE table_name_87 (
longitude INTEGER,
county VARCHAR,
latitude VARCHAR
) | How much Longitude has a County of nelson, and a Latitude larger than 47.980183? | SELECT SUM(longitude) FROM table_name_87 WHERE county = "nelson" AND latitude > 47.980183 | sql_create_context |
CREATE TABLE table_69504 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | What is the average number of laps in 1949? | SELECT AVG("Laps") FROM table_69504 WHERE "Year" = '1949' | wikisql |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
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 T... | what flights go from PITTSBURGH to NEWARK after 1505 in the afternoon | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND flight.departure_time > 1505 AND flight.to_airport = AIRPORT_SERVICE_1.airpor... | atis |
CREATE TABLE table_46763 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | What is the average pick of school/club team kutztown state with a round 4? | SELECT AVG("Pick") FROM table_46763 WHERE "Round" = '4' AND "School/Club Team" = 'kutztown state' | 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... | 门诊给韦天心这个病人诊断为躁狂型分裂情感性障碍,看看编号为246107的这个检测指标的结果定量及单位 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | DATEDIFF(day, DATEADD(yy, DATEDIFF(yy,0,getdate()), 0), today) /DATEDIFF(day, DATEADD(y. | SELECT DATEADD(mm, DATEDIFF(mm, 0, DATEADD(ms, -3, DATEADD(yy, DATEDIFF(yy, 0, DATEADD(YEAR, -1, GETDATE())), 0))), 0) | sede |
CREATE TABLE table_name_64 (
round INTEGER,
team VARCHAR,
date VARCHAR
) | What is the sum of team impul with the date of 8 july | SELECT SUM(round) FROM table_name_64 WHERE team = "team impul" AND date = "8 july" | sql_create_context |
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
) | Give me a histogram for what are the naems of all the projects, and how many scientists were assigned to each of them?, and sort by the Y from low to high. | SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name ORDER BY COUNT(*) | nvbench |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolea... | AI Posts with user locations. | SELECT Posts.*, Users.Location, Users.AboutMe, Users.WebsiteUrl FROM Posts INNER JOIN Users ON Posts.Tags LIKE '%neural%' AND Posts.OwnerUserId = Users.Id | sede |
CREATE TABLE table_50254 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who had the high assists against San Antonio? | SELECT "High assists" FROM table_50254 WHERE "Team" = 'san antonio' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, return a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by weekday, and could you show Y in ascending order? | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(EMPLOYEE_ID) | nvbench |
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... | give me the number of patients whose language is port and age is less than 44? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "PORT" AND demographic.age < "44" | mimicsql_data |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose... | how many days have passed since the first time patient 15794 received a laboratory test of the ph in this hospital encounter? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ph') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15794 AND admissions.disch... | mimic_iii |
CREATE TABLE qtb (
CLINIC_ID 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,
INSU_TYPE text,
IN... | 92929768721的出院日期在医疗就诊里是几号? | SELECT qtb.OUT_HOSP_DATE FROM qtb WHERE qtb.MED_CLINIC_ID = '92929768721' UNION SELECT gyb.OUT_HOSP_DATE FROM gyb WHERE gyb.MED_CLINIC_ID = '92929768721' UNION SELECT zyb.OUT_HOSP_DATE FROM zyb WHERE zyb.MED_CLINIC_ID = '92929768721' UNION SELECT mzb.OUT_HOSP_DATE FROM mzb WHERE mzb.MED_CLINIC_ID = '92929768721' | css |
CREATE TABLE table_27960 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | How many touchdowns did bill culligan have? | SELECT COUNT("Touchdowns") FROM table_27960 WHERE "Player" = 'Bill Culligan' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count ... | users whose first question was closed but still had multiple posts. | SELECT sq.count, COUNT(DISTINCT sq.user) FROM (SELECT sq.user, CASE WHEN COUNT(DISTINCT Posts.Id) = 1 THEN '1' ELSE '>1' END AS count FROM (SELECT sq.user FROM (SELECT Users.Id AS "user", Posts.Id AS first_post, Posts.ClosedDate, ROW_NUMBER() OVER (PARTITION BY Users.Id ORDER BY Posts.CreationDate) AS rn FROM Users INN... | sede |
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,
... | how many patients whose gender is m and year of birth is less than 1846? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year < "1846" | mimicsql_data |
CREATE TABLE table_name_62 (
attendance VARCHAR,
record VARCHAR
) | How many people attended the game whose score was 1-1? | SELECT attendance FROM table_name_62 WHERE record = "1-1" | sql_create_context |
CREATE TABLE table_name_98 (
attendance INTEGER,
week VARCHAR,
result VARCHAR
) | What is the Attendance after Week 8 with a Result of W 42 0? | SELECT MAX(attendance) FROM table_name_98 WHERE week > 8 AND result = "w 42–0" | 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
)
... | how many patients whose religion is protestant quaker? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "PROTESTANT QUAKER" | mimicsql_data |
CREATE TABLE table_19752 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
) | In Ascot (UK), what was the result? | SELECT "Result" FROM table_19752 WHERE "Venue" = 'Ascot (UK)' | wikisql |
CREATE TABLE table_70158 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Crowd" text,
"Record" text
) | How many people attended the score of w 7-6? | SELECT "Crowd" FROM table_70158 WHERE "Score" = 'w 7-6' | wikisql |
CREATE TABLE table_14465871_1 (
unix_shell VARCHAR,
powershell__cmdlet_ VARCHAR
) | What are the names of all unix shell with PowerShell (Cmdlet) of select-string? | SELECT unix_shell FROM table_14465871_1 WHERE powershell__cmdlet_ = "Select-String" | sql_create_context |
CREATE TABLE table_70383 (
"Pick #" text,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs? | SELECT "College/junior/club team" FROM table_70383 WHERE "NHL team" = 'toronto maple leafs' AND "Nationality" = 'united states' | wikisql |
CREATE TABLE table_name_89 (
population__2011_ INTEGER,
density__inhabitants_km_2__ VARCHAR
) | What is the lowest population for the area that has a density of 36.7? | SELECT MIN(population__2011_) FROM table_name_89 WHERE density__inhabitants_km_2__ = 36.7 | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
pa... | did patient 025-44495 have any microbiology test results since 103 months ago? | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND DATETIME(microlab.culturetakentime) >= DATETIME(CURRENT_TIME(... | eicu |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | 看看在零一年三月十一日之后,医疗机构2353170的住院就诊中有多少入院登记 | SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '2353170' AND zyjzjlb.RYDJSJ > '2001-03-11' | css |
CREATE TABLE table_name_92 (
weeks_on_chart VARCHAR,
country VARCHAR
) | what is the weeks on chart for the single from france? | SELECT weeks_on_chart FROM table_name_92 WHERE country = "france" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | how many patients who are transferred within the facility diagnosed with primary posterior communicating aneurysm/sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" | mimicsql_data |
CREATE TABLE table_name_3 (
grid VARCHAR,
driver VARCHAR
) | How many grid numbers were there for the driver Giancarlo Fisichella? | SELECT COUNT(grid) FROM table_name_3 WHERE driver = "giancarlo fisichella" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.