context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_56256 (
"Played in" text,
"Matches" text,
"Lost" text,
"Drawn" text,
"Points for" text,
"Points against" text
) | What match had 240 points for? | SELECT "Matches" FROM table_56256 WHERE "Points for" = '240' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid num... | tell me the number of times patient 2238 has had a lab test for carcinoembyronic antigen (cea) since 02/2104. | SELECT COUNT(*) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'carcinoembyronic antigen (cea)') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2238) AND STRFTIME('%y-%m', labevents.charttime) >= '2104-02' | mimic_iii |
CREATE TABLE table_42767 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) | What is Result, when Venue is Sydney Cricket Ground, and when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912? | SELECT "Result" FROM table_42767 WHERE "Venue" = 'sydney cricket ground' AND "Date" = '23,24,26,27,28,29 feb, 1 mar 1912' | wikisql |
CREATE TABLE table_name_23 (
MAX VARCHAR,
surface VARCHAR,
winner VARCHAR
) | Which Event has a Surface of semifinal, and a Winner of hard (i)? | SELECT NOT MAX AS event FROM table_name_23 WHERE surface = "semifinal" AND winner = "hard (i)" | sql_create_context |
CREATE TABLE table_29871617_1 (
chromosomal_location VARCHAR,
family_name VARCHAR
) | How many different chromosomal locations are there in the family il-1f8? | SELECT COUNT(chromosomal_location) FROM table_29871617_1 WHERE family_name = "IL-1F8" | sql_create_context |
CREATE TABLE table_232 (
"Race Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Constructor" text,
"Report" text
) | Would built the winning car in the IV J.C.C. Jersey Road Race? | SELECT "Constructor" FROM table_232 WHERE "Race Name" = 'IV J.C.C. Jersey Road Race' | 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | what are the prices of the drug acetaminophen iv? | 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 = 'acetaminophen iv') | mimic_iii |
CREATE TABLE table_59706 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text,
"Report" text
) | What status has gauteng falcons as the opposing team? | SELECT "Status" FROM table_59706 WHERE "Opposing Team" = 'gauteng falcons' | wikisql |
CREATE TABLE table_63704 (
"Year" real,
"Baden" text,
"W\u00fcrttemberg" text,
"Nordbayern" text,
"S\u00fcdbayern" text
) | What's the year that has a Baden Freiburger FC? | SELECT COUNT("Year") FROM table_63704 WHERE "Baden" = 'freiburger fc' | 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
)
... | what is admission type and admission location of subject id 55094? | SELECT demographic.admission_type, demographic.admission_location FROM demographic WHERE demographic.subject_id = "55094" | mimicsql_data |
CREATE TABLE table_train_6 (
"id" int,
"bleeding" int,
"systolic_blood_pressure_sbp" int,
"mean_arterial_pressure_map" int,
"active_infection" bool,
"hypotension" bool,
"age" float,
"NOUSE" float
) | patient must be at least 16 years of age | SELECT * FROM table_train_6 WHERE age >= 16 | criteria2sql |
CREATE TABLE table_name_26 (
score VARCHAR,
surface VARCHAR,
tournament VARCHAR
) | What score has hard (i) as the surface, and Columbus, Ohio as the tournament? | SELECT score FROM table_name_26 WHERE surface = "hard (i)" AND tournament = "columbus, ohio" | sql_create_context |
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 ... | tell me the cost of a angioneurotic edema diagnosis? | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'angioneurotic edema')) | mimic_iii |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId n... | TOP 50 Posts - Spring - pt-br. | SELECT Posts.Id AS "post_link", CreationDate, ViewCount, Score FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE LOWER(Tags) LIKE '%eclipse%' AND LOWER(Tags.TagName) LIKE '%eclipse%' ORDER BY ViewCount DESC LIMIT 50 | sede |
CREATE TABLE grapes (
id number,
grape text,
color text
)
CREATE TABLE appellations (
no number,
appelation text,
county text,
state text,
area text,
isava text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,... | What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape? | SELECT AVG(price), AVG(cases) FROM wine WHERE year = 2009 AND grape = "Zinfandel" | spider |
CREATE TABLE table_33607 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the largest crowd at the Brunswick Street Oval? | SELECT MAX("Crowd") FROM table_33607 WHERE "Venue" = 'brunswick street oval' | wikisql |
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
)
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real... | Compute the total how many brand across brand as a pie chart. | SELECT brand, COUNT(brand) FROM camera_lens GROUP BY brand | nvbench |
CREATE TABLE table_10975034_2 (
position VARCHAR,
player VARCHAR
) | What position does Christian Leibl-Cote play? | SELECT position FROM table_10975034_2 WHERE player = "Christian Leibl-Cote" | sql_create_context |
CREATE TABLE table_62669 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
) | Which country is t3 finisher billy mayfair from? | SELECT "Country" FROM table_62669 WHERE "Place" = 't3' AND "Player" = 'billy mayfair' | wikisql |
CREATE TABLE Course (
CID VARCHAR(7),
CName VARCHAR(40),
Credits INTEGER,
Instructor INTEGER,
Days VARCHAR(5),
Hours VARCHAR(11),
DNO INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
... | What is the number of each course name that have at least five enrollments? Show me a bar chart, and list by the Y-axis in ascending. | SELECT T1.CName, COUNT(T1.CName) FROM Course AS T1 JOIN Enrolled_in AS T2 ON T1.CID = T2.CID GROUP BY T1.CName, T2.CID HAVING COUNT(*) >= 5 ORDER BY COUNT(T1.CName) | nvbench |
CREATE TABLE table_58605 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
) | What's the venue for the asian games tournament? | SELECT "Venue" FROM table_58605 WHERE "Tournament" = 'asian games' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | how much is patient 027-76730's difference in systemicmean last measured on the first intensive care unit visit compared to the second to last value measured on the first intensive care unit visit? | SELECT (SELECT vitalperiodic.systemicmean FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-76730') AND NOT patient.unitdischargetime ... | eicu |
CREATE TABLE table_name_81 (
total INTEGER,
year_s__won VARCHAR,
to_par VARCHAR
) | What is the sum of Total, when Year(s) Won is '1966 , 1970 , 1978', and when To par is less than 4? | SELECT SUM(total) FROM table_name_81 WHERE year_s__won = "1966 , 1970 , 1978" AND to_par < 4 | sql_create_context |
CREATE TABLE table_name_57 (
opponents VARCHAR,
surface VARCHAR,
partner VARCHAR
) | What is the Opponents on a clay surface with christophe rochus as partner? | SELECT opponents FROM table_name_57 WHERE surface = "clay" AND partner = "christophe rochus" | sql_create_context |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAd... | Most Viewed Questions on Salesforce StackExchange. | SELECT Questions.Id AS "post_link", Questions.Title, Questions.ViewCount FROM Posts AS Questions GROUP BY Questions.Id, Questions.Title, Questions.ViewCount ORDER BY ViewCount DESC LIMIT 20 | sede |
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 drug type and drug route of drug name tacrolimus? | SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Tacrolimus" | mimicsql_data |
CREATE TABLE table_76240 (
"Rank" real,
"Title" text,
"Studio" text,
"Director" text,
"Worldwide Gross" text
) | What is the Worldwide Gross of the Film with a Rank of 3? | SELECT "Worldwide Gross" FROM table_76240 WHERE "Rank" = '3' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is average age of female patients whose age is equal or more than 86 years? | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "86" | mimicsql_data |
CREATE TABLE table_2998 (
"Episode" real,
"Airdate" text,
"Reward" text,
"Immunity" text,
"Eliminated" text,
"Vote" text,
"Finish" text
) | What is the finish associated with a 3-2 vote? | SELECT "Finish" FROM table_2998 WHERE "Vote" = '3-2' | wikisql |
CREATE TABLE table_name_85 (
opponents INTEGER,
game VARCHAR,
attendance VARCHAR
) | What was the highest number of oppenents points recorded for game 9 when the attendance was less than 60,091? | SELECT MAX(opponents) FROM table_name_85 WHERE game = 9 AND attendance < 60 OFFSET 091 | sql_create_context |
CREATE TABLE table_14284 (
"Wimmera FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the sum of wins for teams with against under 1067? | SELECT SUM("Wins") FROM table_14284 WHERE "Against" < '1067' | wikisql |
CREATE TABLE delivery_route_locations (
location_code text,
route_id number,
location_address_id number,
location_name text
)
CREATE TABLE customers (
customer_id number,
payment_method text,
customer_name text,
customer_phone text,
customer_email text,
date_became_customer time... | Find the name of the most expensive product. | SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1 | spider |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 能知道医疗就诊75538853486对应的门诊号吗?或者是住院号 | SELECT CLINIC_ID FROM t_kc21 WHERE MED_CLINIC_ID = '75538853486' | css |
CREATE TABLE table_train_131 (
"id" int,
"thyroid_disease" bool,
"pulmonary_disease" bool,
"right_bundle_branch_block" bool,
"allergy_to_piperidine_derivatives" bool,
"obstructive_pulmonary_disease" bool,
"inflammatory_bowel_disease" bool,
"renal_disease" bool,
"hepatic_disease" bool... | subjects with evidence of clinically significant and active pulmonary, gastrointestinal, renal, hepatic, endocrine or cardiovascular system disease ( subjects with controlled hypertension, right bundle branch block [complete or partial] and pacemakers may be included in the study ) . subjects with thyroid disease may a... | SELECT * FROM table_train_131 WHERE pulmonary_disease = 1 OR gastrointestinal_disease = 1 OR renal_disease = 1 OR hepatic_disease = 1 OR endocrine_disease = 1 OR cardiovascular_disease = 1 OR (hypertension = 1 OR right_bundle_branch_block = 1 OR pacemakers = 1) OR (thyroid_disease = 1 AND euthyroid = 1) OR diabetes = 1 | criteria2sql |
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 medication (
medi... | first time patient 004-34650 was prescribed a drug in 05/last year? | 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 = '004-34650')) AND DATETIME(medication.drugstarttime, 'start of ... | eicu |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | 列出患者奚经略所有检验结果指标记录中的检测方法在2007-09-21到2008-12-08内有什么? | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJG... | css |
CREATE TABLE table_48991 (
"Track" real,
"Title" text,
"Songwriter(s)" text,
"Producer(s)" text,
"Length" text
) | Who produced the track that is 4:16 long? | SELECT "Producer(s)" FROM table_48991 WHERE "Length" = '4:16' | wikisql |
CREATE TABLE table_name_48 (
bronze INTEGER,
rank VARCHAR,
total VARCHAR
) | Which Bronze is the highest one that has a Rank of 26, and a Total larger than 1? | SELECT MAX(bronze) FROM table_name_48 WHERE rank = "26" AND total > 1 | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
BBCJBW text,
BBDM tex... | 在二零一五年三月二十日到二零二一年四月二十四日的这几年里,查一下医疗机构8772585转诊门诊的就诊记录数量 | SELECT COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON 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_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '87... | css |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_i... | what was the name of the intake that patient 31696 on 07/22/2104 first had? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31696)) AND STRFTIME('%y-%m-%d', inp... | mimic_iii |
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 demographic ... | how many patients who follow christian scientist religion had a lab test reticulocyte count, manual? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND lab.label = "Reticulocyte Count, Manual" | mimicsql_data |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGD... | 编号为77376909189与18476130843的检验报告单中名称相同的检测指标有没有?列出来这些检测指标名称都是什么? | (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '77376909189') INTERSECT (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '18476130843') | css |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
... | A pie chart about how many credits does the department offer? | SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE | nvbench |
CREATE TABLE table_name_29 (
outcome VARCHAR,
date VARCHAR
) | What was the outcome of the August 20, 2007 match? | SELECT outcome FROM table_name_29 WHERE date = "august 20, 2007" | sql_create_context |
CREATE TABLE table_name_75 (
gold INTEGER,
total VARCHAR,
bronze VARCHAR
) | What is the average gold that has a total of 2 and more than 1 bronze. | SELECT AVG(gold) FROM table_name_75 WHERE total = 2 AND bronze > 1 | sql_create_context |
CREATE TABLE table_80421 (
"Year" text,
"Carries" real,
"Rushing Yards" real,
"Average" real,
"Touchdowns" real,
"Points" real
) | What is the total number of rushing yards associated with averages over 8.4 and fewer than 54 carries? | SELECT COUNT("Rushing Yards") FROM table_80421 WHERE "Average" > '8.4' AND "Carries" < '54' | wikisql |
CREATE TABLE table_19889 (
"Series Ep." text,
"Episode" real,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | Name the total number of segment c for pressure cookers | SELECT COUNT("Segment C") FROM table_19889 WHERE "Segment A" = 'Pressure Cookers' | wikisql |
CREATE TABLE table_name_65 (
team_2 VARCHAR
) | What is the 2nd Leg, when Team 2 is Marbella? | SELECT 2 AS nd_leg FROM table_name_65 WHERE team_2 = "marbella" | sql_create_context |
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, return a bar chart about the distribution of name and revenue , and group by attribute founder. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name | nvbench |
CREATE TABLE table_name_52 (
team VARCHAR,
date_of_vacancy VARCHAR
) | I want the team for date of vacancy being 28 february | SELECT team FROM table_name_52 WHERE date_of_vacancy = "28 february" | 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 demographic ... | among patients tested for plasma cells, how many of them were widowed? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.label = "Plasma Cells" | mimicsql_data |
CREATE TABLE table_name_21 (
score VARCHAR,
opponents VARCHAR,
year VARCHAR
) | Which Score has Opponents of valencia, and a Year of 2011 12? | SELECT score FROM table_name_21 WHERE opponents = "valencia" AND year = "2011–12" | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | on 05/25/last year what was the maximum value of heartrate of patient 013-17922? | SELECT MAX(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 = '013-17922')) AND NOT vitalperiodic.heartrate IS NULL... | eicu |
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 subject name and discharge time of subject id 3369? | SELECT demographic.name, demographic.dischtime FROM demographic WHERE demographic.subject_id = "3369" | mimicsql_data |
CREATE TABLE table_name_43 (
score VARCHAR,
opponent VARCHAR,
surface VARCHAR,
year VARCHAR
) | What was the score on a clay surface in a year later than 2006 with David Ferrer as an opponent? | SELECT score FROM table_name_43 WHERE surface = "clay" AND year > 2006 AND opponent = "david ferrer" | sql_create_context |
CREATE TABLE table_name_82 (
years VARCHAR,
engine VARCHAR
) | what is the years for engin 5.7l hemi v8? | SELECT years FROM table_name_82 WHERE engine = "5.7l hemi v8" | sql_create_context |
CREATE TABLE table_18268826_1 (
written_by VARCHAR,
us_viewers__million_ VARCHAR
) | How many episodes by different writers were seen by 3.24 million people in the US? | SELECT COUNT(written_by) FROM table_18268826_1 WHERE us_viewers__million_ = "3.24" | sql_create_context |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,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 countries (
COUNTRY... | For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id. | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | nvbench |
CREATE TABLE table_41920 (
"Rank" real,
"Name" text,
"Team" text,
"Games" real,
"Points" real
) | What is the lowest Rank, when Name is Jeremiah Massey, and when Games is less than 20? | SELECT MIN("Rank") FROM table_41920 WHERE "Name" = 'jeremiah massey' AND "Games" < '20' | 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,... | 患者杨星波被开出过金额不低于3838.71元的药品在哪几次医疗记录中?列出医疗就诊编号有哪些? | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '杨星波' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 3838.71) | css |
CREATE TABLE table_name_50 (
result VARCHAR,
date VARCHAR
) | What was the result for the game played on December 20, 1970? | SELECT result FROM table_name_50 WHERE date = "december 20, 1970" | sql_create_context |
CREATE TABLE table_name_7 (
mascot VARCHAR,
principal__2013_2014_ VARCHAR
) | What was the mascot for the 2013-2014 principal named Frank Hendricsen? | SELECT mascot FROM table_name_7 WHERE principal__2013_2014_ = "frank hendricsen" | sql_create_context |
CREATE TABLE table_74829 (
"Wheel arrangement" text,
"Manufacturer Serial numbers" text,
"Year introduced MRWA" text,
"Quantity made" text,
"Quantity preserved" text,
"Year(s) withdrawn" text
) | What is the manufacturer serial number of the 1963 withdrawn year? | SELECT "Manufacturer Serial numbers" FROM table_74829 WHERE "Year(s) withdrawn" = '1963' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | what is diagnoses icd9 code and diagnoses long title of subject name dona cole? | SELECT diagnoses.icd9_code, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Dona Cole" | mimicsql_data |
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... | 根据科室编码与入院诊断疾病编码区别显示出医院7999719所有的就诊记载里,有民政补助的部分比上医疗总费用比值的最大值并且按降序来排列 | SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM, MAX(t_kc24.CIVIL_SUBSIDY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '7999719' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM ORDER BY MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) DESC | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | count the number of patients whose gender is f and procedure icd9 code is 4105? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.icd9_code = "4105" | mimicsql_data |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE T... | What are my grades for the courses taught by Prof. Aronoff ? | SELECT DISTINCT student_record.grade FROM student_record INNER JOIN offering_instructor ON student_record.offering_id = offering_instructor.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE LOWER(instructor.name) LIKE '%Aronoff%' AND student_record.student_id = 1 | advising |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
... | in 2105, what are the four most frequent interventions that patients were given in the same hospital encounter after receiving vascular catheter placement - arterial? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vascu... | eicu |
CREATE TABLE table_16034882_5 (
goals_scored INTEGER,
position VARCHAR
) | Name the most goals scored for position 4 | SELECT MAX(goals_scored) FROM table_16034882_5 WHERE position = 4 | sql_create_context |
CREATE TABLE table_3228 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | Which player went to college at Tennessee? | SELECT "Player" FROM table_3228 WHERE "College" = 'Tennessee' | wikisql |
CREATE TABLE table_name_53 (
game VARCHAR,
date VARCHAR
) | What was the number of game that was played on March 19? | SELECT game FROM table_name_53 WHERE date = "march 19" | sql_create_context |
CREATE TABLE table_name_47 (
to_par VARCHAR,
place VARCHAR,
score VARCHAR
) | How much To par has a Place of t1, and a Score of 70-70-71-71=282? | SELECT COUNT(to_par) FROM table_name_47 WHERE place = "t1" AND score = 70 - 70 - 71 - 71 = 282 | sql_create_context |
CREATE TABLE table_204_41 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
) | maria paris came in sixth place . what is her nationality ? | SELECT "nationality" FROM table_204_41 WHERE "name" = 'maria paris' | squall |
CREATE TABLE table_30805 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Sprints classification" text,
"Team classification" text
) | Who was the winner if the Mountains Classification award was given to Jaime Vergara and the Team Classification award is given to Col es Pasion Caf De Colombia 472? | SELECT "Winner" FROM table_30805 WHERE "Mountains classification" = 'Jaime Vergara' AND "Team classification" = 'Col es Pasion Café De Colombia 472' | wikisql |
CREATE TABLE table_name_77 (
crowd VARCHAR,
away_team VARCHAR
) | How large was the crowd when the away team was melbourne? | SELECT crowd FROM table_name_77 WHERE away_team = "melbourne" | 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
)
... | get me the number of patients less than 70 years who take drug via inhalation. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "70" AND prescriptions.route = "INHALATION" | mimicsql_data |
CREATE TABLE table_69551 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | What player played women's doubles when lee jae-jin lee eun-woo played mixed doubles? | SELECT "Women's doubles" FROM table_69551 WHERE "Mixed doubles" = 'lee jae-jin lee eun-woo' | wikisql |
CREATE TABLE fielding_outfield (
player_id TEXT,
year INTEGER,
stint INTEGER,
glf NUMERIC,
gcf NUMERIC,
grf NUMERIC
)
CREATE TABLE player_award_vote (
award_id TEXT,
year INTEGER,
league_id TEXT,
player_id TEXT,
points_won NUMERIC,
points_max INTEGER,
votes_first NUM... | Count the number of players who enter hall of fame for each year. Plot them as line chart. | SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid | nvbench |
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,
... | 在06年1月1日到11年8月25日内病号56134698的所有检验结果指标记录中的仪器编号以及名称分别叫什么? | (SELECT jyjgzbb.YQBH, jyjgzbb.YQMC 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.B... | 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... | 患者曹明智的身高多少厘米、体重多少公斤 | SELECT mzjzjlb.SG, mzjzjlb.TZ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND 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.YL... | css |
CREATE TABLE mzb (
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... | 在11年4月1日到12年4月8日期间,病患03015928买西药的次数是多少? | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '03015928' AND t_kc22.STA_DATE BETWEEN '2011-04-01' AND '2012-04-08' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_ID = '0... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | count the number of patients with drug code syringens who were born before 2098. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2098" AND prescriptions.formulary_drug_cd = "SYRINGENS" | mimicsql_data |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 总计患者年纪低于20岁的医疗记录的平均就医费总金额是多少? | SELECT AVG(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_AGE < 20) | css |
CREATE TABLE table_30133_3 (
gdp_as_of_2012_after_purchasing_power_parity__ppp__calculations__usd_billions_ VARCHAR
) | How many GDPs as of 2012 after PPP values are associated with a 2012 value of 23113? | SELECT COUNT(gdp_as_of_2012_after_purchasing_power_parity__ppp__calculations__usd_billions_) FROM table_30133_3 WHERE 2012 = 23113 | sql_create_context |
CREATE TABLE ftxmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | 患者53796219为疾病L85.935,门诊诊断的D2聚体(柠檬酸盐)的结果定量及其单位数据均为? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE table_60199 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | what is the sum of silver when the rank is 3, nation is france and bronze is less than 0? | SELECT SUM("Silver") FROM table_60199 WHERE "Rank" = '3' AND "Nation" = 'france' AND "Bronze" < '0' | wikisql |
CREATE TABLE table_58096 (
"Year" real,
"Winner" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Time" text
) | What is the average year for scatman winning? | SELECT AVG("Year") FROM table_58096 WHERE "Winner" = 'scatman' | wikisql |
CREATE TABLE table_2952 (
"Competition" text,
"Final position" text,
"First match" text,
"Last match" text,
"Final Place" text
) | Name the last match for argentina - estadio jos mar a minella | SELECT "Last match" FROM table_2952 WHERE "Final Place" = 'Argentina - Estadio José María Minella' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | how many patients with medicare insurance were tested with uptake ratio in lab? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicare" AND lab.label = "Uptake Ratio" | mimicsql_data |
CREATE TABLE table_26671 (
"Institution" text,
"Nickname" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real,
"Left" real
) | How many people are enrolled at the university in milwaukee, wisconsin | SELECT MIN("Enrollment") FROM table_26671 WHERE "Location" = 'Milwaukee, Wisconsin' | wikisql |
CREATE TABLE party_forms (
party_id number,
form_id number,
date_completion_started time,
form_status_code text,
date_fully_completed time
)
CREATE TABLE party_services (
booking_id number,
customer_id number,
service_id number,
service_datetime time,
booking_made_date time
)
C... | Return the name of the organization which has the most contact individuals. | SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_28448 (
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" real
) | How many production codes does 'number one' have? | SELECT MAX("Prod. code") FROM table_28448 WHERE "Title" = 'Number One' | wikisql |
CREATE TABLE table_15511178_3 (
report VARCHAR,
pole_position VARCHAR,
winning_team VARCHAR
) | Did the race get reported where the winning team was Newman Wachs racing and the pole belonged to Carl Skerlong | SELECT report FROM table_15511178_3 WHERE pole_position = "Carl Skerlong" AND winning_team = "Newman Wachs Racing" | sql_create_context |
CREATE TABLE table_47465 (
"Rank" text,
"Runs" text,
"Opponent" text,
"Venue" text,
"Season" text
) | What season were the runs 310/9? | SELECT "Season" FROM table_47465 WHERE "Runs" = '310/9' | wikisql |
CREATE TABLE table_77230 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What is the overall pick number for a draft pick smaller than 9, named buck mystrom from Michigan State college? | SELECT "Overall" FROM table_77230 WHERE "Pick" < '9' AND "College" = 'michigan state' AND "Name" = 'buck mystrom' | wikisql |
CREATE TABLE table_72273 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
) | What is the mens singles of 2008? | SELECT "Mens singles" FROM table_72273 WHERE "Year" = '2008' | wikisql |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | Please give me advice on which courses are best taken prior to RCARTS 286 . | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'RCARTS' AND number = 286 | advising |
CREATE TABLE table_47151 (
"Verb" text,
"2 (VF)" text,
"2 (F)" text,
"3 (F)" text,
"2/3 (P)" text
) | What is the 2F of she khae? | SELECT "2 (F)" FROM table_47151 WHERE "3 (F)" = 'she khae' | wikisql |
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 the number of patients whose admission type is emergency and procedure long title is transplant from live non-related donor? | 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.long_title = "Transplant from live non-related donor" | mimicsql_data |
CREATE TABLE mountain (
prominence INTEGER,
country VARCHAR
) | What are the average prominence of the mountains in country 'Morocco'? | SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco' | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.