instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
P... | SELECT CAST(DATEADD(DAY, 1 - DATEPART(WEEKDAY, p.CreationDate), p.CreationDate) AS DATE) AS "week", TagName, COUNT(*) AS qcount FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE TagName IN (SELECT * FROM STRING_SPLIT('##tags:string##', ',')) GROUP BY CAST(DATEAD... | sede |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "CD3 Cells, Percent" | mimicsql_data |
CREATE TABLE table_78434 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the driver with a grid less than 14, laps smaller than 53 and a Time/Retired of... | SELECT "Driver" FROM table_78434 WHERE "Grid" < '14' AND "Laps" < '53' AND "Time/Retired" = 'collision' AND "Constructor" = 'ferrari' | wikisql |
CREATE TABLE table_name_89 (
rank INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank for Omni nashville hotel?
| SELECT SUM(rank) FROM table_name_89 WHERE name = "omni nashville hotel" | sql_create_context |
CREATE TABLE table_30908 (
"Round" real,
"Date" text,
"Opponent" text,
"Home/Away" text,
"Score (Collingwoods score is in bold)" text,
"Result (includes margin)" text,
"Venue" text,
"Position on Ladder" text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT MIN("Round") FROM table_30908 WHERE "Result (includes margin)" = 'Lost by 36 points' | wikisql |
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 JZKSDM, JZKSMC FROM zyjzjlb WHERE JZLSH = '27490832854' | css |
CREATE TABLE resultsdata15 (
sample_pk number,
commod text,
commtype text,
lab text,
pestcode text,
testclass text,
concen number,
lod number,
conunit text,
confmethod text,
confmethod2 text,
annotate text,
quantitate text,
mean text,
extract text,
determi... | SELECT conunit FROM resultsdata15 WHERE commod = "PO" | pesticide |
CREATE TABLE table_name_63 (
record VARCHAR,
high_rebounds VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record when the high rebound was Deandre Jordan (11)?
| SELECT record FROM table_name_63 WHERE high_rebounds = "deandre jordan (11)" | 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 lab.patientunitstayid FROM lab WHERE lab.labname = 'ionized calcium' AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) | eicu |
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name of the pro... | SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY COUNT(T2.Name) DESC | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2195" AND lab.itemid = "50836" | mimicsql_data |
CREATE TABLE table_14132 (
"Season" real,
"Games" real,
"W-L-T" text,
"Attendance" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Average that has a W-L-T of 5-1, and a Season smaller than 2001, and Games smaller than 6?
| SELECT AVG("Average") FROM table_14132 WHERE "W-L-T" = '5-1' AND "Season" < '2001' AND "Games" < '6' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_care... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73713 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'metoprolol succinate xl' ORDER BY prescriptio... | mimic_iii |
CREATE TABLE table_24741 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Language(s)" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the year for the film 'Vitus'?
| SELECT "Year (Ceremony)" FROM table_24741 WHERE "Original title" = 'Vitus' | wikisql |
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Description VARCHAR(255)
)... | SELECT Role_Code, COUNT(*) FROM Employees GROUP BY Role_Code ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_36 (
co_driver VARCHAR,
position VARCHAR,
laps VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the co-driver for the 6th position and more than 159 laps?
| SELECT co_driver FROM table_name_36 WHERE position = "6th" AND laps > 159 | sql_create_context |
CREATE TABLE table_36558 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average week for the game against baltimore colts with less than 41,062 in attendance?
| SELECT AVG("Week") FROM table_36558 WHERE "Opponent" = 'baltimore colts' AND "Attendance" < '41,062' | wikisql |
CREATE TABLE table_name_71 (
gold VARCHAR,
bronze VARCHAR,
total VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Gold, when Total is less than 4, when Silver is 1, and when Bronze is 1?
| SELECT gold FROM table_name_71 WHERE total < 4 AND silver = "1" AND bronze = "1" | sql_create_context |
CREATE TABLE customers (
customer_name VARCHAR,
payment_method VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the names of customers using the most popular payment method?
| SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1) | sql_create_context |
CREATE TABLE table_name_81 (
season VARCHAR,
opponent VARCHAR,
wicket VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What season did they play queensland at wicket 4?
| SELECT season FROM table_name_81 WHERE opponent = "queensland" AND wicket = "4" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicare" AND lab.label = "WBC" | mimicsql_data |
CREATE TABLE table_15864 (
"Player" text,
"No." real,
"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 number is the player that played 1998-2001
| SELECT MIN("No.") FROM table_15864 WHERE "Years in Toronto" = '1998-2001' | wikisql |
CREATE TABLE table_24224647_2 (
year_premiered INTEGER,
network VARCHAR,
main_presenter VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest year premiered for the TV2 network when main present is yvind mund?
| SELECT MAX(year_premiered) FROM table_24224647_2 WHERE network = "TV2" AND main_presenter = "Øyvind Mund" | sql_create_context |
CREATE TABLE table_25959 (
"Round" real,
"Location" text,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Winning Driver" text,
"Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the winning team when max busnelli is th... | SELECT "Winning Team" FROM table_25959 WHERE "Winning Driver" = 'Max Busnelli' | wikisql |
CREATE TABLE table_18531 (
"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.
-- How many results for minimum first elected incumbent Noble Jones Gregory... | SELECT MIN("First elected") FROM table_18531 WHERE "Incumbent" = 'Noble Jones Gregory' | wikisql |
CREATE TABLE table_79425 (
"Date" text,
"Internet Explorer" text,
"Firefox" text,
"Safari" text,
"Opera" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of browsers were using Opera in October 2010?
| SELECT "Opera" FROM table_79425 WHERE "Date" = 'october 2010' | wikisql |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Price) | nvbench |
CREATE TABLE table_204_473 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who scored the most poin... | SELECT "driver" FROM table_204_473 ORDER BY "points" DESC LIMIT 1 | squall |
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.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '奚心思' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE grants (
grant_id number,
organisation_id number,
grant_amount number,
grant_start_date time,
grant_end_date time,
other_details text
)
CREATE TABLE project_staff (
staff_id number,
project_id number,
role_code text,
date_from time,
date_to time,
other_detai... | SELECT T2.organisation_id, T2.organisation_details FROM grants AS T1 JOIN organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000 | spider |
CREATE TABLE table_1205598_1 (
media_market_ranking VARCHAR,
nhl_team_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the media market ranking for the Blackhawks?
| SELECT COUNT(media_market_ranking) FROM table_1205598_1 WHERE nhl_team_s_ = "Blackhawks" | sql_create_context |
CREATE TABLE gyb (
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.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '周锐志' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6373.39) UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '周锐志' AND gyb.MED_CLINIC_ID IN (SELECT t_kc24.MED... | css |
CREATE TABLE table_203_749 (
id number,
"call sign" text,
"frequency" text,
"city of license" text,
"licensee" text,
"format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many radio stations are under the licensee simmons broadcasting ?
| SELECT COUNT(*) FROM table_203_749 WHERE "licensee" = 'simmons broadcasting' | squall |
CREATE TABLE table_name_32 (
attendance VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Record of 16 29 is how many attendance?
| SELECT attendance FROM table_name_32 WHERE record = "16–29" | sql_create_context |
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.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '朱高翰' AND t_kc21.MED_SER_ORG_NO = '2154200' AND t_kc21.IN_HOSP_DATE BETWEEN '2020-01-25' AND '2021-09-15') | css |
CREATE TABLE table_39588 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who ha... | SELECT "High rebounds" FROM table_39588 WHERE "Date" = 'june 11' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id num... | SELECT CreationDate, ROW_NUMBER() OVER (ORDER BY CreationDate) AS No FROM Posts WHERE Tags LIKE '%astrophysics%' ORDER BY CreationDate DESC | sede |
CREATE TABLE table_52874 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Date with a Set 1 with 15 1?
| SELECT "Date" FROM table_52874 WHERE "Set 1" = '15–1' | 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 * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'bupivicaine' AND d_... | mimic_iii |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "3" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_21536557_2 (
day VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which days have a stage of ss11?
| SELECT day FROM table_21536557_2 WHERE stage = "SS11" | sql_create_context |
CREATE TABLE table_37216 (
"Name" text,
"Birth" text,
"Marriage" text,
"Became Duchess" text,
"Ceased to be Duchess" text,
"Death" text,
"Spouse" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the person born on 6 january 1655 die?
| SELECT "Death" FROM table_37216 WHERE "Birth" = '6 january 1655' | 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 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 '2002-04-20' AND '2003-08-28' AND t_kc21.MED_SER_ORG_NO = '4933509' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE department_stores (
dept_store_id number,
dept_store_chain_id number,
store_name text,
store_address text,
store_phone text,
store_email text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number
)
CREATE TABLE product_suppliers (
pr... | SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2 | spider |
CREATE TABLE table_42534 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has a Result of l 26 16?
| SELECT "Attendance" FROM table_42534 WHERE "Result" = 'l 26–16' | wikisql |
CREATE TABLE table_204_93 (
id number,
"round" number,
"pick" number,
"player" text,
"position" text,
"nationality" text,
"team" text,
"college" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which teams at most have 4 players ?
| SELECT "team" FROM table_204_93 GROUP BY "team" HAVING COUNT("player") <= 4 | squall |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (... | SELECT patient.age FROM patient WHERE patient.uniquepid = '025-44842' AND patient.hospitaldischargetime IS NULL | eicu |
CREATE TABLE table_37018 (
"Player" text,
"League" real,
"Malaysia Cup" real,
"FA Cup" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which FA Cup is the highest one that has a Malaysia Cup of 0, and a Player of ahmad fouzee masuri, an... | SELECT MAX("FA Cup") FROM table_37018 WHERE "Malaysia Cup" = '0' AND "Player" = 'ahmad fouzee masuri' AND "Total" > '0' | wikisql |
CREATE TABLE table_name_67 (
away VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the away team of the UEFA champions league?
| SELECT away FROM table_name_67 WHERE competition = "uefa champions league" | sql_create_context |
CREATE TABLE table_name_47 (
year INTEGER,
wins INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year is the lowest one that has Wins smaller than 0?
| SELECT MIN(year) FROM table_name_47 WHERE wins < 0 | sql_create_context |
CREATE TABLE table_41038 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player from Arizona State?
| SELECT "Player" FROM table_41038 WHERE "College" = 'arizona state' | 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 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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51254" | mimicsql_data |
CREATE TABLE table_name_96 (
result VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result at Dreisamstadion, Freiburg?
| SELECT result FROM table_name_96 WHERE venue = "dreisamstadion, freiburg" | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '华云韶' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC | css |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'packed cell... | mimic_iii |
CREATE TABLE table_17720 (
"Year" real,
"Total Region" real,
"Rockhampton" real,
"Livingstone" real,
"Fitzroy" real,
"Mt Morgan" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the minimum rockhampton
| SELECT MIN("Rockhampton") FROM table_17720 | wikisql |
CREATE TABLE qualifying (
qualifyId INTEGER,
raceId INTEGER,
driverId INTEGER,
constructorId INTEGER,
number INTEGER,
position INTEGER,
q1 TEXT,
q2 TEXT,
q3 TEXT
)
CREATE TABLE constructorResults (
constructorResultsId INTEGER,
raceId INTEGER,
constructorId INTEGER,
... | SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY COUNT(name) DESC | nvbench |
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE domain_journal (
... | SELECT publication.title FROM journal, publication WHERE journal.name = 'PVLDB' AND publication.jid = journal.jid AND publication.year > 2000 | academic |
CREATE TABLE table_21167 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In the district Wisconsin 2nd, what was the reason for change?
| SELECT "Reason for change" FROM table_21167 WHERE "District" = 'Wisconsin 2nd' | wikisql |
CREATE TABLE table_name_80 (
finals VARCHAR,
total VARCHAR,
conference_finals VARCHAR,
semifinals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Finals that has the Conference Finals smaller than 12, and the Semifinals of 0, and t... | SELECT finals FROM table_name_80 WHERE conference_finals < 12 AND semifinals = 0 AND total = 3 | sql_create_context |
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "79" AND prescriptions.route = "ID" | mimicsql_data |
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_offi... | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY Party_name DESC | nvbench |
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 = "Noninf gastroenterit NEC" AND prescriptions.route = "TP" | 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 vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-23004')) AND NOT vitalperiodic.systemicdiastoli... | eicu |
CREATE TABLE table_3590 (
"Team" text,
"Manager" text,
"Chairman" text,
"Team captain" text,
"Kit maker" text,
"Sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the captain of Cardiff City?
| SELECT "Team captain" FROM table_3590 WHERE "Team" = 'Cardiff City' | wikisql |
CREATE TABLE table_14603212_5 (
school_year VARCHAR,
class_aAAA VARCHAR,
Gregory VARCHAR,
Portland VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all the school years where class AAAA is in Gregory-Portland?
| SELECT school_year FROM table_14603212_5 WHERE class_aAAA = Gregory - Portland | sql_create_context |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Tags (
Id number,
TagName text,
C... | SELECT STR(NTILE(100) OVER (ORDER BY SUM(answers.Score) DESC), 3) + '%' AS "top", ROW_NUMBER() OVER (ORDER BY SUM(answers.Score) DESC) AS "ranking", Users.Id AS "user_link", SUM(answers.Score) AS "total_score" FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId AND Tags.TagName = '##TagName##' JOIN Posts AS questions O... | sede |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT wdmzjzjlb.JZZDBM, wdmzjzjlb.JZZDSM FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '70688038255' UNION SELECT bdmzjzjlb.JZZDBM, bdmzjzjlb.JZZDSM FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '70688038255' | css |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE DEPARTMENT_ID = (SELECT DEPARTMENT_ID FROM employees WHERE FIRST_NAME = "Clara") | nvbench |
CREATE TABLE table_name_98 (
rank VARCHAR,
time VARCHAR,
rider VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many ranks have 1:01.14.62 as the time, with michael russell as the rider?
| SELECT COUNT(rank) FROM table_name_98 WHERE time = "1:01.14.62" AND rider = "michael russell" | 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 COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'antibacterials - linezolid (zyvox)' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-3 ... | eicu |
CREATE TABLE table_name_9 (
callsign VARCHAR,
on_air_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the callsign whtat uses 7bu?
| SELECT callsign FROM table_name_9 WHERE on_air_id = "7bu" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversa... | WITH VoteRep AS (SELECT 1 AS VoteTypeId, 2 AS PostTypeId, 15 AS Rep UNION SELECT 2 AS VoteTypeId, 1 AS PostTypeId, 5 AS Rep UNION SELECT 2 AS VoteTypeId, 2 AS PostTypeId, 10 AS Rep UNION SELECT 3 AS VoteTypeId, 1 AS PostTypeId, -2 AS Rep UNION SELECT 3 AS VoteTypeId, 2 AS PostTypeId, -2 AS Rep), Raw AS (SELECT VoteRep.... | sede |
CREATE TABLE table_21882 (
"Season" text,
"Date" text,
"Driver" text,
"Team" text,
"Chassis" text,
"Engine" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT "Average Speed (mph)" FROM table_21882 WHERE "Driver" = 'Tony Kanaan' | wikisql |
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ... | SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY AVG(T1.stars) DESC | nvbench |
CREATE TABLE table_1745843_10 (
part_3 VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is part 1 of the verb in class 4
| SELECT part_3 FROM table_1745843_10 WHERE class = "4" | sql_create_context |
CREATE TABLE table_name_50 (
team VARCHAR,
crew_chief VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Walter Giles is Crew Chief of what team?
| SELECT team FROM table_name_50 WHERE crew_chief = "walter giles" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 67468) AND microbiologyevents.spec_type_desc = 'csf;spinal fluid' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.charttime) >= DATETIME(CU... | mimic_iii |
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_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '45775351' | css |
CREATE TABLE table_201_44 (
id number,
"year" number,
"title" text,
"role" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many of the films listed were a television movie ?
| SELECT COUNT(*) FROM table_201_44 WHERE "notes" = 'television movie' | squall |
CREATE TABLE table_11084 (
"Episode Air Date" text,
"Audition City" text,
"Date" text,
"First Audition Venue" text,
"Callback Date" text,
"Callback Venue" text,
"Golden Tickets" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the cal... | SELECT "Callback Date" FROM table_11084 WHERE "Date" = 'july 29, 2008' | 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 demographic.age, demographic.admission_location FROM demographic WHERE demographic.subject_id = "2560" | 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'adv eff sedat/hypnot nec') AND STRFTIME('%y', diagnoses_ic... | mimic_iii |
CREATE TABLE table_25797 (
"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_25797 WHERE "Record" = '5-2' | wikisql |
CREATE TABLE table_12784134_1 (
verbal_noun VARCHAR,
participle VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the verbal noun connected to the participle e-duki?
| SELECT verbal_noun FROM table_12784134_1 WHERE participle = "e-duki" | sql_create_context |
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 SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '19033476084' AND NOT SOC_SRT_DIRE_NM LIKE '%奈德%' | css |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '7794776' AND IN_HOSP_DATE BETWEEN '2000-04-14' AND '2016-12-22' AND IN_DIAG_DIS_CD <> OUT_DIAG_DIS_CD | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.age < "30" | mimicsql_data |
CREATE TABLE table_26996293_3 (
player VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player drafted was an OG?
| SELECT player FROM table_26996293_3 WHERE position = "OG" | sql_create_context |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALA... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(SALARY) | nvbench |
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 demographic.religion FROM demographic WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
CREATE TABLE table_51329 (
"CERCLIS ID" text,
"Name" text,
"Municipality" text,
"Proposed" text,
"Listed" text,
"Construction completed" text,
"Partially deleted" text,
"Deleted" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is th... | SELECT "Partially deleted" FROM table_51329 WHERE "Name" = 'fibers public supply wells' | wikisql |
CREATE TABLE table_203_182 (
id number,
"no. in\nseries" number,
"no. in\nseason" number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text,
"production\ncode" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT COUNT("title") FROM table_203_182 | squall |
CREATE TABLE table_77535 (
"Pick" real,
"Round" text,
"Player" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school did bo jackson attend?
| SELECT "School" FROM table_77535 WHERE "Player" = 'bo jackson' | wikisql |
CREATE TABLE table_21690339_1 (
_percentage_cut VARCHAR,
gas_storage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What wast the percent cut for the nation with an 80% full gas storage?
| SELECT _percentage_cut FROM table_21690339_1 WHERE gas_storage = "80% full" | sql_create_context |
CREATE TABLE table_name_33 (
set_1 VARCHAR,
date VARCHAR,
set_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Set 1 when the date is 08 jul, and a Set 2 of 25 21?
| SELECT set_1 FROM table_name_33 WHERE date = "08 jul" AND set_2 = "25–21" | sql_create_context |
CREATE TABLE table_58125 (
"Title" text,
"Pages" text,
"First edition" text,
"Second edition" text,
"ISBN" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which first edition has 264 pages and the ISBN of 978-0785111832?
| SELECT "First edition" FROM table_58125 WHERE "Pages" = '264' AND "ISBN" = '978-0785111832' | 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 COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'gastric tube irrigat ... | mimic_iii |
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
... | SELECT DISTINCT flight.departure_time FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 27 AND date_day.month_number =... | atis |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.