context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE settlements (
settlement_amount INTEGER
) | Find the total and average amount of settlements. | SELECT SUM(settlement_amount), AVG(settlement_amount) FROM settlements | sql_create_context |
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_percent number
)
CREATE TABLE program (
program_id number,
name text,
origin text,
launch number,
o... | Count the number of programs broadcast for each time section of a day. | SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day | spider |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airport (
... | tell me the flights from BALTIMORE to DALLAS | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALL... | atis |
CREATE TABLE table_40749 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text,
"Attendance" real
) | What was the Home team when Farnborough Town was the Away team? | SELECT "Home team" FROM table_40749 WHERE "Away team" = 'farnborough town' | wikisql |
CREATE TABLE table_64844 (
"City" text,
"Region" text,
"July" text,
"January" text,
"Annual Precipitation" text,
"Plant Hardiness Zone" text
) | What is the plant hardiness zone in the Northern region where the annual precipitation is 443mm (17.4in)? | SELECT "Plant Hardiness Zone" FROM table_64844 WHERE "Region" = 'northern' AND "Annual Precipitation" = '443mm (17.4in)' | wikisql |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | what were the three most commonly performed lab tests for patients who had previously been diagnosed with spleen injury nos-open in the same hospital visit, a year before? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id W... | mimic_iii |
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CR... | Count the number of local authorities by the local authority, and order Y-axis from low to high order. | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY local_authority ORDER BY COUNT(local_authority) | nvbench |
CREATE TABLE table_204_84 (
id number,
"no" number,
"peak" text,
"location" text,
"elevation (m)" number,
"prominence (m)" number,
"col height (m)" number,
"col location" text,
"parent" text
) | which peaks are below 2500 meters in height ? | SELECT "peak" FROM table_204_84 WHERE "elevation (m)" < 2500 | squall |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
... | tell me the yearly minimum heartrate of patient 006-216991. | SELECT MIN(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-216991')) AND NOT vitalperiodic.heartrate IS NUL... | eicu |
CREATE TABLE hz_info (
KH text,
KLX number,
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,
JSBBSJ time,
... | 在医院6215327负责出院的科室名字和心血管无关的住院记录里,找出属于14234507这名患者的记录 | SELECT * FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | what is the daily average value of vitamin b12 of patient 015-57922 until 2101? | SELECT AVG(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-57922')) AND lab.labname = 'vitamin b12' AND STRFTIME('%y', lab.labresulttime)... | eicu |
CREATE TABLE table_426 (
"State" text,
"Preliminaries" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
) | What is the interview score when the preliminaries score is 8.400? | SELECT "Interview" FROM table_426 WHERE "Preliminaries" = '8.400' | wikisql |
CREATE TABLE table_18067 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) | How many episodes have been directed by David Duchovny? | SELECT COUNT("Title") FROM table_18067 WHERE "Directed by" = 'David Duchovny' | wikisql |
CREATE TABLE table_38887 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | What was the home who had California visiting? | SELECT "Home" FROM table_38887 WHERE "Visitor" = 'california' | wikisql |
CREATE TABLE table_204_930 (
id number,
"competition" text,
"stage" text,
"opponent" text,
"result" text,
"scorers" text
) | what is the total number of competitions ? | SELECT COUNT(DISTINCT "competition") FROM table_204_930 | squall |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | solution what is the price? | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'solution') | mimic_iii |
CREATE TABLE film (
film_id number,
title text,
studio text,
director text,
gross_in_dollar number
)
CREATE TABLE market (
market_id number,
country text,
number_cities number
)
CREATE TABLE film_market_estimation (
estimation_id number,
low_estimate number,
high_estimate n... | Please list the countries and years of film market estimations. | SELECT T2.country, T1.year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.market_id | spider |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
... | calculate the number of patients discharged from hospital since 3 years ago. | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND DATETIME(patient.hospitaldischargetime) >= DATETIME(CURRENT_TIME(), '-3 year') | eicu |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 查询医疗就诊84892309667所需要的住院时长 | SELECT t_kc21.IN_HOSP_DAYS FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '84892309667' | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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(25... | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of phone_number and salary , and list y axis in ascending order. | SELECT PHONE_NUMBER, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY | nvbench |
CREATE TABLE Events (
Event_ID INTEGER,
Address_ID INTEGER,
Channel_ID INTEGER,
Event_Type_Code CHAR(15),
Finance_ID INTEGER,
Location_ID INTEGER
)
CREATE TABLE Products (
Product_ID INTEGER,
Product_Type_Code CHAR(15),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4)
)
C... | Give me a bar chart for the total number of each product type code | SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code | nvbench |
CREATE TABLE table_28498999_6 (
reset_points INTEGER,
player VARCHAR
) | what is the most number where the person is luke donald | SELECT MAX(reset_points) FROM table_28498999_6 WHERE player = "Luke Donald" | sql_create_context |
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, give me the comparison about the average of revenue over the headquarter , and group by attribute headquarter, list in asc by the x-axis. | SELECT Headquarter, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter | nvbench |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is the number of patients whose admission year is less than 2151 and lab test category is chemistry? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2151" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_37750 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | What is the largest round number for the dt position when the pick number is bigger than 181? | SELECT MAX("Round") FROM table_37750 WHERE "Position" = 'dt' AND "Pick" > '181' | wikisql |
CREATE TABLE table_20018310_1 (
users___number_ VARCHAR,
irrigation_district VARCHAR,
juntas_de_regantes__wub_ VARCHAR
) | What's the number of users in the Nisibon-Yuma within the Del Este district? | SELECT users___number_ FROM table_20018310_1 WHERE irrigation_district = "Del Este" AND juntas_de_regantes__wub_ = "Nisibon-Yuma" | 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,
... | what is age and primary disease of subject id 65652? | SELECT demographic.age, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "65652" | mimicsql_data |
CREATE TABLE bdmzjzjlb (
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,
MZZYZDZ... | 在零零年六月二十二日到一三年十二月二十五日期间,有多少在脊柱外科门诊看病的人 | SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSMC = '脊柱外科' AND wdmzjzjlb.JZKSRQ BETWEEN '2000-06-22' AND '2013-12-25' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSMC = '脊柱外科' AND bdmzjzjlb.JZKSRQ BETWEEN '2000-06-22' AND '2013-12-25' | css |
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 demographic (... | provide the number of patients whose gender is m and discharge location is dead/expired? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "DEAD/EXPIRED" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | give me the number of patients whose admission location is emergency room admit and primary disease is coronary artery disease\coronary artery bypass graft /sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" | mimicsql_data |
CREATE TABLE table_train_219 (
"id" int,
"hematocrit_hct" float,
"fasting_plasma_glucose" int,
"hba1c" float,
"urine_protein" int,
"iothalamate_clearance" int,
"NOUSE" float
) | fasting plasma glucose _ 126 _ 270 | SELECT * FROM table_train_219 WHERE fasting_plasma_glucose >= 126 AND fasting_plasma_glucose <= 270 | criteria2sql |
CREATE TABLE table_name_6 (
score VARCHAR,
home VARCHAR,
date VARCHAR
) | What was the score on February 21 when the home team was the Pittsburgh Penguins? | SELECT score FROM table_name_6 WHERE home = "pittsburgh penguins" AND date = "february 21" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 列出医院编码3290779根据不相同的科室名字和出院诊断疾病名字全部医疗就诊记录中病人保留平均年龄大于29岁的记录的平均年龄都是多大啊? | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3290779' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) > 29 | css |
CREATE TABLE table_203_600 (
id number,
"rank" text,
"country" text,
"winners" number,
"runners-up" number,
"finals total" number
) | did france or croatia have a larger finals total ? | SELECT "country" FROM table_203_600 WHERE "country" IN ('france', 'croatia') ORDER BY "finals total" DESC LIMIT 1 | squall |
CREATE TABLE table_214920_1 (
seat_of_rcm VARCHAR,
density__pop_per_km2_ VARCHAR
) | What is the seat of the RCM in the county that has a density of 9.7? | SELECT seat_of_rcm FROM table_214920_1 WHERE density__pop_per_km2_ = "9.7" | sql_create_context |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
Pos... | Top queries related to Bootstrap. | SELECT t.TagName, COUNT(*) AS count FROM Posts AS p, PostTags AS pt, Tags AS t, PostTags AS ptjs WHERE pt.PostId = p.Id AND pt.TagId = t.Id AND pt.PostId = ptjs.PostId AND ptjs.TagId = (SELECT Id FROM Tags WHERE LOWER(TagName) = 'd3.js') GROUP BY t.TagName ORDER BY Count DESC | sede |
CREATE TABLE table_33150 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | What was the outcome when she partnered with mashona washington? | SELECT "Outcome" FROM table_33150 WHERE "Partner" = 'mashona washington' | 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 procedures (
... | How many patients born before 2074 use the drug oxycodone-acetaminophen? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2074" AND prescriptions.drug = "Oxycodone-Acetaminophen" | mimicsql_data |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar... | What courses does Ulysses Balis teach ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Ulysses Balis%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id =... | advising |
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 the number of patients whose age is less than 68 and lab test fluid is other body fluid? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "68" AND lab.fluid = "Other Body Fluid" | mimicsql_data |
CREATE TABLE table_65315 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2003)" real
) | What is the Constituency Number when the Number of Electorates (2003) is more than 156,910, and Reserved for sc? | SELECT "Constituency number" FROM table_65315 WHERE "Number of electorates (2003)" > '156,910' AND "Reserved for ( SC / ST /None)" = 'sc' | wikisql |
CREATE TABLE table_name_35 (
points VARCHAR,
podiums VARCHAR
) | What were the points in the year when his Podiums were 5? | SELECT points FROM table_name_35 WHERE podiums = "5" | sql_create_context |
CREATE TABLE table_2182562_1 (
avg_finish VARCHAR,
winnings VARCHAR
) | What is the average finish when winnings equals $71,200? | SELECT avg_finish FROM table_2182562_1 WHERE winnings = "$71,200" | sql_create_context |
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,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom te... | what is patient 18866's maximum arterial bp [systolic] at yesterday? | SELECT MAX(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 = 18866)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | mimic_iii |
CREATE TABLE table_3678 (
"Round" real,
"Circuit" text,
"Series" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
) | Who had the fastest lap when the winning driver is giorgio sanna? | SELECT "Fastest Lap" FROM table_3678 WHERE "Winning Driver" = 'Giorgio Sanna' | 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... | among patients tested for folate, how many of them were treated with base drug? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "BASE" AND lab.label = "Folate" | mimicsql_data |
CREATE TABLE bdmzjzjlb (
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,
MZZYZDZ... | 门诊就诊47300136969的中医诊断名叫什么?编号又是啥 | SELECT wdmzjzjlb.MZZYZDZZBM, wdmzjzjlb.MZZYZDZZMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '47300136969' UNION SELECT bdmzjzjlb.MZZYZDZZBM, bdmzjzjlb.MZZYZDZZMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '47300136969' | css |
CREATE TABLE table_name_13 (
school_club_team VARCHAR,
player VARCHAR
) | Which school was Lawrence Roberts from ? | SELECT school_club_team FROM table_name_13 WHERE player = "lawrence roberts" | sql_create_context |
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 diagnosis (
diagn... | is patient 027-146876's mpv greater second measured on the first hospital visit than it was first measured on the first hospital visit? | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-146876' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hosp... | eicu |
CREATE TABLE film_text (
film_id number,
title text,
description text
)
CREATE TABLE address (
address_id number,
address text,
address2 text,
district text,
city_id number,
postal_code text,
phone text,
last_update time
)
CREATE TABLE store (
store_id number,
manag... | Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental. | SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS' | spider |
CREATE TABLE perpetrator (
Date VARCHAR,
Killed VARCHAR
) | List the date of perpetrators in descending order of the number of people killed. | SELECT Date FROM perpetrator ORDER BY Killed DESC | sql_create_context |
CREATE TABLE table_18027 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" text
) | Who did they play against in the game that ended in 2-2? | SELECT "Opponent" FROM table_18027 WHERE "Record" = '2-2' | wikisql |
CREATE TABLE sqlite_sequence (
name any,
seq any
)
CREATE TABLE employees (
id INTEGER,
last_name VARCHAR(20),
first_name VARCHAR(20),
title VARCHAR(30),
reports_to INTEGER,
birth_date TIMESTAMP,
hire_date TIMESTAMP,
address VARCHAR(70),
city VARCHAR(40),
state VARCHAR(4... | A bar chart for listing the number of the name of all playlist, and show by the the number of name from high to low. | SELECT name, COUNT(name) FROM playlists GROUP BY name ORDER BY COUNT(name) DESC | nvbench |
CREATE TABLE table_name_19 (
average INTEGER,
rank VARCHAR,
celebrity VARCHAR
) | What is the highest average of celebrity Natalia Lesz, who is ranked greater than 4? | SELECT MAX(average) FROM table_name_19 WHERE rank > 4 AND celebrity = "natalia lesz" | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
Mark... | Post Links by PostId ascending. | SELECT PostId, RelatedPostId FROM PostLinks WHERE LinkTypeId = 1 ORDER BY PostId | sede |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | Calculate the minimum age of emergency hospital admission patients who have hypertension but not coronary artery disease or cardiac catheterization as their primary disease. | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" | 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,... | provide the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft /sda and drug name is glycopyrrolate? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND prescriptions.drug = "Glycopyrrolate" | mimicsql_data |
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 procedures (
... | provide the number of patients aged below 76 years whose language is spanish. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN" AND demographic.age < "76" | mimicsql_data |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | what drug was the last drug that patient 7375 was prescribed via im route until 62 months ago? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7375) AND prescriptions.route = 'im' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-62 month') ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | indicate the daily average volume of urinary catheter output: coude urethral that patient 035-11731 has had on the last intensive care unit visit. | SELECT AVG(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 = '035-11731') AND NOT patient.unitdischargetime IS... | eicu |
CREATE TABLE table_30782 (
"Player" text,
"Matches" real,
"Innings" real,
"Runs" real,
"Average" text,
"Highest Score" text,
"100s" real,
"50s" real
) | What is the average when the highest score is 151? | SELECT "Average" FROM table_30782 WHERE "Highest Score" = '151' | wikisql |
CREATE TABLE table_name_96 (
televote VARCHAR,
draw VARCHAR,
place VARCHAR
) | With a draw greater than 11 and the place smaller than 4 what was the televote? | SELECT televote FROM table_name_96 WHERE draw > 11 AND place < 4 | sql_create_context |
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE music_festival (
id number,
music_festival text,
date_of_ceremony text,
category text,
volume number,
result text
)
CREATE TABLE a... | Count the number of artists who have had volumes. | SELECT COUNT(DISTINCT artist_id) FROM volume | spider |
CREATE TABLE table_name_14 (
total INTEGER,
bronze VARCHAR,
silver VARCHAR,
rank VARCHAR
) | What is the sum of Total, when Silver is greater than 1, when Rank is 9, and when Bronze is greater than 0? | SELECT SUM(total) FROM table_name_14 WHERE silver > 1 AND rank = 9 AND bronze > 0 | sql_create_context |
CREATE TABLE table_name_65 (
rank INTEGER,
lane VARCHAR
) | What is the smallest rank with a Lane of 1? | SELECT MIN(rank) FROM table_name_65 WHERE lane = 1 | sql_create_context |
CREATE TABLE table_69288 (
"D 41" text,
"D 42" text,
"D 43" text,
"D 44" text,
"D 45" text,
"D 46" text,
"D 47" text,
"D 48" text
) | What is the D48 when D 43 is plurality ?? | SELECT "D 48" FROM table_69288 WHERE "D 43" = 'plurality ↑' | wikisql |
CREATE TABLE table_74681 (
"Team" text,
"Game" real,
"Draw" real,
"Loss" real,
"Goal Gain" real,
"Goal Loss" real,
"Goal Diff" real,
"Point" real
) | What team with a Game smaller than 18 has the lowest Goal Gain? | SELECT MIN("Goal Gain") FROM table_74681 WHERE "Game" < '18' | wikisql |
CREATE TABLE table_name_74 (
state VARCHAR,
circuit VARCHAR
) | In which state can you find the Sandown circuit? | SELECT state FROM table_name_74 WHERE circuit = "sandown" | sql_create_context |
CREATE TABLE table_name_20 (
pos VARCHAR,
born VARCHAR,
height VARCHAR
) | What is the position of the player born in 1984 with a height of 1.80m? | SELECT pos FROM table_name_20 WHERE born = "1984" AND height = "1.80" | sql_create_context |
CREATE TABLE table_name_43 (
region_served VARCHAR,
haat__analog__digital__1 VARCHAR
) | Which Region served has of 1176 m 1190 m HAAT (Analog/ Digital) 1? | SELECT region_served FROM table_name_43 WHERE haat__analog__digital__1 = "1176 m 1190 m" | sql_create_context |
CREATE TABLE table_66618 (
"Title" text,
"Series" text,
"Director" text,
"Production Num." text,
"Release date" text
) | When was land of the midnight fun in the mm series released? | SELECT "Release date" FROM table_66618 WHERE "Series" = 'mm' AND "Title" = 'land of the midnight fun' | wikisql |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 05037621患者的颈部的各项指标检验结果的数据是什么样子的? | (SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = ... | css |
CREATE TABLE table_18540104_1 (
theme_song_s_ VARCHAR,
romaji_title VARCHAR
) | What is the theme song for Magarikado no Kanojo? | SELECT theme_song_s_ FROM table_18540104_1 WHERE romaji_title = "Magarikado no Kanojo" | sql_create_context |
CREATE TABLE Products (
product_id INTEGER,
parent_product_id INTEGER,
product_category_code VARCHAR(20),
date_product_first_available DATETIME,
date_product_discontinued DATETIME,
product_name VARCHAR(80),
product_description VARCHAR(255),
product_price DECIMAL(19,4)
)
CREATE TABLE Com... | what are all the different product names, and how many complains has each received?, rank in asc by the Y-axis. | SELECT product_name, COUNT(*) FROM Products AS t1 JOIN Complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_name_30 (
date VARCHAR,
tournament VARCHAR
) | When was the tournament at Orange? | SELECT date FROM table_name_30 WHERE tournament = "orange" | sql_create_context |
CREATE TABLE table_name_54 (
issue_date_s_ VARCHAR,
artist VARCHAR
) | What date did the song by jennifer lopez get issued? | SELECT issue_date_s_ FROM table_name_54 WHERE artist = "jennifer lopez" | sql_create_context |
CREATE TABLE table_1341930_11 (
first_elected VARCHAR,
district VARCHAR
) | What is the first elected for georgia 4? | SELECT first_elected FROM table_1341930_11 WHERE district = "Georgia 4" | sql_create_context |
CREATE TABLE table_1908049_1 (
playoffs VARCHAR,
avg_attendance VARCHAR
) | what where the playoffs where the avg attendance of the team was 3416 | SELECT playoffs FROM table_1908049_1 WHERE avg_attendance = 3416 | sql_create_context |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... | Can you tell me what other courses you would take before taking SOC 440 ? | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'SOC' AND number = 440 | advising |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC tex... | 列出患者赵宏义的所有检验结果指标记录在2014-02-10到2019-02-10内的检测人为56821852的检验指标流水号是多少? | SELECT jyjgzbb.JYZBLSH 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.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_55569 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Where did the home team score 13.14 (92)? | SELECT "Venue" FROM table_55569 WHERE "Home team score" = '13.14 (92)' | wikisql |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by weekday. | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE table_22347090_5 (
title VARCHAR,
us_viewers__million_ VARCHAR
) | Name the title that got 1.54 viewers | SELECT title FROM table_22347090_5 WHERE us_viewers__million_ = "1.54" | 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... | look for the number of emergency hospital admitted patients who had cont inv mec ven 96+ hrs as short title of procedure . | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Cont inv mec ven 96+ hrs" | mimicsql_data |
CREATE TABLE table_19874169_3 (
frequency VARCHAR,
branding VARCHAR
) | From brand Yes! FM 101.1, what was the frequency? | SELECT frequency FROM table_19874169_3 WHERE branding = "YES! FM 101.1" | sql_create_context |
CREATE TABLE pilot (
Pilot_ID int,
Pilot_name text,
Rank int,
Age int,
Nationality text,
Position text,
Join_Year int,
Team text
)
CREATE TABLE pilot_record (
Record_ID int,
Pilot_ID int,
Aircraft_ID int,
Date text
)
CREATE TABLE aircraft (
Aircraft_ID int,
Orde... | Draw a bar chart for what are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality, display by the total number in desc. | SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_73668 (
"Circuit" text,
"Difficulty" text,
"Turns" real,
"Direction" text,
"Setting" text,
"Conditions" text,
"Unlock Order" real,
"Unlocks" text,
"Unlocked by" text
) | What is the setting for the hard difficulty? | SELECT "Setting" FROM table_73668 WHERE "Difficulty" = 'Hard' | 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 who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time by a bar chart, and could you sort from low to high by the y axis? | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE match_season (
season number,
player text,
position text,
country number,
team number,
draft_pick_number number,
draft_class text,
college text
)
CREATE TABLE country (
country_id number,
country_name text,
capital text,
official_native_language text
)
CREA... | Show the draft pick numbers and draft classes of players whose positions are defenders. | SELECT draft_pick_number, draft_class FROM match_season WHERE position = "Defender" | spider |
CREATE TABLE table_14975415_1 (
director VARCHAR,
english_title VARCHAR
) | Who is the director for diary for my loves? | SELECT director FROM table_14975415_1 WHERE english_title = "Diary for My Loves" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | when was last time the sao2 of patient 015-91239 was greater than 93.0 on 12/30/this year? | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-91239')) AND vitalperiodic.sao2 > 93.0 AND NOT ... | eicu |
CREATE TABLE table_name_91 (
res VARCHAR,
method VARCHAR
) | What was the resolution for the match that ended by Submission (armbar)? | SELECT res FROM table_name_91 WHERE method = "submission (armbar)" | 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 were diagnosed for atrial fibrillation/thoracoscopic maze bilateral/sda and have procedure icd9 code as 92? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" AND procedures.icd9_code = "92" | mimicsql_data |
CREATE TABLE table_name_49 (
location_attendance VARCHAR,
date VARCHAR
) | On February 10, what was the location attendance? | SELECT location_attendance FROM table_name_49 WHERE date = "february 10" | sql_create_context |
CREATE TABLE table_11240028_3 (
last_appearance VARCHAR,
relationship VARCHAR
) | What episode had the last appearances of the late wife of mac taylor? | SELECT last_appearance FROM table_11240028_3 WHERE relationship = "Late wife of Mac Taylor" | sql_create_context |
CREATE TABLE Addresses (
zip_postcode VARCHAR,
address_id VARCHAR
)
CREATE TABLE Customers (
customer_address_id VARCHAR,
first_name VARCHAR,
last_name VARCHAR
) | What is zip code of customer with first name as Carole and last name as Bernhard? | SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
Accepted... | Top 50 Most Favorited Questions on SO. | SELECT Id AS "post_link" FROM Posts WHERE PostTypeId = 2 AND CreationDate >= '2011-12-16' ORDER BY Score DESC LIMIT 50 | sede |
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... | 看看编号为61436514102的门诊就诊记录病患体征的日期时间 | SELECT txmzjzjlb.JLSJ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '61436514102' UNION SELECT ftxmzjzjlb.JLSJ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '61436514102' | css |
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 demographic ... | give me the number of patients admitted before the year 2135 who had elective admission. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2135" | mimicsql_data |
CREATE TABLE table_2991 (
"Edition" text,
"Round" text,
"Date" text,
"Against" text,
"Surface" text,
"Opponent" text,
"Win/Lose" text,
"Result" text
) | In what edition is Ungur's opponent David Nalbandian? | SELECT "Edition" FROM table_2991 WHERE "Opponent" = 'David Nalbandian' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.