instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code tex... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57023) AND microbiologyevents.spec_type_desc = 'blood culture ( myco/f lytic bottle)' AND DATETIME(microbiologyevents.charttime, 'start of month') = DA... | mimic_iii |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... | SELECT Grape, COUNT(*) FROM wine GROUP BY Grape | nvbench |
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
)
CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
)
-- Using valid SQLite, answer the following questions fo... | SELECT People_ID, Snatch FROM body_builder | nvbench |
CREATE TABLE table_name_90 (
status VARCHAR,
area_km_2 VARCHAR,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What status has an area km 2 less than 27.82, with 352 as the population?
| SELECT status FROM table_name_90 WHERE area_km_2 < 27.82 AND population = 352 | sql_create_context |
CREATE TABLE table_name_33 (
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country does Mark Hayes play for?
| SELECT country FROM table_name_33 WHERE player = "mark hayes" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
C... | WITH tagbadges_cte AS (SELECT b.UserId AS uid, SUM(CASE WHEN b.Class = 1 THEN 1 ELSE 0 END) AS gold, SUM(CASE WHEN b.Class = 2 THEN 1 ELSE 0 END) AS silver, SUM(CASE WHEN b.Class = 3 THEN 1 ELSE 0 END) AS bronze, COUNT(b.Id) AS total FROM Badges AS b INNER JOIN Tags AS t ON t.TagName = Name GROUP BY UserId) SELECT u.Id... | sede |
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admityear < "2107" | mimicsql_data |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '56017266' AND hz_info.YLJGDM = '9235653' AND zyjzjlb.JZKSMC LIKE '%角膜%' | css |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDat... | SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ... | sede |
CREATE TABLE table_76124 (
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"HDTV" text,
"Package/Option" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the HDTV when documentaries are the content?
| SELECT "HDTV" FROM table_76124 WHERE "Content" = 'documentaries' | wikisql |
CREATE TABLE table_16409745_1 (
interface VARCHAR,
pages_per_minute__color_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What interface is used on the scanner that has a 36 pages per minute?
| SELECT interface FROM table_16409745_1 WHERE pages_per_minute__color_ = 36 | 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... | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) 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_inf... | css |
CREATE TABLE table_203_798 (
id number,
"party" text,
"votes" text,
"%" number,
"swing" number,
"seats" number,
"change" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many seats did the independent party get ?
| SELECT "seats" FROM table_203_798 WHERE "party" = 'independent' | squall |
CREATE TABLE table_10367 (
"State" text,
"Swimsuit" real,
"Interview" real,
"Evening Gown" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest swimsuit for a contestant with an average of 9.125?
| SELECT MIN("Swimsuit") FROM table_10367 WHERE "Average" = '9.125' | wikisql |
CREATE TABLE table_name_79 (
to_par VARCHAR,
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the To par of the T8 Place Player with a Score of 72-70-66=208?
| SELECT to_par FROM table_name_79 WHERE place = "t8" AND score = 72 - 70 - 66 = 208 | sql_create_context |
CREATE TABLE table_70765 (
"Name" text,
"Country" text,
"Type" text,
"Moving from" text,
"Transfer window" text,
"Ends" real,
"Transfer fee" text,
"Source" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which transfer window was moving f... | SELECT "Transfer window" FROM table_70765 WHERE "Moving from" = 'borussia dortmund' | wikisql |
CREATE TABLE table_42909 (
"Year" real,
"Champion" text,
"Runner-up" text,
"Third place" text,
"Fourth place" text,
"Jack Tompkins Trophy (MVP)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Fourth place with a Year that is 1966?
| SELECT "Fourth place" FROM table_42909 WHERE "Year" = '1966' | wikisql |
CREATE TABLE table_14186 (
"Question #" real,
"Prize Level (in Rupees)" real,
"Range (in %)" real,
"Walk-Away Prize" real,
"Prize If Wrong" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the prize level when the Prize if Wrong is 1,000 and t... | SELECT SUM("Prize Level (in Rupees)") FROM table_14186 WHERE "Prize If Wrong" = '1,000' AND "Question #" < '2' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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),
CO... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_46912 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Points have a Time/Retired of +49.222 secs?
| SELECT MAX("Points") FROM table_46912 WHERE "Time/Retired" = '+49.222 secs' | wikisql |
CREATE TABLE table_62999 (
"Pick" real,
"Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which college did the player picked larger than 130 by the New York Jets go to?
| SELECT "College" FROM table_62999 WHERE "Pick" > '130' AND "Team" = 'new york jets' | wikisql |
CREATE TABLE table_20573232_1 (
nader_percentage VARCHAR,
obama_percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Nader's percentage when Obama is 44.6%?
| SELECT nader_percentage FROM table_20573232_1 WHERE obama_percentage = "44.6%" | sql_create_context |
CREATE TABLE table_name_23 (
ties VARCHAR,
goals_against INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the number of Ties for games with Goals Against smaller than 33?
| SELECT ties FROM table_name_23 WHERE goals_against < 33 | sql_create_context |
CREATE TABLE table_30353 (
"Late Old English (Anglian)" text,
"Early Middle English" text,
"Late Middle English" text,
"Early Modern English" text,
"Modern English" text,
"Example" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the moder... | SELECT "Modern English" FROM table_30353 WHERE "Example" = 'weg > "way"; regn > "rain' | wikisql |
CREATE TABLE locations (
location_id number,
street_address text,
postal_code text,
city text,
state_province text,
country_id text
)
CREATE TABLE employees (
employee_id number,
first_name text,
last_name text,
email text,
phone_number text,
hire_date time,
job_id t... | SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title | spider |
CREATE TABLE table_261927_2 (
institution VARCHAR,
primary_conference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which institutions primary conference is merged into the university of Massachusetts boston?
| SELECT institution FROM table_261927_2 WHERE primary_conference = "Merged into the University of Massachusetts Boston" | sql_create_context |
CREATE TABLE table_203_279 (
id number,
"interferometer and observing mode" text,
"waveband" text,
"limiting magnitude" number,
"minimum baseline (m)\n(un-projected)" number,
"maximum baseline (m)" number,
"approx. no. visibility measurements per year\n(measurements per night x nights used p... | SELECT SUM("limiting magnitude") FROM table_203_279 WHERE "interferometer and observing mode" IN ('coast visible', 'coast infrared') | squall |
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destr... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From | nvbench |
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREAT... | 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, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MONTREAL' AND DAYS_1.day_name ... | atis |
CREATE TABLE table_2757 (
"Pos" text,
"##" real,
"Name" text,
"Team" text,
"Lap One" text,
"Lap Two" text,
"Lap Three" text,
"Lap Four" text,
"Total Time" text,
"Avg. Speed" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is ... | SELECT MIN("##") FROM table_2757 WHERE "Team" = 'Team 3G' | wikisql |
CREATE TABLE table_28954 (
"Rd." text,
"Circuit" text,
"City / State" text,
"Date" text,
"Championship" text,
"Challenge" text,
"Production" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location for the date 7 10 october?
| SELECT "City / State" FROM table_28954 WHERE "Date" = '7–10 October' | wikisql |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25696) AND STRFTIME('%y', procedures_icd.charttime) = '2105' ORDER B... | mimic_iii |
CREATE TABLE table_name_10 (
decile INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest decile that Ohau School has?
| SELECT MIN(decile) FROM table_name_10 WHERE name = "ohau school" | sql_create_context |
CREATE TABLE table_name_48 (
player VARCHAR,
position VARCHAR,
hometown VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a Position of infielder, and a Hometown of atlanta, ga?
| SELECT player FROM table_name_48 WHERE position = "infielder" AND hometown = "atlanta, ga" | sql_create_context |
CREATE TABLE table_33647 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the largest crowd where Carlton was the... | SELECT MAX("Crowd") FROM table_33647 WHERE "Away team" = 'carlton' | wikisql |
CREATE TABLE table_8405 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ($)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is the player who earned $9,000 from?
| SELECT "Country" FROM table_8405 WHERE "Money ($)" = '9,000' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER'... | atis |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.dob_year < "2134" | mimicsql_data |
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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
... | SELECT 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 = 30044)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
CREATE TABLE table_name_61 (
cuts_made INTEGER,
wins VARCHAR,
top_25 VARCHAR,
top_5 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most cuts made with top-25 more than 4 and top 5 of 1 with wins more than 0
| SELECT MAX(cuts_made) FROM table_name_61 WHERE top_25 > 4 AND top_5 = 1 AND wins > 0 | sql_create_context |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZ... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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.... | css |
CREATE TABLE table_203_650 (
id number,
"ceremony" text,
"award" text,
"category" text,
"name" text,
"outcome" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of awards that the film won or was nominated for ?
| SELECT COUNT(*) FROM table_203_650 | squall |
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
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Malignant neoplasm of descending colon" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCFF 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 jybgb.BGDH = jyjgzbb.BGDH... | css |
CREATE TABLE table_62754 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many lanes have a rank greater than 8?
| SELECT SUM("Lane") FROM table_62754 WHERE "Rank" > '8' | wikisql |
CREATE TABLE table_name_41 (
position VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did kyle mckenzie play?
| SELECT position FROM table_name_41 WHERE name = "kyle mckenzie" | sql_create_context |
CREATE TABLE table_name_71 (
touchdowns INTEGER,
field_goals INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the most touchdowns with more than 0 Field goals?
| SELECT MAX(touchdowns) FROM table_name_71 WHERE field_goals > 0 | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartr... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'hyperkalemia - due to excess intake') | eicu |
CREATE TABLE table_53802 (
"Nation" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many silvers for finland?
| SELECT "Silver" FROM table_53802 WHERE "Nation" = 'finland' | wikisql |
CREATE TABLE table_203_336 (
id number,
"#" number,
"date" text,
"opponent" text,
"score" text,
"win" text,
"loss" text,
"save" text,
"attendance" number,
"record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the diffe... | SELECT ABS((SELECT "attendance" FROM table_203_336 WHERE "date" = 'july 7') - (SELECT "attendance" FROM table_203_336 WHERE "date" = 'july 8')) | squall |
CREATE TABLE table_19417244_2 (
directed_by VARCHAR,
us_viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who directed the episode that have 14.59 million viewers
| SELECT directed_by FROM table_19417244_2 WHERE us_viewers__millions_ = "14.59" | 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_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.OUT_DIAG_DIS_CD, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5248115' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.OUT_DIAG_DIS_CD UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.OUT_DIAG_DIS_CD, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '52... | css |
CREATE TABLE table_1708050_3 (
wins INTEGER,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most wins where position is 16th
| SELECT MAX(wins) FROM table_1708050_3 WHERE position = "16th" | sql_create_context |
CREATE TABLE table_47344 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date did they play in Boston Garden with a record of 22-4?
| SELECT "Date" FROM table_47344 WHERE "Location" = 'boston garden' AND "Record" = '22-4' | wikisql |
CREATE TABLE table_45166 (
"Season" real,
"Winner" text,
"Team" text,
"Goals" text,
"Assists" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points when Bill Benson was the winner?
| SELECT "Points" FROM table_45166 WHERE "Winner" = 'bill benson' | wikisql |
CREATE TABLE table_12842068_1 (
submitting_country VARCHAR,
film_title_used_in_nomination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country submitted the movie the orphanage?
| SELECT submitting_country FROM table_12842068_1 WHERE film_title_used_in_nomination = "The Orphanage" | sql_create_context |
CREATE TABLE table_12218 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest score that has t10 as the place, with Ireland as the country?
| SELECT MIN("Score") FROM table_12218 WHERE "Place" = 't10' AND "Country" = 'ireland' | wikisql |
CREATE TABLE table_34263 (
"Name" text,
"Council Seat" text,
"Formed" real,
"Population (2010)" real,
"Area" text,
"Website" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the metropolitan that has a population larger than 35... | SELECT "Name" FROM table_34263 WHERE "Population (2010)" > '35,082' AND "Formed" > '1897' | wikisql |
CREATE TABLE table_name_74 (
position VARCHAR,
player VARCHAR,
goals VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Mike Forshaw had 0 goals and 28 points. What is his position?
| SELECT position FROM table_name_74 WHERE goals = 0 AND points = 28 AND player = "mike forshaw" | sql_create_context |
CREATE TABLE table_name_39 (
home_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team plays at Lake Oval?
| SELECT home_team FROM table_name_39 WHERE venue = "lake oval" | sql_create_context |
CREATE TABLE table_203_211 (
id number,
"pos." number,
"time" text,
"athlete" text,
"country" text,
"venue" text,
"date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many athletes were faster than 12.40 seconds ?
| SELECT COUNT("athlete") FROM table_203_211 WHERE "time" < 12.40 | squall |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm... | SELECT 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 = 31482) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIM... | mimic_iii |
CREATE TABLE table_name_97 (
area_km_2 INTEGER,
census_ranking VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the area of the community with a census ranking of 636 of 5,008?
| SELECT AVG(area_km_2) FROM table_name_97 WHERE census_ranking = "636 of 5,008" | sql_create_context |
CREATE TABLE table_11975 (
"Date" text,
"Tournament" text,
"Winning Score" text,
"Margin of Victory" text,
"Runner-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the runner up in the konica san jose classic Tournament?
| SELECT "Runner-up" FROM table_11975 WHERE "Tournament" = 'konica san jose classic' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,... | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... | advising |
CREATE TABLE table_53530 (
"Pick" real,
"Player" text,
"Country of origin*" text,
"PBA team" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college has pick 45
| SELECT "College" FROM table_53530 WHERE "Pick" = '45' | wikisql |
CREATE TABLE table_34643 (
"Year" real,
"US Cham. Rank" real,
"US Cham. Spending" text,
"Next Highest Spender" text,
"Next Highest Amount" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year is the highest one that has a Next Highest Spender o... | SELECT MAX("Year") FROM table_34643 WHERE "Next Highest Spender" = 'aarp' AND "US Cham. Spending" = '$39,805,000' AND "US Cham. Rank" > '1' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE l... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'insulin' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME()... | eicu |
CREATE TABLE table_name_38 (
races VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which races did they accumulate at least 125 points?
| SELECT races FROM table_name_38 WHERE points = "125" | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND procedures.long_title = "Other endoscopy of small intestine" | mimicsql_data |
CREATE TABLE table_27847088_1 (
viewers__millions_ VARCHAR,
series_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many were the viewers (in millions) of the series no. 45?
| SELECT viewers__millions_ FROM table_27847088_1 WHERE series_no = 45 | sql_create_context |
CREATE TABLE table_name_81 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is 2009, when 2004 is 2R, and when 1993 is A?
| SELECT 2009 FROM table_name_81 WHERE 2004 = "2r" AND 1993 = "a" | sql_create_context |
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartments (
apt_id number,
building_id number,
apt_type_code text,
apt_number text,
bathroom_count number,
bedroom_count number,
room_count text
)
CREATE TABLE guests (
guest_id number,
ge... | SELECT guest_first_name, guest_last_name FROM guests | spider |
CREATE TABLE aircraft (
Aircraft_ID int,
Order_Year int,
Manufacturer text,
Model text,
Fleet_Series text,
Powertrain text,
Fuel_Propulsion text
)
CREATE TABLE pilot_record (
Record_ID int,
Pilot_ID int,
Aircraft_ID int,
Date text
)
CREATE TABLE pilot (
Pilot_ID int,
... | SELECT Position, COUNT(Position) FROM pilot GROUP BY Position | nvbench |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc24.t_kc21_IN_DIAG_DIS_CD, t_kc24.t_kc21_IN_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_ID = '32023982' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 3281.11) | css |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id... | SELECT t3.drug FROM (SELECT t2.drug, 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 WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii |
CREATE TABLE table_name_84 (
position INTEGER,
difference VARCHAR,
drawn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has a Difference of 5, and a Drawn smaller than 3?
| SELECT MIN(position) FROM table_name_84 WHERE difference = "5" AND drawn < 3 | sql_create_context |
CREATE TABLE table_10975034_2 (
player VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player from the 2004 CFL draft attended Wilfrid Laurier?
| SELECT player FROM table_10975034_2 WHERE college = "Wilfrid Laurier" | sql_create_context |
CREATE TABLE table_42361 (
"State" text,
"Seats (ACs)" real,
"Date of Counting" text,
"Incumbent" text,
"Election Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest number of seats with INC as an election winner and BJP incu... | SELECT MIN("Seats (ACs)") FROM table_42361 WHERE "Election Winner" = 'inc' AND "Incumbent" = 'bjp' | wikisql |
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
-- Using valid SQLite, answer the following questions fo... | SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY COUNT(Type) | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.icd9_code = "41512" | mimicsql_data |
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 prescriptions (
subject_id text,
hadm_id... | SELECT demographic.gender, lab.flag FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2110" | mimicsql_data |
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,... | SELECT OUT_DIAG_DOC_CD, OUT_DIAG_DOC_NM FROM t_kc21 WHERE PERSON_NM = '曹子平' GROUP BY OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC | 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 procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.icd9_code = "2859" | mimicsql_data |
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,
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'chlorhexidine gluconate 0.12 % mouth/throat soln multidose') | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "63" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_37702 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was republican incumbent Joseph McKenna first elected?
| SELECT "First elected" FROM table_37702 WHERE "Party" = 'republican' AND "Incumbent" = 'joseph mckenna' | wikisql |
CREATE TABLE table_57970 (
"Episode" real,
"Rating" real,
"Share" real,
"Rating/share (18-49)" text,
"Rank (Timeslot)" real,
"Rank (Night)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the timeslor rank for the episode with larger than... | SELECT AVG("Rank (Timeslot)") FROM table_57970 WHERE "Rating" > '2.9' AND "Rating/share (18-49)" = '2.6/8' AND "Rank (Night)" > '5' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Idio periph neurpthy NOS" | mimicsql_data |
CREATE TABLE table_32222 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lowest round with the opponent John Howa... | SELECT MIN("Round") FROM table_32222 WHERE "Method" = 'decision (unanimous)' AND "Opponent" = 'john howard' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT wdmzjzjlb.JZJSSJ FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '51166395425' UNION SELECT bdmzjzjlb.JZJSSJ FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '51166395425' | css |
CREATE TABLE table_59209 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total for player karrie webb?
| SELECT COUNT("Total") FROM table_59209 WHERE "Player" = 'karrie webb' | wikisql |
CREATE TABLE table_name_12 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the away team that played home team of Perth Wildcats?
| SELECT away_team FROM table_name_12 WHERE home_team = "perth wildcats" | sql_create_context |
CREATE TABLE table_62085 (
"Device" text,
"Carrier" text,
"Package Version" text,
"Applications" text,
"Software Platform" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE PACKAGE VERSION WITH TELUS MOBILITY?
| SELECT "Package Version" FROM table_62085 WHERE "Carrier" = 'telus mobility' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description... | SELECT COUNT(user_posts) FROM (SELECT COUNT(*) AS user_posts FROM Posts WHERE NOT OwnerUserId IS NULL AND PostTypeId = 2 GROUP BY OwnerUserId) AS a | sede |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND procedures.icd9_code = "45" | mimicsql_data |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '躁狂型精神病' AND jyjgzbb.JCZBDM = '503506' | css |
CREATE TABLE table_9864 (
"Name" text,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Home Town" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total combined weight of players from minnetonka, mn?
| SELECT SUM("Weight") FROM table_9864 WHERE "Home Town" = 'minnetonka, mn' | 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... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-92657')) AND intakeoutput.celllabel = 'urine... | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "77" AND procedures.short_title = "Percu endosc gastrostomy" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.