instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
What was the region for the 38xa-5 catalog? | CREATE TABLE table_name_6 (
region VARCHAR,
catalog VARCHAR
) | SELECT region FROM table_name_6 WHERE catalog = "38xa-5" | sql_create_context | 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 region for the 38xa-5 catalog? ### Input: CREATE TABLE table_name_6 (
region VARCHAR,
catalog VARCHAR
)... |
what is average age of patients whose primary disease is gangrene and admission year is greater than or equal to 2164? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "GANGRENE" AND demographic.admityear >= "2164" | mimicsql_data | 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 average age of patients whose primary disease is gangrene and admission year is greater than or equal to 2164? ### I... |
count the number of patients whose drug name is fluconazole? | 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 prescriptions.drug = "Fluconazole" | mimicsql_data | 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: count the number of patients whose drug name is fluconazole? ### Input: CREATE TABLE demographic (
subject_id text,
... |
What is the date of the post-week 2 game with a result of l 16 10? | CREATE TABLE table_59375 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Date" FROM table_59375 WHERE "Week" > '2' AND "Result" = 'l 16–10' | wikisql | 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 date of the post-week 2 game with a result of l 16 10? ### Input: CREATE TABLE table_59375 (
"Week" real,
... |
List the distinct payment method codes with the number of orders mad in a bar chart, and show by the X in ascending. | CREATE TABLE Drama_Workshop_Groups (
Workshop_Group_ID INTEGER,
Address_ID INTEGER,
Currency_Code CHAR(15),
Marketing_Region_Code CHAR(15),
Store_Name VARCHAR(255),
Store_Phone VARCHAR(255),
Store_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Payment_Methods ... | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY payment_method_code | nvbench | 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: List the distinct payment method codes with the number of orders mad in a bar chart, and show by the X in ascending. ### Inp... |
an intravenous steroid administered for septic shock, except for those patients who were tested and are responders to a corticotropin stimulation test, or patients who do not receive a steroid due to the clinical judgment of the treating physician, based on an alternate assessment ( e.g. normal baseline cortisol ) . | CREATE TABLE table_train_65 (
"id" int,
"intention_to_arterial_catheter" bool,
"steroid_therapy" bool,
"intention_to_central_venous_catheter" bool,
"central_venous_pressure_cvp" int,
"receiving_vasopressor" bool,
"pulmonary_artery_occlusive_pressure_paop" int,
"septic_shock" bool,
"a... | SELECT * FROM table_train_65 WHERE steroid_therapy = 1 AND septic_shock = 1 | criteria2sql | 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: an intravenous steroid administered for septic shock, except for those patients who were tested and are responders to a cort... |
what is first weight of patient 12410 in 08/2101. | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12410)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt'... | mimic_iii | 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 first weight of patient 12410 in 08/2101. ### Input: CREATE TABLE d_items (
row_id number,
itemid number,
... |
azteca 7 and azteca 13 are both owned by whom ? | CREATE TABLE table_204_779 (
id number,
"network name" text,
"flagship" text,
"programming type" text,
"owner" text,
"affiliates" number
) | SELECT "owner" FROM table_204_779 WHERE "network name" = 'azteca 7' | squall | 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: azteca 7 and azteca 13 are both owned by whom ? ### Input: CREATE TABLE table_204_779 (
id number,
"network name" te... |
What are the distinct visit dates, and count them by a line chart, and I want to order x axis in desc order. | CREATE TABLE Ref_Attraction_Types (
Attraction_Type_Code CHAR(15),
Attraction_Type_Description VARCHAR(255)
)
CREATE TABLE Photos (
Photo_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(255),
Description VARCHAR(255),
Filename VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE T... | SELECT Visit_Date, COUNT(Visit_Date) FROM Visits ORDER BY Visit_Date DESC | nvbench | 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 distinct visit dates, and count them by a line chart, and I want to order x axis in desc order. ### Input: CREA... |
when were patient 010-1155 first prescribed for warfarin sodium 5 mg po tabs and potassium chloride at the same time in this month? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'warfarin sodium 5 mg po tabs' AND patient.uniquepid = '010-1155' AND DATETIME(medication.drugstarttime, 'start of month')... | eicu | 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 were patient 010-1155 first prescribed for warfarin sodium 5 mg po tabs and potassium chloride at the same time in this... |
what is the one year survival rate of a person with hypomagnesemia - due to etoh abuse? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu | 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 one year survival rate of a person with hypomagnesemia - due to etoh abuse? ### Input: CREATE TABLE cost (
c... |
how many days have passed since patient 027-203413 had a nutrition total intake for the last time on the current intensive care unit visit? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodi... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =... | eicu | 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 days have passed since patient 027-203413 had a nutrition total intake for the last time on the current intensive c... |
when was last time patient 028-22327 was diagnosed since 4 years ago with cardiomyopathy? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-22327')) AND diagnosis.diagnosisname = 'cardiomyopathy' AND D... | eicu | 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 was last time patient 028-22327 was diagnosed since 4 years ago with cardiomyopathy? ### Input: CREATE TABLE diagnosis ... |
Semantic Parsing papers by Li Dong | CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE field (
fieldid int... | SELECT DISTINCT author.authorid, paper.paperid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'Li Dong' AND keyphrase.keyphrasename = 'Semantic Parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authori... | scholar | 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: Semantic Parsing papers by Li Dong ### Input: CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
... |
What frame size has pcm 4 ch/16 bit/48khz as audio coding and dvcam as the format name and 4:1:1 as the color sampling? | CREATE TABLE table_name_44 (
frame_size VARCHAR,
color_sampling VARCHAR,
audio_coding VARCHAR,
format_name VARCHAR
) | SELECT frame_size FROM table_name_44 WHERE audio_coding = "pcm 4 ch/16 bit/48khz" AND format_name = "dvcam" AND color_sampling = "4:1:1" | sql_create_context | 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 frame size has pcm 4 ch/16 bit/48khz as audio coding and dvcam as the format name and 4:1:1 as the color sampling? ### ... |
What is listed as the highest Year that's also got a Bronze of Wataru Haraguchi? | CREATE TABLE table_name_1 (
year INTEGER,
bronze VARCHAR
) | SELECT MAX(year) FROM table_name_1 WHERE bronze = "wataru haraguchi" | sql_create_context | 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 listed as the highest Year that's also got a Bronze of Wataru Haraguchi? ### Input: CREATE TABLE table_name_1 (
... |
as of october 25 , 2005 , how many active voters are there ? | CREATE TABLE table_200_35 (
id number,
"party" text,
"active voters" number,
"inactive voters" number,
"total voters" number,
"percentage" text
) | SELECT SUM("active voters") FROM table_200_35 | squall | 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: as of october 25 , 2005 , how many active voters are there ? ### Input: CREATE TABLE table_200_35 (
id number,
"part... |
Who won the Men's Double the same year as Florentina Petre winning the Women's Singles? | CREATE TABLE table_80134 (
"Year" text,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | SELECT "Men's doubles" FROM table_80134 WHERE "Women's singles" = 'florentina petre' | wikisql | 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 won the Men's Double the same year as Florentina Petre winning the Women's Singles? ### Input: CREATE TABLE table_80134 ... |
What is the point average for the game that has FGM-FGA of 11-28 and a number smaller than 7? | CREATE TABLE table_name_48 (
points INTEGER,
fgm___fga VARCHAR,
number VARCHAR
) | SELECT AVG(points) FROM table_name_48 WHERE fgm___fga = "11-28" AND number < 7 | sql_create_context | 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 point average for the game that has FGM-FGA of 11-28 and a number smaller than 7? ### Input: CREATE TABLE table_... |
What was the Attendance in Week 10? | CREATE TABLE table_name_59 (
attendance VARCHAR,
week VARCHAR
) | SELECT attendance FROM table_name_59 WHERE week = 10 | sql_create_context | 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 Attendance in Week 10? ### Input: CREATE TABLE table_name_59 (
attendance VARCHAR,
week VARCHAR
) ### R... |
What position is the player from 1987? | CREATE TABLE table_32666 (
"Player" text,
"Nationality" text,
"Position" text,
"From" real,
"School/Country" text
) | SELECT "Position" FROM table_32666 WHERE "From" = '1987' | wikisql | 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 position is the player from 1987? ### Input: CREATE TABLE table_32666 (
"Player" text,
"Nationality" text,
... |
What is the highest average that has 6 dances and a total of over 128? | CREATE TABLE table_name_15 (
average INTEGER,
number_of_dances VARCHAR,
total VARCHAR
) | SELECT MAX(average) FROM table_name_15 WHERE number_of_dances = 6 AND total > 128 | sql_create_context | 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 average that has 6 dances and a total of over 128? ### Input: CREATE TABLE table_name_15 (
average I... |
What label is associated with the United Kingdom and the chem036 catalog? | CREATE TABLE table_74756 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Label" FROM table_74756 WHERE "Region" = 'united kingdom' AND "Catalog" = 'chem036' | wikisql | 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 label is associated with the United Kingdom and the chem036 catalog? ### Input: CREATE TABLE table_74756 (
"Region"... |
What studio has the director Philip Frank Messina? | CREATE TABLE table_63482 (
"Year" real,
"Title" text,
"Director" text,
"Studio(s)" text,
"Notes" text
) | SELECT "Studio(s)" FROM table_63482 WHERE "Director" = 'philip frank messina' | wikisql | 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 studio has the director Philip Frank Messina? ### Input: CREATE TABLE table_63482 (
"Year" real,
"Title" text,
... |
Name the year for avg start being 22.4 | CREATE TABLE table_2308381_1 (
year VARCHAR,
avg_start VARCHAR
) | SELECT year FROM table_2308381_1 WHERE avg_start = "22.4" | sql_create_context | 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 year for avg start being 22.4 ### Input: CREATE TABLE table_2308381_1 (
year VARCHAR,
avg_start VARCHAR
) #... |
What were the location and attendance for the game against New Jersey? | CREATE TABLE table_name_33 (
location_attendance VARCHAR,
team VARCHAR
) | SELECT location_attendance FROM table_name_33 WHERE team = "new jersey" | sql_create_context | 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 location and attendance for the game against New Jersey? ### Input: CREATE TABLE table_name_33 (
location_... |
Are there integrated secondary schools in Basel-Stadt? | CREATE TABLE table_22255 (
"Canton" text,
"Years of Kindergarten" real,
"Years of Kindergarten provided" text,
"Years of Kindergarten legally required" text,
"Length of Primary School" real,
"Length of mandatory Secondary School" real,
"Separate Secondary Schools?" text,
"Cooperative Sec... | SELECT "Integrated Secondary Schools?" FROM table_22255 WHERE "Canton" = 'Basel-Stadt' | wikisql | 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: Are there integrated secondary schools in Basel-Stadt? ### Input: CREATE TABLE table_22255 (
"Canton" text,
"Years o... |
Show the different headquarters and number of companies at each headquarter, and list X-axis in descending order. | CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TAB... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY Headquarters DESC | nvbench | 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 different headquarters and number of companies at each headquarter, and list X-axis in descending order. ### Input:... |
Which battle of the planets where ova (harmony gold dub) is solaris? | CREATE TABLE table_21753 (
"Gatchaman" text,
"Battle of the Planets" text,
"G-Force" text,
"Eagle Riders" text,
"OVA (Harmony Gold Dub)" text
) | SELECT "Battle of the Planets" FROM table_21753 WHERE "OVA (Harmony Gold Dub)" = 'Solaris' | wikisql | 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 battle of the planets where ova (harmony gold dub) is solaris? ### Input: CREATE TABLE table_21753 (
"Gatchaman" t... |
What is the date for the 10b serial? | CREATE TABLE table_name_46 (
date VARCHAR,
serial VARCHAR
) | SELECT date FROM table_name_46 WHERE serial = "10b" | sql_create_context | 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 date for the 10b serial? ### Input: CREATE TABLE table_name_46 (
date VARCHAR,
serial VARCHAR
) ### Resp... |
find the primary disease and procedure name for rafael stewart. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT demographic.diagnosis, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Rafael Stewart" | mimicsql_data | 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 primary disease and procedure name for rafael stewart. ### Input: CREATE TABLE prescriptions (
subject_id text,... |
What was the away team's score in the match at Victoria Park? | CREATE TABLE table_32300 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_32300 WHERE "Venue" = 'victoria park' | wikisql | 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 away team's score in the match at Victoria Park? ### Input: CREATE TABLE table_32300 (
"Home team" text,
... |
Give the number of departments with greater than average budget in each building with a bar chart. | CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dep... | SELECT building, COUNT(building) FROM department WHERE budget > (SELECT AVG(budget) FROM department) GROUP BY building | nvbench | 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 the number of departments with greater than average budget in each building with a bar chart. ### Input: CREATE TABLE t... |
What date had a tie no of replay, and an away team of watford? | CREATE TABLE table_name_57 (
date VARCHAR,
tie_no VARCHAR,
away_team VARCHAR
) | SELECT date FROM table_name_57 WHERE tie_no = "replay" AND away_team = "watford" | sql_create_context | 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 date had a tie no of replay, and an away team of watford? ### Input: CREATE TABLE table_name_57 (
date VARCHAR,
... |
how many patients born before year 2087 had the lab test fluid pleural? | 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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2087" AND lab.fluid = "Pleural" | mimicsql_data | 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 born before year 2087 had the lab test fluid pleural? ### Input: CREATE TABLE diagnoses (
subject_id t... |
What is the Korean dialect with a jeolla RR Romaja? | CREATE TABLE table_name_18 (
korean_dialect VARCHAR,
rr_romaja VARCHAR
) | SELECT korean_dialect FROM table_name_18 WHERE rr_romaja = "jeolla" | sql_create_context | 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 Korean dialect with a jeolla RR Romaja? ### Input: CREATE TABLE table_name_18 (
korean_dialect VARCHAR,
... |
Are any morning classes available for ENGR 151 ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'ENGR' AND course.number = 151 AND semester.semester = 'WN' AND semester.semester_id = course_off... | advising | 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: Are any morning classes available for ENGR 151 ? ### Input: CREATE TABLE gsi (
course_offering_id int,
student_id in... |
Who had the fastest lap in the Dutch TT Grand Prix? | CREATE TABLE table_73001 (
"Round" real,
"Date" text,
"Grand Prix" text,
"Circuit" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text
) | SELECT "Fastest Lap" FROM table_73001 WHERE "Grand Prix" = 'Dutch TT' | wikisql | 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 had the fastest lap in the Dutch TT Grand Prix? ### Input: CREATE TABLE table_73001 (
"Round" real,
"Date" text,... |
What Circuit has a Date of 25 july? | CREATE TABLE table_79039 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
) | SELECT "Circuit" FROM table_79039 WHERE "Date" = '25 july' | wikisql | 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 Circuit has a Date of 25 july? ### Input: CREATE TABLE table_79039 (
"Name" text,
"Circuit" text,
"Date" te... |
What year was the team named the Raiders established? | CREATE TABLE table_20526 (
"Institution" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Team Nickname" text,
"Primary conference" text
) | SELECT MAX("Founded") FROM table_20526 WHERE "Team Nickname" = 'Raiders' | wikisql | 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 year was the team named the Raiders established? ### Input: CREATE TABLE table_20526 (
"Institution" text,
"Loc... |
Which Station has a Zone 2008 of 8, and a Zone 2007 of outside zones, and Services of london overground? | CREATE TABLE table_75343 (
"Station" text,
"Services" text,
"Local authority" text,
"Zone 2007" text,
"Zone 2008" text,
"Zone 2010" text,
"Zone 2013" text
) | SELECT "Station" FROM table_75343 WHERE "Zone 2008" = '8' AND "Zone 2007" = 'outside zones' AND "Services" = 'london overground' | wikisql | 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 Station has a Zone 2008 of 8, and a Zone 2007 of outside zones, and Services of london overground? ### Input: CREATE T... |
Find the number of rooms with price higher than 120 for different decor. Show bar chart. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor | nvbench | 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 price higher than 120 for different decor. Show bar chart. ### Input: CREATE TABLE Reservation... |
What is the average year for Team Oreca? | CREATE TABLE table_40097 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
) | SELECT AVG("Year") FROM table_40097 WHERE "Team" = 'team oreca' | wikisql | 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 average year for Team Oreca? ### Input: CREATE TABLE table_40097 (
"Year" real,
"Team" text,
"Co-Dri... |
how many championships are listed ? | CREATE TABLE table_204_287 (
id number,
"outcome" text,
"no." number,
"date" number,
"championship" text,
"surface" text,
"opponent in the final" text,
"score in the final" text
) | SELECT COUNT("championship") FROM table_204_287 | squall | 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 championships are listed ? ### Input: CREATE TABLE table_204_287 (
id number,
"outcome" text,
"no." num... |
What is the Eurozone result for Population M (LUZ) of 3.08? | CREATE TABLE table_33785 (
"Rank" real,
"City" text,
"State" text,
"GDP in $ID B" text,
"Population M (LUZ)" real,
"GDP per capita $ID K" text,
"Eurozone" text
) | SELECT "Eurozone" FROM table_33785 WHERE "Population M (LUZ)" = '3.08' | wikisql | 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 Eurozone result for Population M (LUZ) of 3.08? ### Input: CREATE TABLE table_33785 (
"Rank" real,
"City... |
Recent comments on posts by a deleted user. | CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
... | SELECT p.Id AS "post_link", c.Text AS Comment, c.CreationDate FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id WHERE p.OwnerDisplayName = '##Name:string##' ORDER BY c.CreationDate DESC | sede | 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: Recent comments on posts by a deleted user. ### Input: CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number... |
how many patients are admitted before the year 2187 and diagnosed with cardia tamponade? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2187" AND diagnoses.long_title = "Cardiac tamponade" | mimicsql_data | 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 admitted before the year 2187 and diagnosed with cardia tamponade? ### Input: CREATE TABLE lab (
s... |
The top 100 worst 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 Id AS "post_link", Score, Body FROM Posts ORDER BY Score LIMIT 100 | sede | 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 top 100 worst posts.. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
D... |
What is the Opponents on a clay surface with christophe rochus as partner? | CREATE TABLE table_42722 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Opponents" FROM table_42722 WHERE "Surface" = 'clay' AND "Partner" = 'christophe rochus' | wikisql | 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 Opponents on a clay surface with christophe rochus as partner? ### Input: CREATE TABLE table_42722 (
"Outcom... |
give me the number of widowed patients who have ivpca route of drug administration. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "WIDOWED" AND prescriptions.route = "IVPCA" | mimicsql_data | 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 widowed patients who have ivpca route of drug administration. ### Input: CREATE TABLE procedures (
... |
List the writers of the books in ascending alphabetical order, and count them by a bar chart | CREATE TABLE book (
Book_ID int,
Title text,
Issues real,
Writer text
)
CREATE TABLE publication (
Publication_ID int,
Book_ID int,
Publisher text,
Publication_Date text,
Price real
) | SELECT Writer, COUNT(Writer) FROM book GROUP BY Writer ORDER BY Writer | nvbench | 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: List the writers of the books in ascending alphabetical order, and count them by a bar chart ### Input: CREATE TABLE book (
... |
What was the lead margin when Nixon had 48% and reporting was done by Rasmussen Reports? | CREATE TABLE table_51069 (
"Poll Source" text,
"Dates administered" text,
"Democrat: Jay Nixon" text,
"Republican: Kenny Hulshof" text,
"Lead Margin" real
) | SELECT COUNT("Lead Margin") FROM table_51069 WHERE "Democrat: Jay Nixon" = '48%' AND "Poll Source" = 'rasmussen reports' | wikisql | 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 lead margin when Nixon had 48% and reporting was done by Rasmussen Reports? ### Input: CREATE TABLE table_51069... |
What is the lowest poles that have 0 as a win, 0 as the top 5, with 66th as the postion? | CREATE TABLE table_name_61 (
poles INTEGER,
position VARCHAR,
wins VARCHAR,
top_5 VARCHAR
) | SELECT MIN(poles) FROM table_name_61 WHERE wins = 0 AND top_5 = 0 AND position = "66th" | sql_create_context | 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 lowest poles that have 0 as a win, 0 as the top 5, with 66th as the postion? ### Input: CREATE TABLE table_name_... |
If the passengers are 15,505,566, what is the iata code? | CREATE TABLE table_22096 (
"Rank" real,
"Airport Name" text,
"Location" text,
"IATA Code" text,
"Passengers" text,
"% Chg. 2009/10" text
) | SELECT "IATA Code" FROM table_22096 WHERE "Passengers" = '15,505,566' | wikisql | 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: If the passengers are 15,505,566, what is the iata code? ### Input: CREATE TABLE table_22096 (
"Rank" real,
"Airport... |
how many patients were prescribed the drug norepinephrine during the same month after being diagnosed with gi bleeding, since 4 years ago? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'gi bleeding' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t1 JOIN (SELEC... | eicu | 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 were prescribed the drug norepinephrine during the same month after being diagnosed with gi bleeding, sinc... |
How many episodes are numbered 12x03? | CREATE TABLE table_23292220_13 (
first_broadcast VARCHAR,
episode VARCHAR
) | SELECT COUNT(first_broadcast) FROM table_23292220_13 WHERE episode = "12x03" | sql_create_context | 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 episodes are numbered 12x03? ### Input: CREATE TABLE table_23292220_13 (
first_broadcast VARCHAR,
episode V... |
On which date was a game played at Junction Oval? | CREATE TABLE table_78271 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_78271 WHERE "Venue" = 'junction oval' | wikisql | 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 which date was a game played at Junction Oval? ### Input: CREATE TABLE table_78271 (
"Home team" text,
"Home team... |
tell the score when the times gone was 75 | CREATE TABLE table_19121 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Points against" FROM table_19121 WHERE "Tries against" = '75' | wikisql | 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 the score when the times gone was 75 ### Input: CREATE TABLE table_19121 (
"Club" text,
"Played" text,
"Won... |
what's the currency name with highest monthly inflation rate being 29,500% | CREATE TABLE table_13681_2 (
currency_name VARCHAR,
highest_monthly_inflation_rate VARCHAR
) | SELECT currency_name FROM table_13681_2 WHERE highest_monthly_inflation_rate = "29,500%" | sql_create_context | 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 currency name with highest monthly inflation rate being 29,500% ### Input: CREATE TABLE table_13681_2 (
curre... |
For the game played against the L.A. Lakers, where was the match played and what was the attendance level? | CREATE TABLE table_48467 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"Location Attendance" text,
"Record" text
) | SELECT "Location Attendance" FROM table_48467 WHERE "Team" = 'l.a. lakers' | wikisql | 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 game played against the L.A. Lakers, where was the match played and what was the attendance level? ### Input: CREATE... |
For all employees who have the letters D or S in their first name, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id. | 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, COUNT(JOB_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID | nvbench | 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 all employees who have the letters D or S in their first name, give me the comparison about the amount of job_id over th... |
Where was the match on 10/11/2001 against 15? | CREATE TABLE table_name_3 (
venue VARCHAR,
against VARCHAR,
date VARCHAR
) | SELECT venue FROM table_name_3 WHERE against = 15 AND date = "10/11/2001" | sql_create_context | 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: Where was the match on 10/11/2001 against 15? ### Input: CREATE TABLE table_name_3 (
venue VARCHAR,
against VARCHAR,... |
count the number of patients whose primary disease is bowel obstruction and age is less than 56? | 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.diagnosis = "BOWEL OBSTRUCTION" AND demographic.age < "56" | mimicsql_data | 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: count the number of patients whose primary disease is bowel obstruction and age is less than 56? ### Input: CREATE TABLE pre... |
what year was michele assaf nominated | CREATE TABLE table_name_60 (
year VARCHAR,
nominee VARCHAR
) | SELECT year FROM table_name_60 WHERE nominee = "michele assaf" | sql_create_context | 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 year was michele assaf nominated ### Input: CREATE TABLE table_name_60 (
year VARCHAR,
nominee VARCHAR
) ### Re... |
What is the location with the most cinemas opened in year 2010 or later? | CREATE TABLE cinema (
cinema_id number,
name text,
openning_year number,
capacity number,
location text
)
CREATE TABLE schedule (
cinema_id number,
film_id number,
date text,
show_times_per_day number,
price number
)
CREATE TABLE film (
film_id number,
rank_in_series nu... | SELECT location FROM cinema WHERE openning_year >= 2010 GROUP BY location ORDER BY COUNT(*) DESC LIMIT 1 | spider | 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 location with the most cinemas opened in year 2010 or later? ### Input: CREATE TABLE cinema (
cinema_id numb... |
Which NFL team has a player that came from a college in Washington? | CREATE TABLE table_47654 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "NFL Team" FROM table_47654 WHERE "College" = 'washington' | wikisql | 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 NFL team has a player that came from a college in Washington? ### Input: CREATE TABLE table_47654 (
"Pick #" real,... |
R questions and answers per month (2). How many questions per month does each tag in the top 10 tags get | CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId nu... | SELECT Month, COUNT(*) AS count FROM (SELECT Id, PostTypeId, DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) AS "month" FROM Posts LEFT JOIN PostTags ON PostId = Id WHERE TagId = 4452) AS tmp GROUP BY Month, PostTypeId ORDER BY Month, PostTypeId | sede | 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: R questions and answers per month (2). How many questions per month does each tag in the top 10 tags get ### Input: CREATE T... |
Top answerers on the site. A list of the top users with the highest average answer score excluding
community wiki / closed posts or users with fewer than 10 answers | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLic... | WITH UserAvgAnswerScore AS (SELECT Users.Id AS UserId, COUNT(Posts.Id) AS Answers, CAST(AVG(CAST(Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_answer_score" FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 2 AND CommunityOwnedDate IS NULL AND ClosedDate IS NULL GROUP BY Users.Id, DisplayName HAVI... | sede | 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: Top answerers on the site. A list of the top users with the highest average answer score excluding
community wiki / closed ... |
provide the number of patients whose insurance is government and diagnoses long title is microscopic hematuria? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Government" AND diagnoses.long_title = "Microscopic hematuria" | mimicsql_data | 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 insurance is government and diagnoses long title is microscopic hematuria? ### Input: C... |
What is the series episode number of the episode titled 'sound and vision'? | CREATE TABLE table_73841 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | SELECT MAX("Series #") FROM table_73841 WHERE "Title" = 'Sound and Vision' | wikisql | 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 series episode number of the episode titled 'sound and vision'? ### Input: CREATE TABLE table_73841 (
"Serie... |
What is the sum of laps that has a time/retired that is +19.475? | CREATE TABLE table_5148 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT SUM("Laps") FROM table_5148 WHERE "Time/Retired" = '+19.475' | wikisql | 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 sum of laps that has a time/retired that is +19.475? ### Input: CREATE TABLE table_5148 (
"Rider" text,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by time. | 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 (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench | 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, return a bar chart about... |
What was the from for the Date From of 2007-08-08? | CREATE TABLE table_76254 (
"Date From" text,
"Date To" text,
"Position" text,
"Name" text,
"From" text
) | SELECT "From" FROM table_76254 WHERE "Date From" = '2007-08-08' | wikisql | 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 from for the Date From of 2007-08-08? ### Input: CREATE TABLE table_76254 (
"Date From" text,
"Date To"... |
WHAT COLLEGE HAS A ROUND LARGER THAN 9, WITH BUTCH WEBSTER? | CREATE TABLE table_77264 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"College" text
) | SELECT "College" FROM table_77264 WHERE "Round" > '9' AND "Player" = 'butch webster' | wikisql | 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 COLLEGE HAS A ROUND LARGER THAN 9, WITH BUTCH WEBSTER? ### Input: CREATE TABLE table_77264 (
"Round" real,
"Pic... |
could i have a list of flights in FIRST class on monday from SAN FRANCISCO to PITTSBURGH starting at 1200 and afterwards | CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE restriction ... | 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE (((DAT... | atis | 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: could i have a list of flights in FIRST class on monday from SAN FRANCISCO to PITTSBURGH starting at 1200 and afterwards ###... |
How many total Silver has a Bronze larger than 19 and a Total smaller than 125? | CREATE TABLE table_55759 (
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Silver") FROM table_55759 WHERE "Bronze" > '19' AND "Total" < '125' | wikisql | 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 total Silver has a Bronze larger than 19 and a Total smaller than 125? ### Input: CREATE TABLE table_55759 (
"S... |
What is the highest geohash length when the lat error is 0.00068, and the lat bits larger than 17? | CREATE TABLE table_7441 (
"geohash length" real,
"lat bits" real,
"lng bits" real,
"lat error" text,
"lng error" text,
"km error" text
) | SELECT MAX("geohash length") FROM table_7441 WHERE "lat error" = '±0.00068' AND "lat bits" > '17' | wikisql | 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 geohash length when the lat error is 0.00068, and the lat bits larger than 17? ### Input: CREATE TABLE t... |
What is the lowest rank? | CREATE TABLE table_2126 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
) | SELECT MIN("Rank") FROM table_2126 | wikisql | 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 lowest rank? ### Input: CREATE TABLE table_2126 (
"Rank" real,
"Couple" text,
"Judges" real,
"Pu... |
What was the value in 2012 when 2002 was Q1 and 2010 was 1R? | CREATE TABLE table_71531 (
"Tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2012" FROM table_71531 WHERE "2002" = 'q1' AND "2010" = '1r' | wikisql | 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 value in 2012 when 2002 was Q1 and 2010 was 1R? ### Input: CREATE TABLE table_71531 (
"Tournament" text,
... |
what are the three most commonly prescribed medications for patients for whom albumin human 25% is also prescribed at the same time, since 2103? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmenti... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'albumin human 25%' AND STRFTIME('%y', medication.dr... | eicu | 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 commonly prescribed medications for patients for whom albumin human 25% is also prescribed at the sa... |
Where the Vancouver Grizzlies is the awards, what is the conference? | CREATE TABLE table_name_29 (
conference VARCHAR,
awards VARCHAR
) | SELECT conference FROM table_name_29 WHERE awards = "vancouver grizzlies" | sql_create_context | 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: Where the Vancouver Grizzlies is the awards, what is the conference? ### Input: CREATE TABLE table_name_29 (
conference ... |
What is the country for the player Tiger Woods? | CREATE TABLE table_name_3 (
country VARCHAR,
player VARCHAR
) | SELECT country FROM table_name_3 WHERE player = "tiger woods" | sql_create_context | 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 the player Tiger Woods? ### Input: CREATE TABLE table_name_3 (
country VARCHAR,
player VARCH... |
What is the sum of the pick numbers for the player that went to San Miguel Beermen who played at San Sebastian? | CREATE TABLE table_42421 (
"Pick" real,
"Player" text,
"Country of origin*" text,
"PBA team" text,
"College" text
) | SELECT SUM("Pick") FROM table_42421 WHERE "PBA team" = 'san miguel beermen' AND "College" = 'san sebastian' | wikisql | 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 sum of the pick numbers for the player that went to San Miguel Beermen who played at San Sebastian? ### Input: C... |
Which Laid down has a Ship of fearless? | CREATE TABLE table_67044 (
"Ship" text,
"Pennant number" text,
"Laid down" text,
"Launched" text,
"Commissioned" text
) | SELECT "Laid down" FROM table_67044 WHERE "Ship" = 'fearless' | wikisql | 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 Laid down has a Ship of fearless? ### Input: CREATE TABLE table_67044 (
"Ship" text,
"Pennant number" text,
... |
since 12/30/2105, was patient 004-13127's temperature less than 37.778? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-13127')) AND vitalperiodic.temperature < 37.778 AND NOT vitalper... | eicu | 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: since 12/30/2105, was patient 004-13127's temperature less than 37.778? ### Input: CREATE TABLE intakeoutput (
intakeout... |
how many songs are at most 3 minutes long ? | CREATE TABLE table_203_353 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"featured guest(s)" text,
"time" text
) | SELECT COUNT("title") FROM table_203_353 WHERE "time" < 3 | squall | 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 songs are at most 3 minutes long ? ### Input: CREATE TABLE table_203_353 (
id number,
"#" number,
"titl... |
what are the new meds of patient 006-172277 today compared to the one yesterday? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '006-172277') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medic... | eicu | 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 new meds of patient 006-172277 today compared to the one yesterday? ### Input: CREATE TABLE diagnosis (
dia... |
what is discharge location and discharge time of subject id 2560? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data | 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 discharge location and discharge time of subject id 2560? ### Input: CREATE TABLE diagnoses (
subject_id text,
... |
Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | CREATE TABLE pilot_record (
record_id number,
pilot_id number,
aircraft_id number,
date text
)
CREATE TABLE pilot (
pilot_id number,
pilot_name text,
rank number,
age number,
nationality text,
position text,
join_year number,
team text
)
CREATE TABLE aircraft (
airc... | SELECT position FROM pilot WHERE join_year < 2000 INTERSECT SELECT position FROM pilot WHERE join_year > 2005 | spider | 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 pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. ### Input: CREATE TAB... |
What is the record of the game with 28,135 people in attendance? | CREATE TABLE table_name_30 (
record VARCHAR,
attendance VARCHAR
) | SELECT record FROM table_name_30 WHERE attendance = "28,135" | sql_create_context | 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 record of the game with 28,135 people in attendance? ### Input: CREATE TABLE table_name_30 (
record VARCHAR,... |
Show different teams of technicians and the number of technicians in each team, list by the bar in desc. | CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machi... | SELECT Team, COUNT(*) FROM technician GROUP BY Team ORDER BY Team DESC | nvbench | 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 different teams of technicians and the number of technicians in each team, list by the bar in desc. ### Input: CREATE T... |
A bar chart for what are the number of the descriptions of the categories that products with product descriptions that contain the letter t are in?, and display by the y-axis from high to low. | CREATE TABLE Product_Characteristics (
product_id INTEGER,
characteristic_id INTEGER,
product_characteristic_value VARCHAR(50)
)
CREATE TABLE Ref_Colors (
color_code VARCHAR(15),
color_description VARCHAR(80)
)
CREATE TABLE Ref_Characteristic_Types (
characteristic_type_code VARCHAR(15),
c... | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY COUNT(product_category_description) DESC | nvbench | 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: A bar chart for what are the number of the descriptions of the categories that products with product descriptions that conta... |
What is the PBA team for roberto jabar who was picked before number 11? | CREATE TABLE table_65357 (
"Pick" real,
"Player" text,
"Country of origin*" text,
"PBA team" text,
"College" text
) | SELECT "PBA team" FROM table_65357 WHERE "Pick" < '11' AND "Player" = 'roberto jabar' | wikisql | 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 PBA team for roberto jabar who was picked before number 11? ### Input: CREATE TABLE table_65357 (
"Pick" rea... |
Who was the interview subject on the date 1-97? | CREATE TABLE table_1566850_8 (
interview_subject VARCHAR,
date VARCHAR
) | SELECT interview_subject FROM table_1566850_8 WHERE date = "1-97" | sql_create_context | 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 interview subject on the date 1-97? ### Input: CREATE TABLE table_1566850_8 (
interview_subject VARCHAR,
... |
Draw a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality, and I want to rank by the how many nationality from high to low. | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_40... | SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY COUNT(Nationality) DESC | nvbench | 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: Draw a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality, a... |
on the last intensive care unit visit', what was maximum respiration of patient 007-11182? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT MAX(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-11182') AND NOT patient.unitdischargetime IS N... | eicu | 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 the last intensive care unit visit', what was maximum respiration of patient 007-11182? ### Input: CREATE TABLE microlab ... |
what type of aircraft is used on the flight from ATLANTA to PHILADELPHIA before 1200 | CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_... | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.departure_time < 1200 AND fl... | atis | 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 type of aircraft is used on the flight from ATLANTA to PHILADELPHIA before 1200 ### Input: CREATE TABLE time_interval (... |
Show the rank, first name, and last name for all the faculty. | CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE activity (
actid number,
activity_name text
)
CREATE TABLE participates_in (
stuid number,
actid number
)
CREATE TABLE faculty... | SELECT rank, fname, lname FROM faculty | spider | 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 rank, first name, and last name for all the faculty. ### Input: CREATE TABLE student (
stuid number,
lname ... |
Show me a bar chart comparing the total number of captains of different classes. | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | SELECT Class, COUNT(Class) FROM captain GROUP BY Class | nvbench | 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 a bar chart comparing the total number of captains of different classes. ### Input: CREATE TABLE captain (
Capta... |
what is the first test that patient 027-185580 had in their last hospital encounter? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-185580' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmitt... | eicu | 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 first test that patient 027-185580 had in their last hospital encounter? ### Input: CREATE TABLE diagnosis (
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.