instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
How many StackOverflow users are there?. | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
Cr... | SELECT COUNT(*) FROM Users | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many StackOverflow users are there?. ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TA... |
What is the overall attendance in the places where the average attendance was 17148? | CREATE TABLE table_3837 (
"Season" text,
"Overall Record" text,
"SEC Record" text,
"Overall Attendance" real,
"Average Attendance" real,
"Rank Nationally" text
) | SELECT "Overall Attendance" FROM table_3837 WHERE "Average Attendance" = '17148' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the overall attendance in the places where the average attendance was 17148? ### Input: CREATE TABLE table_3837 (
... |
gams-math Trends (# Questions per Tag per Month. | CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTy... | SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: gams-math Trends (# Questions per Tag per Month. ### Input: CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
... |
calculate the difference between patient 20898's total output and the total input amount on 12/24/this year. | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | SELECT (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 = 20898)) AND DATETIME(inputevents_cv.charttime, 'start of year') = DATETIME(CURRENT... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the difference between patient 20898's total output and the total input amount on 12/24/this year. ### Input: CREA... |
Find employee with ID and name of the country presently where (s)he is working Visualize by bar chart, could you rank in ascending by the Y? | 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 jobs (
JOB_ID varchar(10),
JOB_TI... | SELECT COUNTRY_NAME, SUM(EMPLOYEE_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID JOIN locations AS T3 ON T2.LOCATION_ID = T3.LOCATION_ID JOIN countries AS T4 ON T3.COUNTRY_ID = T4.COUNTRY_ID GROUP BY COUNTRY_NAME ORDER BY SUM(EMPLOYEE_ID) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find employee with ID and name of the country presently where (s)he is working Visualize by bar chart, could you rank in asc... |
What is the number of patients born before 2120 who had urine lab tests? | 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.dob_year < "2120" AND lab.fluid = "Urine" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of patients born before 2120 who had urine lab tests? ### Input: CREATE TABLE demographic (
subject_i... |
Find the number of rooms with king bed for each decor type. | CREATE TABLE rooms (
roomid text,
roomname text,
beds number,
bedtype text,
maxoccupancy number,
baseprice number,
decor text
)
CREATE TABLE reservations (
code number,
room text,
checkin text,
checkout text,
rate number,
lastname text,
firstname text,
adults... | SELECT decor, COUNT(*) FROM rooms WHERE bedtype = "King" GROUP BY decor | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of rooms with king bed for each decor type. ### Input: CREATE TABLE rooms (
roomid text,
roomname te... |
Show the number of documents in different starting date Bin starting date by weekday and group by location code with a stacked bar chart, show by the y-axis in desc. | 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 Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
D... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Location_From) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of documents in different starting date Bin starting date by weekday and group by location code with a stack... |
how many patients whose procedure long title is open reduction of fracture with internal fixation, femur and lab test category is chemistry? | CREATE TABLE diagnoses (
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 procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Open reduction of fracture with internal fixation, femur" AND lab."CATEGORY" = "Chemistry" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose procedure long title is open reduction of fracture with internal fixation, femur and lab test catego... |
How many were in attendance for a result of D, at H venue, and Arsenal as an opponent? | CREATE TABLE table_name_40 (
attendance VARCHAR,
opponents VARCHAR,
result VARCHAR,
venue VARCHAR
) | SELECT attendance FROM table_name_40 WHERE result = "d" AND venue = "h" AND opponents = "arsenal" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many were in attendance for a result of D, at H venue, and Arsenal as an opponent? ### Input: CREATE TABLE table_name_40... |
tell me what are the top four most common output events until 3 years ago? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_icd_diagnoses (
row_id number... | 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(), '-3 year') GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me what are the top four most common output events until 3 years ago? ### Input: CREATE TABLE d_items (
row_id numb... |
provide me the number of patients with ptt lab test who were discharged to skilled nursing facility. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND lab.label = "PTT" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide me the number of patients with ptt lab test who were discharged to skilled nursing facility. ### Input: CREATE TABLE... |
What are the names and ages of editors? | CREATE TABLE journal (
journal_id number,
date text,
theme text,
sales number
)
CREATE TABLE journal_committee (
editor_id number,
journal_id number,
work_type text
)
CREATE TABLE editor (
editor_id number,
name text,
age number
) | SELECT name, age FROM editor | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the names and ages of editors? ### Input: CREATE TABLE journal (
journal_id number,
date text,
theme te... |
how many patients are primarily diagnosed for s/p hanging and died in or before 2126? | 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 WHERE demographic.diagnosis = "S/P HANGING" AND demographic.dod_year <= "2126.0" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients are primarily diagnosed for s/p hanging and died in or before 2126? ### Input: CREATE TABLE diagnoses (
... |
What is the 1993 value of the 1994 atp masters series? | CREATE TABLE table_46232 (
"Tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text
) | SELECT "1993" FROM table_46232 WHERE "1994" = 'atp masters series' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the 1993 value of the 1994 atp masters series? ### Input: CREATE TABLE table_46232 (
"Tournament" text,
"199... |
Name the condition with partial thromboplastin time of unaffected and prothrombin time of unaffected with platelet count of decreased | CREATE TABLE table_70997 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | SELECT "Condition" FROM table_70997 WHERE "Partial thromboplastin time" = 'unaffected' AND "Prothrombin time" = 'unaffected' AND "Platelet count" = 'decreased' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the condition with partial thromboplastin time of unaffected and prothrombin time of unaffected with platelet count of ... |
who is the opponent on 18 january 1993? | CREATE TABLE table_77184 (
"Outcome" text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Opponent" FROM table_77184 WHERE "Date" = '18 january 1993' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who is the opponent on 18 january 1993? ### Input: CREATE TABLE table_77184 (
"Outcome" text,
"Date" text,
"Cham... |
during the previous year, how many patients were prescribed with ciprofloxacin hcl within the same month after they underwent atrial cardioversion? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dis... | 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 = 'atrial card... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: during the previous year, how many patients were prescribed with ciprofloxacin hcl within the same month after they underwen... |
What is Canada's score? | CREATE TABLE table_80159 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Score" FROM table_80159 WHERE "Country" = 'canada' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Canada's score? ### Input: CREATE TABLE table_80159 (
"Place" text,
"Player" text,
"Country" text,
"... |
How many Points have Goals against of 35, and less than 13 losses? | CREATE TABLE table_name_45 (
points INTEGER,
goals_against VARCHAR,
losses VARCHAR
) | SELECT SUM(points) FROM table_name_45 WHERE goals_against = 35 AND losses < 13 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many Points have Goals against of 35, and less than 13 losses? ### Input: CREATE TABLE table_name_45 (
points INTEGE... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart, could you rank in ascending by the X-axis? | 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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(4... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
what are the three most frequently ordered procedures in patients with age 30s until 1 year ago? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id numb... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the three most frequently ordered procedures in patients with age 30s until 1 year ago? ### Input: CREATE TABLE mic... |
give me the number of patients admitted before 2112 who had joint fluid rbc lab test. | 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.admityear < "2112" AND lab.label = "RBC, Joint Fluid" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients admitted before 2112 who had joint fluid rbc lab test. ### Input: CREATE TABLE demographic (
... |
when did patient 86786 have the minimum value of creatinine last until 11/2105? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 86786) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'creatinine') AND STRFTIME('%y-%m', labevents.charttime) <= '2105-11' ORDER BY l... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 86786 have the minimum value of creatinine last until 11/2105? ### Input: CREATE TABLE procedures_icd (
... |
what did patient 72032's marital status in their current hospital encounter? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
row_id number,
... | SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 72032 AND admissions.dischtime IS NULL | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what did patient 72032's marital status in their current hospital encounter? ### Input: CREATE TABLE d_items (
row_id nu... |
what was the last time that patient 6440 had the maximum value of glucose since 12/2102? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6440) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') AND STRFTIME('%y-%m', labevents.charttime) >= '2102-12' ORDER BY labev... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the last time that patient 6440 had the maximum value of glucose since 12/2102? ### Input: CREATE TABLE cost (
... |
the previous year how many people were diagnosed with pure hypercholesterolem within the same month after the first diagnosis of streptococcus group b? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
ro... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'pure hypercholeste... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: the previous year how many people were diagnosed with pure hypercholesterolem within the same month after the first diagnosi... |
Return a bar chart about the distribution of ACC_Road and School_ID , and group by attribute All_Home, I want to list Y in ascending order. | 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 ACC_Road, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY School_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of ACC_Road and School_ID , and group by attribute All_Home, I want to list Y in a... |
Name the average year for much ado about nothing and recipient of ray virta | CREATE TABLE table_74522 (
"Year" real,
"Recipient" text,
"Role" text,
"Play" text,
"Production" text
) | SELECT AVG("Year") FROM table_74522 WHERE "Play" = 'much ado about nothing' AND "Recipient" = 'ray virta' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the average year for much ado about nothing and recipient of ray virta ### Input: CREATE TABLE table_74522 (
"Year"... |
provide me the number of patients taking medication via inhalation who have diagnoses icd9 code 1418. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | 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.icd9_code = "1418" AND prescriptions.route = "INHALATION" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide me the number of patients taking medication via inhalation who have diagnoses icd9 code 1418. ### Input: CREATE TABL... |
How many storms occured in each region. Visualize by bar chart. | CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_city_affected real
)
CREATE TABLE region (
Region_id int,
Region_code text,
Region_name text
)
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Nu... | SELECT Region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many storms occured in each region. Visualize by bar chart. ### Input: CREATE TABLE affected_region (
Region_id int,... |
How much is the crowd attending at colonial stadium where Hawthorn plays? | CREATE TABLE table_name_9 (
crowd VARCHAR,
ground VARCHAR,
home_team VARCHAR
) | SELECT crowd FROM table_name_9 WHERE ground = "colonial stadium" AND home_team = "hawthorn" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How much is the crowd attending at colonial stadium where Hawthorn plays? ### Input: CREATE TABLE table_name_9 (
crowd V... |
what is the total amount of total output of patient 027-154299 in the previous day? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
la... | 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 = '027-154299')) AND intakeoutput.cellpath LIKE '%o... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total amount of total output of patient 027-154299 in the previous day? ### Input: CREATE TABLE microlab (
m... |
provide the number of patients whose diagnoses is crn ath atlg vn bps grft and lab test category is hematology. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Crn ath atlg vn bps grft" AND lab."CATEGORY" = "Hematology" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses is crn ath atlg vn bps grft and lab test category is hematology. ### Input: C... |
how many patients whose ethnicity is hispanic or latino and age is less than 20? | 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 WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND demographic.age < "20" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose ethnicity is hispanic or latino and age is less than 20? ### Input: CREATE TABLE demographic (
s... |
Singapore Top User with Python tag. | CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
... | SELECT ROW_NUMBER() OVER (ORDER BY u.Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE LOWER(u.Location) LIKE '%singapore%' OR UPPER(u.Location) LIKE '%SG' A... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Singapore Top User with Python tag. ### Input: CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description ... |
how many nations received silver medals ? | CREATE TABLE table_203_739 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT COUNT("nation") FROM table_203_739 WHERE "silver" <> 0 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many nations received silver medals ? ### Input: CREATE TABLE table_203_739 (
id number,
"rank" number,
"nat... |
how many patients are divorced and are of black/haitian ethinicity? | 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 WHERE demographic.marital_status = "DIVORCED" AND demographic.ethnicity = "BLACK/HAITIAN" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients are divorced and are of black/haitian ethinicity? ### Input: CREATE TABLE prescriptions (
subject_id t... |
how many patients whose ethnicity is black/african american and diagnoses long title is phlebitis and thrombophlebitis of superficial veins of upper extremities? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND diagnoses.long_title = "Phlebitis and thrombophlebitis of superficial veins of upper extremities" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose ethnicity is black/african american and diagnoses long title is phlebitis and thrombophlebitis of su... |
What is the name of the department with the fewest members? | CREATE TABLE enrolled_in (
stuid number,
cid text,
grade text
)
CREATE TABLE course (
cid text,
cname text,
credits number,
instructor number,
days text,
hours text,
dno number
)
CREATE TABLE gradeconversion (
lettergrade text,
gradepoint number
)
CREATE TABLE faculty ... | SELECT T1.dname FROM department AS T1 JOIN member_of AS T2 ON T1.dno = T2.dno GROUP BY T2.dno ORDER BY COUNT(*) LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the department with the fewest members? ### Input: CREATE TABLE enrolled_in (
stuid number,
cid ... |
give me the number of patients whose discharge location is home health care and admission year is less than 2111? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.admityear < "2111" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose discharge location is home health care and admission year is less than 2111? ### Input:... |
what were the four most common laboratory tests that patients had within the same month after having been diagnosed with diarrhea - non-infectious until 1 year ago? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'diarrhea - non-infectious' AND DATETIME(diagnosis.di... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the four most common laboratory tests that patients had within the same month after having been diagnosed with dia... |
Specify the average age of hispanic, latino, or puerto rican patients who remained admitted in hospital for 15 days. | 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 AVG(demographic.age) FROM demographic WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.days_stay = "15" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Specify the average age of hispanic, latino, or puerto rican patients who remained admitted in hospital for 15 days. ### Inp... |
What To par has a Place of t2, and a Country of united states? | CREATE TABLE table_61672 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "To par" FROM table_61672 WHERE "Place" = 't2' AND "Country" = 'united states' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What To par has a Place of t2, and a Country of united states? ### Input: CREATE TABLE table_61672 (
"Place" text,
"... |
on their last hospital encounter what is patient 96728's age? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | SELECT admissions.age FROM admissions WHERE admissions.subject_id = 96728 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: on their last hospital encounter what is patient 96728's age? ### Input: CREATE TABLE diagnoses_icd (
row_id number,
... |
what was the name of the procedure performed to patient 004-86136, two or more times in 08/this year? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the procedure performed to patient 004-86136, two or more times in 08/this year? ### Input: CREATE TABL... |
What are the family relations of the king with the throne name 303? | CREATE TABLE table_name_20 (
family_relations VARCHAR,
throne_name VARCHAR
) | SELECT family_relations FROM table_name_20 WHERE throne_name = "303" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the family relations of the king with the throne name 303? ### Input: CREATE TABLE table_name_20 (
family_relat... |
Provide the number of patients who were admitted before the year 2146 and had procedure short title as cardiopulm resuscita nos. | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2146" AND procedures.short_title = "Cardiopulm resuscita NOS" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Provide the number of patients who were admitted before the year 2146 and had procedure short title as cardiopulm resuscita ... |
Can you tell me the Place that has the Score of 70-67-69-69=275? | CREATE TABLE table_name_81 (
place VARCHAR,
score VARCHAR
) | SELECT place FROM table_name_81 WHERE score = 70 - 67 - 69 - 69 = 275 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the Place that has the Score of 70-67-69-69=275? ### Input: CREATE TABLE table_name_81 (
place VARCHAR,
... |
User's displayname (at the time of data dump). | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId n... | SELECT DisplayName FROM Users WHERE Id = '##UserId##' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: User's displayname (at the time of data dump). ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
CRE... |
Which player from the 2004 CFL draft attended Wilfrid Laurier? | CREATE TABLE table_72144 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Player" FROM table_72144 WHERE "College" = 'Wilfrid Laurier' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which player from the 2004 CFL draft attended Wilfrid Laurier? ### Input: CREATE TABLE table_72144 (
"Pick #" real,
... |
Who directed the episode that was watched by 6.62 million U.S. viewers? | CREATE TABLE table_24832 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT "Directed by" FROM table_24832 WHERE "U.S. viewers (millions)" = '6.62' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who directed the episode that was watched by 6.62 million U.S. viewers? ### Input: CREATE TABLE table_24832 (
"Series #"... |
what are all flights from BOSTON to PITTSBURGH on WEDNESDAY | CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airport (
... | 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND days.day_name = 'WEDNESDAY' AND flight.flight_days = days.days_code... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are all flights from BOSTON to PITTSBURGH on WEDNESDAY ### Input: CREATE TABLE time_zone (
time_zone_code text,
... |
Which competition with a result of 3-1? | CREATE TABLE table_name_68 (
competition VARCHAR,
result VARCHAR
) | SELECT competition FROM table_name_68 WHERE result = "3-1" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which competition with a result of 3-1? ### Input: CREATE TABLE table_name_68 (
competition VARCHAR,
result VARCHAR
... |
What is the population of the settlement with the cyrillic name of ? | CREATE TABLE table_27883 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | SELECT MAX("Population (2011)") FROM table_27883 WHERE "Cyrillic Name Other Names" = 'Добрица' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the population of the settlement with the cyrillic name of ? ### Input: CREATE TABLE table_27883 (
"Settlement" ... |
how much is patient 010-17316's weight for the first time since 21 months ago? | 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 treatment (
treat... | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-17316') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-21 month') ORDER BY patient.unita... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much is patient 010-17316's weight for the first time since 21 months ago? ### Input: CREATE TABLE vitalperiodic (
v... |
which patients have prescription for fluconazole medication? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Fluconazole" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which patients have prescription for fluconazole medication? ### Input: CREATE TABLE prescriptions (
subject_id text,
... |
What is the highest 1995 with a 1990 less than 36, a 1987 less than 1987, and a 2007 value greater than 107? | CREATE TABLE table_40321 (
"Party" text,
"1985" real,
"1987" real,
"1990" real,
"1995" real,
"1999" real,
"2003" real,
"2007" real,
"2011" real
) | SELECT MAX("1995") FROM table_40321 WHERE "1990" > '36' AND "1987" < '1987' AND "2007" > '107' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest 1995 with a 1990 less than 36, a 1987 less than 1987, and a 2007 value greater than 107? ### Input: CREA... |
name all the counties with an area larger than kilifi . | CREATE TABLE table_204_778 (
id number,
"code" number,
"county" text,
"former province" text,
"area (km2)" number,
"population\ncensus 2009" number,
"capital" text
) | SELECT "county" FROM table_204_778 WHERE "area (km2)" > (SELECT "area (km2)" FROM table_204_778 WHERE "county" = 'kilifi') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: name all the counties with an area larger than kilifi . ### Input: CREATE TABLE table_204_778 (
id number,
"code" nu... |
What home has 136-134 as the score? | CREATE TABLE table_name_6 (
home VARCHAR,
score VARCHAR
) | SELECT home FROM table_name_6 WHERE score = "136-134" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What home has 136-134 as the score? ### Input: CREATE TABLE table_name_6 (
home VARCHAR,
score VARCHAR
) ### Respons... |
What is the largest year with an Entrant of ron harris / team lotus? | CREATE TABLE table_70235 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | SELECT MAX("Year") FROM table_70235 WHERE "Entrant" = 'ron harris / team lotus' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the largest year with an Entrant of ron harris / team lotus? ### Input: CREATE TABLE table_70235 (
"Year" real,
... |
Is 419 a class that undergrads can take ? | CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 419 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is 419 a class that undergrads can take ? ### Input: CREATE TABLE student (
student_id int,
lastname varchar,
fi... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the amount of hire_date bin hire_date by weekday in a bar chart, and sort in ascending by the total number please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COUNT(HIRE_DATE) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri... |
I want to know the opponent that ha a week of 3 | CREATE TABLE table_52631 (
"Week" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Time" text,
"Attendance" text
) | SELECT "Opponent" FROM table_52631 WHERE "Week" = '3' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: I want to know the opponent that ha a week of 3 ### Input: CREATE TABLE table_52631 (
"Week" text,
"Opponent" text,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of email and employee_id . | 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),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | SELECT EMAIL, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart ab... |
what was the name of the output which patient 70267 had first had on the current intensive care unit visit? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom te... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid 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 = 70267) AND icustays.outtime IS NULL) ORDER... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the output which patient 70267 had first had on the current intensive care unit visit? ### Input: CREAT... |
Scatter plot to show department id on x axis and sum salary on y axis. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT DEPARTMENT_ID, SUM(SALARY) FROM employees GROUP BY DEPARTMENT_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Scatter plot to show department id on x axis and sum salary on y axis. ### Input: CREATE TABLE employees (
EMPLOYEE_ID d... |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of hire_date and the sum of employee_id bin hire_date by weekday, list y axis in desc order please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLO... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(EMPLOYEE_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart ab... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of salary over the job_id , and group by attribute job_id, and list y axis in asc order please. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(SALARY) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
For the Enernoc Australia Pty Ltd, what's the country with an unknown date? | CREATE TABLE table_name_15 (
country VARCHAR,
date VARCHAR,
company VARCHAR
) | SELECT country FROM table_name_15 WHERE date = "unknown" AND company = "enernoc australia pty ltd" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the Enernoc Australia Pty Ltd, what's the country with an unknown date? ### Input: CREATE TABLE table_name_15 (
coun... |
what is the country for rank 6? | CREATE TABLE table_66136 (
"Rank" real,
"Athlete" text,
"Country" text,
"Time" text,
"Notes" text
) | SELECT "Country" FROM table_66136 WHERE "Rank" = '6' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the country for rank 6? ### Input: CREATE TABLE table_66136 (
"Rank" real,
"Athlete" text,
"Country" tex... |
For the tournament played on 26 February 2006, what surface was used? | CREATE TABLE table_35943 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | SELECT "Surface" FROM table_35943 WHERE "Date" = '26 february 2006' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the tournament played on 26 February 2006, what surface was used? ### Input: CREATE TABLE table_35943 (
"Outcome" te... |
How many series had viewers totaling 23.93 million? | CREATE TABLE table_18217753_1 (
series__number VARCHAR,
us_viewers__millions_ VARCHAR
) | SELECT COUNT(series__number) FROM table_18217753_1 WHERE us_viewers__millions_ = "23.93" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many series had viewers totaling 23.93 million? ### Input: CREATE TABLE table_18217753_1 (
series__number VARCHAR,
... |
What number in the series was episode 7 in the season? | CREATE TABLE table_24961421_1 (
series__number VARCHAR,
season__number VARCHAR
) | SELECT series__number FROM table_24961421_1 WHERE season__number = 7 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What number in the series was episode 7 in the season? ### Input: CREATE TABLE table_24961421_1 (
series__number VARCHAR... |
Give me a bar chart for total number of capacity of each openning year, and show by the Y-axis in ascending. | CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE schedule... | SELECT Openning_year, SUM(Capacity) FROM cinema GROUP BY Openning_year ORDER BY SUM(Capacity) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a bar chart for total number of capacity of each openning year, and show by the Y-axis in ascending. ### Input: CREA... |
Who was the opponent on September 13, 1992? | CREATE TABLE table_55185 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff [a ]" text,
"Game site" text,
"Attendance" text,
"Record" text
) | SELECT "Opponent" FROM table_55185 WHERE "Date" = 'september 13, 1992' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the opponent on September 13, 1992? ### Input: CREATE TABLE table_55185 (
"Week" text,
"Date" text,
"Opp... |
show me the latest flight from SAN FRANCISCO to DENVER | CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airline (
airline_code varc... | 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the latest flight from SAN FRANCISCO to DENVER ### Input: CREATE TABLE days (
days_code varchar,
day_name va... |
What's the title of the episode first seen by 18.15 million people in the US? | CREATE TABLE table_22078972_2 (
title VARCHAR,
us_viewers__millions_ VARCHAR
) | SELECT title FROM table_22078972_2 WHERE us_viewers__millions_ = "18.15" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the title of the episode first seen by 18.15 million people in the US? ### Input: CREATE TABLE table_22078972_2 (
... |
what are the allergies of patient 005-48105 in this month? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-48105')) AND DATETIME(allergy.allergytime, 'start of month') = DATETI... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the allergies of patient 005-48105 in this month? ### Input: CREATE TABLE treatment (
treatmentid number,
p... |
Name the landesliga sud for sg quelle f rth | CREATE TABLE table_20181270_3 (
landesliga_süd VARCHAR,
bayernliga VARCHAR
) | SELECT landesliga_süd FROM table_20181270_3 WHERE bayernliga = "SG Quelle Fürth" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the landesliga sud for sg quelle f rth ### Input: CREATE TABLE table_20181270_3 (
landesliga_süd VARCHAR,
bayer... |
What is the name of the site with a CERCLIS ID of prd980512362? | CREATE TABLE table_51326 (
"CERCLIS ID" text,
"Name" text,
"Municipality" text,
"Proposed" text,
"Listed" text,
"Construction completed" text,
"Partially deleted" text,
"Deleted" text
) | SELECT "Name" FROM table_51326 WHERE "CERCLIS ID" = 'prd980512362' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the site with a CERCLIS ID of prd980512362? ### Input: CREATE TABLE table_51326 (
"CERCLIS ID" text,... |
What prefix has Bromo as the group? | CREATE TABLE table_name_78 (
prefix VARCHAR,
group VARCHAR
) | SELECT prefix FROM table_name_78 WHERE group = "bromo" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What prefix has Bromo as the group? ### Input: CREATE TABLE table_name_78 (
prefix VARCHAR,
group VARCHAR
) ### Resp... |
What is Prize, when Runner-Up is 'Simon Ehne', and when Winner is 'David Tighe'? | CREATE TABLE table_9736 (
"Season" text,
"Winner" text,
"Prize" text,
"Runner-Up" text,
"3rd place" text
) | SELECT "Prize" FROM table_9736 WHERE "Runner-Up" = 'simon ehne' AND "Winner" = 'david tighe' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Prize, when Runner-Up is 'Simon Ehne', and when Winner is 'David Tighe'? ### Input: CREATE TABLE table_9736 (
"S... |
how many of the patients treated with drug code docu100l have an unspecified death status? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "0" AND prescriptions.formulary_drug_cd = "DOCU100L" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the patients treated with drug code docu100l have an unspecified death status? ### Input: CREATE TABLE demograph... |
Name the gt winning car for #88 team mitsubishi 88 mitsubishi starion | CREATE TABLE table_30135 (
"Rnd" real,
"Circuit" text,
"GT Winning Car" text,
"SS Winning Car" text,
"A Winning Car" text,
"B Winning Car" text,
"Report" text
) | SELECT "GT Winning Car" FROM table_30135 WHERE "A Winning Car" = '#88 Team Mitsubishi 88 Mitsubishi Starion' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the gt winning car for #88 team mitsubishi 88 mitsubishi starion ### Input: CREATE TABLE table_30135 (
"Rnd" real,
... |
On January 15, what was the most in attendance? | CREATE TABLE table_78266 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | SELECT MAX("Attendance") FROM table_78266 WHERE "Date" = 'january 15' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On January 15, what was the most in attendance? ### Input: CREATE TABLE table_78266 (
"Date" text,
"Visitor" text,
... |
Give me the comparison about Team_ID over the All_Home , and group by attribute ACC_Home by a bar chart, and list from low to high by the All_Home please. | 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, Team_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY All_Home | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the comparison about Team_ID over the All_Home , and group by attribute ACC_Home by a bar chart, and list from low t... |
what is patient 009-1746's monthly maximum level of mcv until 17 months ago? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospita... | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-1746')) AND lab.labname = 'mcv' AND DATETIME(lab.labresulttime) <= DATETIME(CU... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is patient 009-1746's monthly maximum level of mcv until 17 months ago? ### Input: CREATE TABLE microlab (
microlab... |
Show the number of students who are living in a dorm with a TV Lounge and group by first name in a bar chart, and rank in ascending by the Y-axis. | CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Lives_in (
stuid INTEGER,
do... | SELECT Fname, COUNT(Fname) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM Has_amenity AS T3 JOIN Dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge') GROUP BY Fname ORDER BY COUNT(Fname) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of students who are living in a dorm with a TV Lounge and group by first name in a bar chart, and rank in as... |
What is the density per km in Smoky Lake County? | CREATE TABLE table_73712 (
"Name" text,
"Municipal district" text,
"Population (2011)" real,
"Population (2006)" real,
"Change (%)" text,
"Land area (km\u00b2)" text,
"Population density (per km 2 )" text
) | SELECT "Population density (per km 2 )" FROM table_73712 WHERE "Municipal district" = 'Smoky Lake County' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the density per km in Smoky Lake County? ### Input: CREATE TABLE table_73712 (
"Name" text,
"Municipal distr... |
What race did the team Mi-Jack Conquest racing win with a pole position of andreas wirth? | CREATE TABLE table_45445 (
"Round" real,
"Race Name" text,
"Pole position" text,
"Winning driver" text,
"Winning Team" text
) | SELECT "Race Name" FROM table_45445 WHERE "Winning Team" = 'mi-jack conquest racing' AND "Pole position" = 'andreas wirth' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What race did the team Mi-Jack Conquest racing win with a pole position of andreas wirth? ### Input: CREATE TABLE table_4544... |
provide the number of patients whose drug name is 0.9% sodium chloride (mini bag plus). | 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 demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "0.9% Sodium Chloride (Mini Bag Plus)" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose drug name is 0.9% sodium chloride (mini bag plus). ### Input: CREATE TABLE diagnoses (
... |
What is the height in ft for number 42 for the rockets in 1993-94? | CREATE TABLE table_11734041_16 (
height_in_ft VARCHAR,
no_s_ VARCHAR,
years_for_rockets VARCHAR
) | SELECT height_in_ft FROM table_11734041_16 WHERE no_s_ = "42" AND years_for_rockets = "1993-94" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the height in ft for number 42 for the rockets in 1993-94? ### Input: CREATE TABLE table_11734041_16 (
height_in... |
which opponent is listed first in the table ? | CREATE TABLE table_204_151 (
id number,
"game" number,
"day" text,
"date" text,
"kickoff" text,
"opponent" text,
"results\nscore" text,
"results\nrecord" text,
"location" text,
"attendance" number
) | SELECT "opponent" FROM table_204_151 WHERE id = 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which opponent is listed first in the table ? ### Input: CREATE TABLE table_204_151 (
id number,
"game" number,
... |
how many patients have received insulin - continuous infusion after the first analgesics - oral analgesics during the same hospital encounter? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'analgesics - oral analgesics') AS t1 JOIN (SELECT patient.uniquepid, trea... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients have received insulin - continuous infusion after the first analgesics - oral analgesics during the same h... |
what is the five of the most common output events since 2101? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... | 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 STRFTIME('%y', outputevents.charttime) >= '2101' GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 5) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the five of the most common output events since 2101? ### Input: CREATE TABLE patients (
row_id number,
subj... |
Dump Project Management Stack Exchange (PMSE) Posts. | 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 * FROM Posts WHERE OwnerUserId = '##UserId##' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Dump Project Management Stack Exchange (PMSE) Posts. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
... |
What is the year 2001 with a total larger than 1, and 2009 with 8? | CREATE TABLE table_68544 (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"Total" real
) | SELECT "2001" FROM table_68544 WHERE "Total" > '1' AND "2009" = '8' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the year 2001 with a total larger than 1, and 2009 with 8? ### Input: CREATE TABLE table_68544 (
"2001" text,
... |
What medal did Michael Conlon, with a weight of fly, win? | CREATE TABLE table_name_48 (
medal VARCHAR,
weight VARCHAR,
boxer VARCHAR
) | SELECT medal FROM table_name_48 WHERE weight = "fly" AND boxer = "michael conlon" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What medal did Michael Conlon, with a weight of fly, win? ### Input: CREATE TABLE table_name_48 (
medal VARCHAR,
wei... |
What is the score for the away team Chelsea? | CREATE TABLE table_46067 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Score" FROM table_46067 WHERE "Away team" = 'chelsea' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the score for the away team Chelsea? ### Input: CREATE TABLE table_46067 (
"Tie no" text,
"Home team" text,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.