instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_1341718_14 (
first_elected INTEGER,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the year first elected for district illinois 7?
| SELECT MAX(first_elected) FROM table_1341718_14 WHERE district = "Illinois 7" | sql_create_context |
CREATE TABLE table_name_15 (
type VARCHAR,
unit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which type had the unit greifswald - 7 (kgr 7) ?
| SELECT type FROM table_name_15 WHERE unit = "greifswald - 7 (kgr 7)" | sql_create_context |
CREATE TABLE table_name_17 (
round VARCHAR,
grand_prix VARCHAR,
fastest_lap VARCHAR,
pole_position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- During the hungarian grand prix where the pole position was michael schumacher and the fastest lap was d... | SELECT COUNT(round) FROM table_name_17 WHERE fastest_lap = "damon hill" AND pole_position = "michael schumacher" AND grand_prix = "hungarian grand prix" | sql_create_context |
CREATE TABLE table_204_877 (
id number,
"place" number,
"position" text,
"number" number,
"name" text,
"league two" number,
"fa cup" number,
"league cup" number,
"fl trophy" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT COUNT("name") FROM table_204_877 WHERE "league cup" > 0 | squall |
CREATE TABLE table_name_99 (
winter VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Winter in 1906?
| SELECT winter FROM table_name_99 WHERE year = 1906 | sql_create_context |
CREATE TABLE table_13079788_3 (
circuit VARCHAR,
date VARCHAR,
gt3_winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are all the circuit for 9 september and gt3 winner hector lester allan simonsen
| SELECT circuit FROM table_13079788_3 WHERE date = "9 September" AND gt3_winner = "Hector Lester Allan Simonsen" | sql_create_context |
CREATE TABLE table_45336 (
"Year" real,
"Domestic freight" real,
"Domestic mail" real,
"International freight" real,
"International mail" real,
"Total freight and mail" real,
"Change" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is th... | SELECT MAX("Domestic freight") FROM table_45336 WHERE "Change" = '+9,8%' AND "Total freight and mail" > '3,278' | 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 ... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26720) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'pco2') AND STRFTIME('%y', labevents.charttime) <= '2102' GROUP BY STRFTIME(... | mimic_iii |
CREATE TABLE table_name_48 (
catalogue VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the october 15, 2004 catalogue
| SELECT catalogue FROM table_name_48 WHERE date = "october 15, 2004" | 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 jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_... | css |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Home, COUNT(All_Home) FROM basketball_match GROUP BY All_Home | nvbench |
CREATE TABLE table_12052 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Visitor when the Home team was Anaheim on the Date of April 12?
| SELECT "Visitor" FROM table_12052 WHERE "Home" = 'anaheim' AND "Date" = 'april 12' | wikisql |
CREATE TABLE table_train_134 (
"id" int,
"mini_mental_state_examination_mmse" int,
"geriatric_depression_scale_gds" int,
"alzheimer_disease_ad" bool,
"rosen_modified_hachinski_ischemic_score" int,
"clinical_dementia_rating_cdr" float,
"NOUSE" float
)
-- Using valid SQLite, answer the follo... | SELECT * FROM table_train_134 WHERE alzheimer_disease_ad = 1 OR (mini_mental_state_examination_mmse >= 14 AND mini_mental_state_examination_mmse <= 26) | criteria2sql |
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Transactions (
tra... | SELECT T1.Investor_details, T1.investor_id FROM Investors AS T1 JOIN Transactions AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" | nvbench |
CREATE TABLE table_name_30 (
method VARCHAR,
race VARCHAR,
date_of_execution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How was the native american executed in July 1836?
| SELECT method FROM table_name_30 WHERE race = "native american" AND date_of_execution = "july 1836" | sql_create_context |
CREATE TABLE table_32177 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average round when there is a defensive back and an overall smaller than 199?
| SELECT AVG("Round") FROM table_32177 WHERE "Position" = 'defensive back' AND "Overall" < '199' | wikisql |
CREATE TABLE table_34392 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the record of the game played at home by the Blues where the... | SELECT "Record" FROM table_34392 WHERE "Attendance" > '4,719' AND "Home" = 'blues' | wikisql |
CREATE TABLE people (
People_ID VARCHAR
)
CREATE TABLE employment (
People_ID VARCHAR,
Company_ID VARCHAR
)
CREATE TABLE company (
Name VARCHAR,
Company_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the names of companies and the numbe... | SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name | 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 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Umbilical vein catheterization" | mimicsql_data |
CREATE TABLE table_name_42 (
result VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result of the match with Zab Judah as the opponent?
| SELECT result FROM table_name_42 WHERE opponent = "zab judah" | sql_create_context |
CREATE TABLE table_name_84 (
driver VARCHAR,
grid VARCHAR,
laps VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What driver has a grid of under 10, and under 70 laps?
| SELECT driver FROM table_name_84 WHERE grid < 10 AND laps < 70 | sql_create_context |
CREATE TABLE table_28511 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what type of institution is ottawa university?
| SELECT "Type" FROM table_28511 WHERE "Institution" = 'Ottawa University' | wikisql |
CREATE TABLE table_name_40 (
district VARCHAR,
place_of_birth VARCHAR,
delegate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many districts in Baltimore City does Cheryl Glenn dictate?
| SELECT COUNT(district) FROM table_name_40 WHERE place_of_birth = "baltimore city" AND delegate = "cheryl glenn" | sql_create_context |
CREATE TABLE table_name_90 (
laps VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of laps with rank of 8
| SELECT COUNT(laps) FROM table_name_90 WHERE rank = "8" | sql_create_context |
CREATE TABLE table_8438 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Team 1, Everton, has what as a 1st leg?
| SELECT "1st leg" FROM table_8438 WHERE "Team 1" = 'everton' | wikisql |
CREATE TABLE table_12718 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Country is David Toms from?
| SELECT "Country" FROM table_12718 WHERE "Player" = 'david toms' | wikisql |
CREATE TABLE table_name_39 (
points VARCHAR,
club VARCHAR,
goal_difference VARCHAR,
wins VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In the club of Real Oviedo, what were the points of the competitor with a goal difference less than 38, and 12 win... | SELECT points FROM table_name_39 WHERE goal_difference < 38 AND wins = 12 AND club = "real oviedo" | sql_create_context |
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.long_title = "Coronary arteriography using a single catheter" | mimicsql_data |
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_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),... | SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_50539 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "Date" FROM table_50539 WHERE "Game" = '65' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | SELECT mzjzjlb.SG, mzjzjlb.TZ FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '18593737' | css |
CREATE TABLE table_name_76 (
accreditation_level VARCHAR,
network_brand_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the accreditation level of the network brand Movistar?
| SELECT accreditation_level FROM table_name_76 WHERE network_brand_name = "movistar" | sql_create_context |
CREATE TABLE table_57327 (
"Round" real,
"Grand Prix" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which grand prix had gerhard ber... | SELECT "Grand Prix" FROM table_57327 WHERE "Fastest Lap" = 'gerhard berger' AND "Pole Position" = 'jacques villeneuve' | wikisql |
CREATE TABLE table_77720 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is Runner(s)-up that has a Date of may 24, 1999?
| SELECT "Runner(s)-up" FROM table_77720 WHERE "Date" = 'may 24, 1999' | wikisql |
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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '施博雅' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2005-08-29' AND '2007-04-15' AND t_kc22.MED_INV_IT... | css |
CREATE TABLE table_71601 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was there a team of Simon and the start was 3?
| SELECT "Year" FROM table_71601 WHERE "Team" = 'simon' AND "Start" = '3' | wikisql |
CREATE TABLE table_763 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the candidate in the election in the Tennessee 9 district?
| SELECT "Candidates" FROM table_763 WHERE "District" = 'Tennessee 9' | wikisql |
CREATE TABLE table_8120 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Winning score has a Date of aug 26, 1973?
| SELECT "Winning score" FROM table_8120 WHERE "Date" = 'aug 26, 1973' | wikisql |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_NM = '吕宏旷' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_CD = '068607-l') | css |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... | eicu |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_... | SELECT chartevents.charttime 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 = 12775) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WH... | mimic_iii |
CREATE TABLE table_36106 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average attendance from june 11
| SELECT AVG("Attendance") FROM table_36106 WHERE "Date" = 'june 11' | wikisql |
CREATE TABLE table_11164 (
"Difficulty Value" text,
"1d10 Resolution (+5)" real,
"3d6 or 1d20 Resolution (+10)" real,
"+1d6-1d6 or +1d10-1d10 (+0)" real,
"+1d12 (6)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest +1d12 (6) with a... | SELECT MAX("+1d12 (6)") FROM table_11164 WHERE "3d6 or 1d20 Resolution (+10)" > '10' AND "+1d6-1d6 or +1d10-1d10 (+0)" = '4' AND "1d10 Resolution (+5)" > '9' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE table_204_555 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- julio rene martinez is from guatemala , what did he place in 2002 ... | SELECT "position" FROM table_204_555 WHERE "year" = 2002 | squall |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
... | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-28600')) AND microlab.culturesite = 'sputum, tracheal specimen' AND STRFTIME('... | eicu |
CREATE TABLE table_27509 (
"Song" text,
"Singer" text,
"Co-Singers" text,
"Music Director" text,
"Lyricist" text,
"Co-Stars" text,
"Movie/Album" text,
"Year" text,
"Additional Info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In w... | SELECT "Year" FROM table_27509 WHERE "Co-Stars" = 'Mala Sinha and Amitabh Bachchan' | wikisql |
CREATE TABLE table_204_658 (
id number,
"week" number,
"date" text,
"kickoff" text,
"opponent" text,
"results\nfinal score" text,
"results\nteam record" text,
"game site" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT COUNT(*) FROM table_204_658 WHERE "game site" = 'olympic stadium' AND "attendance" > 12000 | squall |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT SUM(inputevents_cv.amount) 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 = 15447)) AND DATETIME(inputevents_cv.charttime, 'start of day') = DATETIME(CURRENT_TIME(), ... | mimic_iii |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,... | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1272)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'gast... | mimic_iii |
CREATE TABLE table_name_55 (
date VARCHAR,
margin_of_victory VARCHAR,
runner_s__up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date was the event that Yani won in a playoff over Yueh-Chyn Huang?
| SELECT date FROM table_name_55 WHERE margin_of_victory = "playoff" AND runner_s__up = "yueh-chyn huang" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT demographic.marital_status, demographic.language FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_46676 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of gold medals the netherlands got when they had more than 4 bron... | SELECT AVG("Gold") FROM table_46676 WHERE "Nation" = 'netherlands' AND "Bronze" > '4' | wikisql |
CREATE TABLE table_name_72 (
year VARCHAR,
award VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was there a Tony award category of Best Revival of a Musical?
| SELECT year FROM table_name_72 WHERE award = "tony award" AND category = "best revival of a musical" | sql_create_context |
CREATE TABLE table_61478 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the away team with a 4 tie no.?
| SELECT "Away team" FROM table_61478 WHERE "Tie no" = '4' | wikisql |
CREATE TABLE table_59944 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is 2008 when 2012 is 3r and 2009 is 2r?
| SELECT "2008" FROM table_59944 WHERE "2012" = '3r' AND "2009" = '2r' | wikisql |
CREATE TABLE table_name_70 (
points VARCHAR,
scored VARCHAR,
conceded VARCHAR,
position VARCHAR,
losses VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Points have a Position larger than 4, and Losses larger than 5, and a Conceded of 15, ... | SELECT COUNT(points) FROM table_name_70 WHERE position > 4 AND losses > 5 AND conceded = 15 AND scored > 11 | 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.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '77164356' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 6696.69) UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '77164356' AND fgw... | css |
CREATE TABLE table_15746 (
"Year" real,
"Denomination" text,
"Alloy" text,
"Reverse" text,
"Diameter" text,
"Weight" text,
"Obverse" text,
"Mintage" real,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the denominati... | SELECT "Denomination" FROM table_15746 WHERE "Series" = 'iii series' | wikisql |
CREATE TABLE table_27277284_27 (
mult_1 VARCHAR,
frequency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the possible multipliers for 1900MHz processors?
| SELECT mult_1 FROM table_27277284_27 WHERE frequency = "1900MHz" | sql_create_context |
CREATE TABLE table_14298 (
"Name A[\u203a ]" text,
"Dam or A[\u203a ] Reservoir" text,
"GNIS Feature ID # Link A[\u203a ] B[\u203a ]" real,
"Elevation A[\u203a ]" text,
"Borough or A[\u203a ] Census area" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Dam or A[\u203a ] Reservoir" FROM table_14298 WHERE "GNIS Feature ID # Link A[\u203a ] B[\u203a ]" = '1415517' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 ... | SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC | nvbench |
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 prescriptions (
subject_id text,
hadm_id... | 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 = "Insulins and antidiabetic agents causing adverse effects in therapeutic use" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_info... | css |
CREATE TABLE table_203_266 (
id number,
"group" text,
"members" number,
"caucusing" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what group had the greatest amount of members ?
| SELECT "group" FROM table_203_266 ORDER BY "members" DESC LIMIT 1 | squall |
CREATE TABLE table_name_24 (
unwto_region VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Italy's UNWTO region?
| SELECT unwto_region FROM table_name_24 WHERE country = "italy" | sql_create_context |
CREATE TABLE table_name_9 (
latitude INTEGER,
water__sqmi_ VARCHAR,
ansi_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Latitude has a Water (sqmi) of 0.267, and an ANSI code larger than 1759605?
| SELECT SUM(latitude) FROM table_name_9 WHERE water__sqmi_ = 0.267 AND ansi_code > 1759605 | sql_create_context |
CREATE TABLE table_name_18 (
opponent VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Blue Jays opponent when their record was 84-69?
| SELECT opponent FROM table_name_18 WHERE record = "84-69" | 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 medication (
medi... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884') AND patient.unitdischargetime IS NULL) AND intakeoutput.cellpa... | eicu |
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 mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '68891668' UNION SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmz... | css |
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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 = jybgb_jyjgzbb.Y... | css |
CREATE TABLE table_54369 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest rank with less than 2 wings, more than 26 events, and less th... | SELECT MIN("Rank") FROM table_54369 WHERE "Wins" < '2' AND "Earnings ( $ )" < '1,831,211' AND "Events" > '26' | wikisql |
CREATE TABLE table_40783 (
"Rank" text,
"Runs" text,
"Player" text,
"Match" text,
"Venue" text,
"Season" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue has don bradman (nsw) as the player?
| SELECT "Venue" FROM table_40783 WHERE "Player" = 'don bradman (nsw)' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
Creatio... | SELECT Users.Id AS "user_link", COUNT(respostas.Id) AS Answers, CAST(AVG(CAST(respostas.Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_answer_score" FROM Posts AS respostas INNER JOIN Users ON Users.Id = OwnerUserId JOIN Posts AS pergutas ON respostas.ParentId = pergutas.Id AND pergutas.PostTypeId = 1 WHERE respostas.Pos... | sede |
CREATE TABLE Procedures (
Code INTEGER,
Name VARCHAR(30),
Cost REAL
)
CREATE TABLE Block (
BlockFloor INTEGER,
BlockCode INTEGER
)
CREATE TABLE Appointment (
AppointmentID INTEGER,
Patient INTEGER,
PrepNurse INTEGER,
Physician INTEGER,
Start DATETIME,
End DATETIME,
Exam... | SELECT T1.Name, COUNT(T1.Name) FROM Physician AS T1 JOIN Trained_In AS T2 ON T1.EmployeeID = T2.Physician JOIN Procedures AS T3 ON T3.Code = T2.Treatment WHERE T3.Cost > 5000 GROUP BY T1.Name | nvbench |
CREATE TABLE table_64970 (
"Governor" text,
"Took office" text,
"Left office" text,
"Party" text,
"Lieutenant Governor" text,
"Terms" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was Lieutenant Governor to the governor that left office on ... | SELECT "Lieutenant Governor" FROM table_64970 WHERE "Left office" = 'january 14, 1929' | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime ti... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'revise lg bowel anastom') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19059) AND ... | mimic_iii |
CREATE TABLE table_60592 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Name has a Winning constructor of ansaldo?
| SELECT "Name" FROM table_60592 WHERE "Winning constructor" = 'ansaldo' | wikisql |
CREATE TABLE table_1140116_5 (
date VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When does V Madgwick Cup take place?
| SELECT date FROM table_1140116_5 WHERE race_name = "V Madgwick Cup" | sql_create_context |
CREATE TABLE table_name_21 (
fin_pos VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the finishing position for the car that started in grid 6?
| SELECT fin_pos FROM table_name_21 WHERE grid = "6" | sql_create_context |
CREATE TABLE table_name_13 (
us_ac VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the US A.C. in 1974?
| SELECT us_ac FROM table_name_13 WHERE year = 1974 | sql_create_context |
CREATE TABLE table_56126 (
"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 attendance at Windy Hill?
| SELECT MAX("Crowd") FROM table_56126 WHERE "Venue" = 'windy hill' | wikisql |
CREATE TABLE table_21199 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who ha... | SELECT "High assists" FROM table_21199 WHERE "Team" = 'Miami' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGD... | css |
CREATE TABLE table_name_85 (
round INTEGER,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Round that has a Time of 6:04?
| SELECT SUM(round) FROM table_name_85 WHERE time = "6:04" | sql_create_context |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
... | SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '6959651' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-05-09' AND '2012-05-19' GROUP B... | css |
CREATE TABLE table_name_43 (
venue VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the game played on 2004-06-23?
| SELECT venue FROM table_name_43 WHERE date = "2004-06-23" | sql_create_context |
CREATE TABLE Order_Items (
item_id INTEGER,
order_item_status_code VARCHAR(15),
order_id INTEGER,
product_id INTEGER,
item_status_code VARCHAR(15),
item_delivered_datetime DATETIME,
item_order_quantity VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
product_category VARCHA... | SELECT premises_type, COUNT(premises_type) FROM Customer_Addresses AS T1 JOIN Premises AS T2 ON T1.premise_id = T2.premise_id GROUP BY premises_type ORDER BY premises_type | nvbench |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_... | 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, fare, fare_basis, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND fare_basis.economy = 'YES' AND fare.far... | atis |
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_dat... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_28199 (
"Name of Award" text,
"Name of Film" text,
"Language" text,
"Awardee(s)" text,
"Cash Prize" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won best actor?
| SELECT "Awardee(s)" FROM table_28199 WHERE "Name of Award" = 'Best Actor' | wikisql |
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 jyjgzbb (
BGDH text,
BGRQ tim... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info ON person_info.RYBH = person_info_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_MZJZ... | css |
CREATE TABLE table_name_7 (
pick INTEGER,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick number for School of lsu?
| SELECT SUM(pick) FROM table_name_7 WHERE school = "lsu" | sql_create_context |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence... | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'UA' | atis |
CREATE TABLE table_65287 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many bronzes have a Total of 9?
| SELECT SUM("Bronze") FROM table_65287 WHERE "Total" = '9' | wikisql |
CREATE TABLE table_54946 (
"Year" real,
"Artist" text,
"Composition" text,
"Mintage" real,
"Issue Price" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the Year is over 2008, what is the highest Mintage for the Royal Canadian Mint Engravers Art... | SELECT MAX("Mintage") FROM table_54946 WHERE "Artist" = 'royal canadian mint engravers' AND "Year" > '2008' | wikisql |
CREATE TABLE table_33721 (
"Coach" text,
"Years" text,
"Record" text,
"Conference Record" text,
"Overall Win Percentage" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was coach Dick Bennett's overall win percentage?
| SELECT "Overall Win Percentage" FROM table_33721 WHERE "Coach" = 'dick bennett' | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "UNKNOWN/NOT SPECIFIED" AND lab.label = "Hematocrit, Calculated" | mimicsql_data |
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 intakeoutput (
in... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY intakeoutput.celllabel) AS ... | eicu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.