instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_31459 (
"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.
-- How ma... | SELECT COUNT("Team") FROM table_31459 WHERE "High assists" = 'Inge – 6' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND prescriptions.drug = "Fentanyl Citrate" | mimicsql_data |
CREATE TABLE table_203_761 (
id number,
"pos" number,
"no" number,
"driver" text,
"team" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total laps did alex ... | SELECT "laps" FROM table_203_761 WHERE "driver" = 'alex figge' | squall |
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 demographic.discharge_location FROM demographic WHERE demographic.subject_id = "6983" | mimicsql_data |
CREATE TABLE zyb (
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... | SELECT qtb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '6110632' GROUP BY qtb.MED_ORG_DEPT_CD UNION SELECT gyb.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_... | css |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE table_19502 (
"Week" real,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Type the record details if any result has L 3-6 in it?
| SELECT "Record" FROM table_19502 WHERE "Result" = 'L 3-6' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
U... | SELECT ReviewTasks.PostId AS "post_link", COUNT(*) AS NumberOfReviews, Posts.CreationDate FROM ReviewTasks JOIN Posts ON ReviewTasks.PostId = Posts.Id WHERE ReviewTasks.ReviewTaskTypeId = 6 GROUP BY ReviewTasks.PostId, Posts.CreationDate ORDER BY NumberOfReviews DESC | sede |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
pro... | 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 = 'SAN FR... | atis |
CREATE TABLE table_79104 (
"Year" real,
"Theme" text,
"Face Value" text,
"Weight" text,
"Diameter" text,
"Mintage" real,
"Issue Price" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Year of the Coin with an Issue Price of $1089.9... | SELECT SUM("Year") FROM table_79104 WHERE "Issue Price" = '$1089.95' AND "Mintage" < '900' | 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
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "BASE" AND lab.label = "Creatine Kinase, MB Isoenzyme" | mimicsql_data |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_r... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents WHERE DATETIME(outputevents.charttime) >= DATETIME(CURRENT_TIME(), '-5 year') GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 5) | mimic_iii |
CREATE TABLE table_23649 (
"Rank" real,
"Name" text,
"Nationality" text,
"1st (m)" text,
"2nd (m)" text,
"Points" text,
"Overall NT points" text,
"Overall WC points (Rank)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the overall ... | SELECT "Overall NT points" FROM table_23649 WHERE "2nd (m)" = '127.5' | wikisql |
CREATE TABLE table_29703 (
"Model" text,
"PPI (pixels per inch )" real,
"ppcm (pixels per cm )" real,
"Resolution" text,
"Typical viewing distance (in/cm)" text,
"Pixels per degree (PPD)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many d... | SELECT COUNT("PPI (pixels per inch )") FROM table_29703 WHERE "ppcm (pixels per cm )" = '87' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-2181')) AND intakeoutput.cellpath LIKE '%output%'... | eicu |
CREATE TABLE table_51791 (
"Election" text,
"D\u00e1il" text,
"Share of votes" text,
"Seats" real,
"Total seats" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- with shares of 45.3% and total seats less than 166. what is the greatest number of seat?
| SELECT MAX("Seats") FROM table_51791 WHERE "Share of votes" = '45.3%' AND "Total seats" < '166' | wikisql |
CREATE TABLE table_2342078_5 (
title VARCHAR,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the title of the episode written by Harry Winkler?
| SELECT title FROM table_2342078_5 WHERE written_by = "Harry Winkler" | 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 wdmzjzjlb (
CYBQDM text,
CYBQ... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.admityear < "2164" | mimicsql_data |
CREATE TABLE county (
county_id number,
county_name text,
population number,
zip_code text
)
CREATE TABLE election (
election_id number,
counties_represented text,
district number,
delegate text,
party number,
first_elected number,
committee text
)
CREATE TABLE party (
... | SELECT MAX(population), MIN(population) FROM county | spider |
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '袁英武' AND t_kc22.STA_DATE BETWEEN '2003-07-04' AND '2010-02-19' AND t_kc22.SELF_PAY_PRO < 0.03 | css |
CREATE TABLE table_name_8 (
data_limit__gb VARCHAR,
company VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the data limit for vodafone?
| SELECT data_limit__gb FROM table_name_8 WHERE company = "vodafone" | 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.discharge_location = "SHORT TERM HOSPITAL" AND procedures.long_title = "Intravenous infusion of clofarabine" | mimicsql_data |
CREATE TABLE table_50146 (
"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 rebounds" FROM table_50146 WHERE "Team" = 'chicago' | wikisql |
CREATE TABLE table_name_40 (
method VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Method, when Time is '3:20'?
| SELECT method FROM table_name_40 WHERE time = "3:20" | sql_create_context |
CREATE TABLE table_52276 (
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the team that held the race title of Mallala?
| SELECT "Team" FROM table_52276 WHERE "Race Title" = 'mallala' | wikisql |
CREATE TABLE table_43791 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text,
"No. 10" text
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT "No. 5" FROM table_43791 WHERE "No. 8" = 'logan' AND "No. 10" = 'ethan' AND "No. 4" = 'jacob' | wikisql |
CREATE TABLE table_17288825_8 (
record VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the record for score of l 93 104 (ot)
| SELECT record FROM table_17288825_8 WHERE score = "L 93–104 (OT)" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '018-20179' AND patient.hospitaldischargetime IS NULL | eicu |
CREATE TABLE table_5968 (
"Round" real,
"Club" text,
"Home" text,
"Away" text,
"Aggregate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is NK Rijeka's away score in Round 2?
| SELECT "Away" FROM table_5968 WHERE "Round" < '2' AND "Club" = 'nk rijeka' | wikisql |
CREATE TABLE table_66449 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which platform was Red Dead Redemption for?
| SELECT "Platform(s)" FROM table_66449 WHERE "Game" = 'red dead redemption' | wikisql |
CREATE TABLE table_29572583_20 (
status VARCHAR,
seed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the status for seed 14
| SELECT status FROM table_29572583_20 WHERE seed = 14 | sql_create_context |
CREATE TABLE table_203_809 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the number of ranked teams... | SELECT COUNT(*) FROM table_203_809 WHERE NOT "rank#" IS NULL | squall |
CREATE TABLE table_4693 (
"Played" real,
"Lost" real,
"Drawn" real,
"Tries" real,
"Points" real,
"% Won" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of tries for the player who is larger than 16?
| SELECT SUM("Tries") FROM table_4693 WHERE "Played" > '16' | wikisql |
CREATE TABLE table_2847477_2 (
pinyin VARCHAR,
english_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pinyin name for the english name xin county?
| SELECT pinyin FROM table_2847477_2 WHERE english_name = "Xin County" | 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,
... | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '022-166510' AND patient.hospitaladmitsource = 'acute care/floor' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
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 wdmzjzjlb (
CYBQDM text,
CYBQ... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM... | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patie... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE STRFTIME('%y', patient.hospitaladmittime) = '2102' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx of bladder malignancy" AND prescriptions.drug_type = "BASE" | 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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjl... | css |
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area... | SELECT County, COUNT(County) FROM appellations GROUP BY County ORDER BY COUNT(County) | nvbench |
CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
)
CREATE TABLE Plays_Games (
StuID INTEGER,
GameID INTEGER,
Hours_Played INTEGER
)
CREATE TABLE Video_Games (
GameID INTEGER,
GName VARCHAR(40),
... | SELECT LName, COUNT(LName) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.OnScholarship = 'Y' GROUP BY LName ORDER BY LName | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | 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 = '016-6134')) AND intakeoutput.celllabel = 'entera... | eicu |
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
)
-- Using valid SQLite, answer the following questions for the... | SELECT Headquarter, COUNT(Headquarter) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY COUNT(Headquarter) DESC | nvbench |
CREATE TABLE table_40039 (
"Country" text,
"Local name" text,
"Host" text,
"Network" text,
"Date premiered" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Local name has a Network of nova tv?
| SELECT "Local name" FROM table_40039 WHERE "Network" = 'nova tv' | wikisql |
CREATE TABLE table_name_88 (
losses INTEGER,
wins VARCHAR,
last_appearance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Losses, when Wins is greater than 1, and when Last Appearance is 2003?
| SELECT MAX(losses) FROM table_name_88 WHERE wins > 1 AND last_appearance = "2003" | sql_create_context |
CREATE TABLE table_29540 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. No." real,
"Viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the production numb... | SELECT "Prod. No." FROM table_29540 WHERE "Title" = 'Random on Purpose' | 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.marital_status = "DIVORCED" AND lab.label = "Lactate Dehydrogenase (LD)" | 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... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '73140420' AND MED_SER_ORG_NO = '2020501' AND NOT OUT_DIAG_DIS_NM LIKE '%活动%' | css |
CREATE TABLE table_8881 (
"Title" text,
"Writer" text,
"Doctor" text,
"Format" text,
"Company" text,
"release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Release Date, when Title is Aladdin Time?
| SELECT "release date" FROM table_8881 WHERE "Title" = 'aladdin time' | wikisql |
CREATE TABLE table_name_97 (
time_retired VARCHAR,
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the time/retired for Laps larger than 63 and has a grid of 20
| SELECT time_retired FROM table_name_97 WHERE laps > 63 AND grid = 20 | sql_create_context |
CREATE TABLE table_13482 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score that has a To par of 3, for Branden Grace?
| SELECT "Score" FROM table_13482 WHERE "To par" = '−3' AND "Player" = 'branden grace' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-12480') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE finrev_fed_17 (
state_code number,
idcensus number,
school_district text,
nces_id text,
yr_data number,
t_fed_rev number,
c14 number,
c25 number
)
CREATE TABLE finrev_fed_key_17 (
state_code number,
state text,
#_records text
)
CREATE TABLE ndecoreexcel_math_gr... | SELECT T2.state, SUM(c14), SUM(c25) FROM finrev_fed_17 AS T1 JOIN finrev_fed_key_17 AS T2 ON T1.state_code = T2.state_code JOIN ndecoreexcel_math_grade8 AS T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY T3.average_scale_score DESC LIMIT 10 | studentmathscore |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT Id AS "post_link" FROM Posts WHERE PostTypeId = 2 AND LENGTH(Body) <= '##length##' AND Score <= '##Score##' ORDER BY Score | sede |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 29741 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND prescriptions.drug = 'tricor' | mimic_iii |
CREATE TABLE table_51832 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the notes of the 400 m event before 2004 with a position of 12th (h)?
| SELECT "Notes" FROM table_51832 WHERE "Event" = '400 m' AND "Year" < '2004' AND "Position" = '12th (h)' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodi... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-6441')) AND intakeoutput.cellpath LIKE '%intake%' AND DA... | eicu |
CREATE TABLE table_name_17 (
team__number1 VARCHAR,
res VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the team #1 for the match that had a result of 0-3?
| SELECT team__number1 FROM table_name_17 WHERE res = "0-3" | sql_create_context |
CREATE TABLE table_28833 (
"Rnd" real,
"Circuit" text,
"Lites 1 Race One Winning Team" text,
"Lites 2 Race One Winning Team" text,
"Lites 1 Race Two Winning Team" text,
"Lites 2 Race Two Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "Circuit" FROM table_28833 WHERE "Lites 1 Race One Winning Team" = '#66 Gunnar Racing' | wikisql |
CREATE TABLE table_65740 (
"Place" text,
"Code" real,
"Area (km 2 )" real,
"Population" real,
"Most spoken language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the place with an area of less than 2,198.72 and a code more than 90909?
| SELECT "Place" FROM table_65740 WHERE "Area (km 2 )" < '2,198.72' AND "Code" > '90909' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE table_name_72 (
driver VARCHAR,
time_retired VARCHAR,
laps VARCHAR,
grid VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/... | SELECT driver FROM table_name_72 WHERE grid < 17 AND points > 0 AND laps = 87 AND time_retired = "1:48:11.023" | sql_create_context |
CREATE TABLE table_name_73 (
closed INTEGER,
city VARCHAR,
capacity VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the sum of closed for city of pittsburgh and capacity larger than 59,000
| SELECT SUM(closed) FROM table_name_73 WHERE city = "pittsburgh" AND capacity > 59 OFFSET 000 | sql_create_context |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC te... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '蒋清淑' AND hz_info.YLJGDM = '6779932' AND NOT mzjzjlb.JZZDSM LIKE '%维生素%' | css |
CREATE TABLE table_204_847 (
id number,
"#" number,
"name" text,
"position" text,
"birthday" text,
"size" text,
"weight" text,
"last team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many players were born after 1985 ?
| SELECT COUNT("name") FROM table_204_847 WHERE "birthday" > 1985 | squall |
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 jybgb.BGRQ FROM jybgb WHERE jybgb.BGDH = '11288812225' | css |
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
per... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion) | nvbench |
CREATE TABLE table_name_43 (
date VARCHAR,
loss VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the loss of sparks (0 1)?
| SELECT date FROM table_name_43 WHERE loss = "sparks (0–1)" | sql_create_context |
CREATE TABLE table_4314 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Toronto" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What School/Club Team has a Player named Juan Dixon and a Position of guard?
| SELECT "School/Club Team" FROM table_4314 WHERE "Position" = 'guard' AND "Player" = 'juan dixon' | wikisql |
CREATE TABLE table_name_55 (
branding VARCHAR,
owner VARCHAR,
frequency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the branding when the owner is jim pattison group and the frequency is fm 94.5?
| SELECT branding FROM table_name_55 WHERE owner = "jim pattison group" AND frequency = "fm 94.5" | sql_create_context |
CREATE TABLE table_12665 (
"Year(s)" real,
"Final television commentator" text,
"Radio commentator" text,
"Spokesperson" text,
"Semi-final television commentator" text,
"Semi-final second television commentator" text
)
-- Using valid SQLite, answer the following questions for the tables provid... | SELECT "Spokesperson" FROM table_12665 WHERE "Year(s)" > '2012' | wikisql |
CREATE TABLE table_71203 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the final position of Arena Motorsports International?
| SELECT "Pos." FROM table_71203 WHERE "Team" = 'arena motorsports international' | wikisql |
CREATE TABLE zyb (
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... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '75906484' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 1703.04) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '75906484' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_k... | css |
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Stores (
Store_ID VARCHAR(100),
Addr... | SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name | nvbench |
CREATE TABLE table_12145 (
"Year" real,
"Title" text,
"Format/genre" text,
"Role" text,
"Staged by" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the role in an original play, comedy in 1938?
| SELECT "Role" FROM table_12145 WHERE "Format/genre" = 'original play, comedy' AND "Year" = '1938' | 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_labitems (
row_id number,
itemid number,
label te... | SELECT (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 = 27703 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartev... | mimic_iii |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal bool... | SELECT Posts.Id, Body, TagId, TagName FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE TagName IN ('javascript', 'jquery', 'java', 'c#') ORDER BY Posts.Id LIMIT 1000 | sede |
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 gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '63645719' AND gwyjzb.MED_SER_ORG_NO = '7473839' AND gwyjzb.OUT_DIAG_DOC_NM LIKE '柏%' UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '63645719' AND fgwyjzb.MED_SER_ORG_NO = '7... | css |
CREATE TABLE table_23286223_5 (
date VARCHAR,
high_assists VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the game in which Deron Williams (13) did the high assists played?
| SELECT date FROM table_23286223_5 WHERE high_assists = "Deron Williams (13)" | sql_create_context |
CREATE TABLE table_72034 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game against the Royals when the record was 24 52?
| SELECT "Score" FROM table_72034 WHERE "Opponent" = 'royals' AND "Record" = '24–52' | wikisql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT zyjybgb.JYXMDM, zyjybgb.JYXMMC FROM zyjybgb WHERE zyjybgb.BGDH = '92893885398' UNION SELECT mzjybgb.JYXMDM, mzjybgb.JYXMMC FROM mzjybgb WHERE mzjybgb.BGDH = '92893885398' | css |
CREATE TABLE table_name_79 (
rank INTEGER,
year VARCHAR,
accolade VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest rank after 2009 with an accolade of 125 best albums of the past 25 years?
| SELECT MIN(rank) FROM table_name_79 WHERE year > 2009 AND accolade = "125 best albums of the past 25 years" | sql_create_context |
CREATE TABLE table_37095 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fewest losses associated with more than 13 points and fewer than 8 games?
| SELECT MIN("Lost") FROM table_37095 WHERE "Points" > '13' AND "Games" < '8' | wikisql |
CREATE TABLE table_39969 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the opponent Ayr United, the result 1 0, and the attendance more than 668?
| SELECT "Date" FROM table_39969 WHERE "Result" = '1–0' AND "Attendance" > '668' AND "Opponent" = 'ayr united' | wikisql |
CREATE TABLE table_61146 (
"Golden Rivers" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Wins, when Losses is '6', and when Draws is greater than... | SELECT COUNT("Wins") FROM table_61146 WHERE "Losses" = '6' AND "Draws" > '0' | wikisql |
CREATE TABLE table_203_405 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times were the dallas cowboys listed as an opponent ?
| SELECT COUNT(*) FROM table_203_405 WHERE "opponent" = 'dallas cowboys' | squall |
CREATE TABLE table_52411 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT SUM("Played") FROM table_52411 WHERE "Club" = 'barcelona b' AND "Wins" < '11' | wikisql |
CREATE TABLE table_name_28 (
trans_1 VARCHAR,
total_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How long did the trans 1 take when 2:00:40.20 is the total time?
| SELECT trans_1 FROM table_name_28 WHERE total_time = "2:00:40.20" | sql_create_context |
CREATE TABLE table_44143 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"2012 club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2012 club of the cf pos. player?
| SELECT "2012 club" FROM table_44143 WHERE "Pos." = 'cf' | wikisql |
CREATE TABLE table_name_66 (
week INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Week, when Date is 'November 8, 1970'?
| SELECT MAX(week) FROM table_name_66 WHERE date = "november 8, 1970" | sql_create_context |
CREATE TABLE table_78017 (
"Rank" real,
"Player" text,
"Club" text,
"Country" text,
"Titles" real,
"Seasons" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player is ranked 2 and played in the seasons of 1982 83, 1983 84, 1984 85?
| SELECT "Player" FROM table_78017 WHERE "Rank" = '2' AND "Seasons" = '1982–83, 1983–84, 1984–85' | wikisql |
CREATE TABLE table_name_69 (
award VARCHAR,
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which award has the category of the best direction of a musical?
| SELECT award FROM table_name_69 WHERE category = "best direction of a musical" | sql_create_context |
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,... | SELECT DISTINCT flight.flight_id FROM airport, flight WHERE airport.airport_code = 'MKE' AND flight.from_airport = airport.airport_code | atis |
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
-- Using valid SQLite, answer the following que... | SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY COUNT(*) | 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_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '35376610' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 3078.5) | css |
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 demographic.admittime FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE nomination (
artwork_id number,
festival_id number,
result text
)
CREATE TABLE festival_detail (
festival_id number,
festival_name text,
chair_name text,
location text,
year number,
num_of_audience number
)
CREATE TABLE artwork (
artwork_id number,
type text,
... | SELECT name FROM artwork WHERE NOT artwork_id IN (SELECT artwork_id FROM nomination) | spider |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2123" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_name_6 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2012 value with a 1r in 2011 in the Australian Open?
| SELECT 2012 FROM table_name_6 WHERE 2011 = "1r" AND tournament = "australian open" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.