instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
retrieve the top four most frequently prescribed medications until 4 years ago? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id numbe... | SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY prescriptions.drug) 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: retrieve the top four most frequently prescribed medications until 4 years ago? ### Input: CREATE TABLE d_icd_diagnoses (
... |
what is the earliest arriving flight from HOUSTON to ORLANDO | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
res... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ORLANDO' AND flight.arrival_time = (SELECT MIN(FLIGHTalias1.arrival_time) FROM airport_se... | 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 earliest arriving flight from HOUSTON to ORLANDO ### Input: CREATE TABLE code_description (
code varchar,
... |
list all flights leaving on thursday morning from NEW YORK to MONTREAL | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE city (
city_code varchar,
city_na... | 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, days, flight WHERE (((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_nam... | 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 all flights leaving on thursday morning from NEW YORK to MONTREAL ### Input: CREATE TABLE state (
state_code text,
... |
What year was the cormorant built in? | CREATE TABLE table_10091 (
"Number" real,
"Name" text,
"Year Built" text,
"Boat Builder" text,
"Current Status" text
) | SELECT "Year Built" FROM table_10091 WHERE "Name" = 'cormorant' | 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 cormorant built in? ### Input: CREATE TABLE table_10091 (
"Number" real,
"Name" text,
"Year Bu... |
What is Fitzroy's Home team Crowd? | CREATE TABLE table_77752 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT SUM("Crowd") FROM table_77752 WHERE "Home team" = 'fitzroy' | 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 Fitzroy's Home team Crowd? ### Input: CREATE TABLE table_77752 (
"Home team" text,
"Home team score" text,
... |
when did patient 002-19168 receive a prescription since 54 months ago for the last time? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE p... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-19168')) AND DATETIME(medication.drugstarttime) >= DATETIM... | 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 002-19168 receive a prescription since 54 months ago for the last time? ### Input: CREATE TABLE treatment (... |
What is the lowest ranking associated with a total of 23? | CREATE TABLE table_74958 (
"Ranking" real,
"Nationality" text,
"Name" text,
"Years" text,
"ICFC" real,
"FCWC" real,
"Total" real
) | SELECT MIN("Ranking") FROM table_74958 WHERE "Total" = '23' | 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 ranking associated with a total of 23? ### Input: CREATE TABLE table_74958 (
"Ranking" real,
"Nat... |
Who has friends that are younger than the average age? | CREATE TABLE personfriend (
name text,
friend text,
year number
)
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
) | SELECT DISTINCT T2.name FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT AVG(age) FROM person) | 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 has friends that are younger than the average age? ### Input: CREATE TABLE personfriend (
name text,
friend text... |
Who was the visitor on March 27? | CREATE TABLE table_60620 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Visitor" FROM table_60620 WHERE "Date" = 'march 27' | 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 visitor on March 27? ### Input: CREATE TABLE table_60620 (
"Date" text,
"Visitor" text,
"Score" text... |
what are the four most frequently given procedures for patients diagnosed with ath ext ntv art gngrene previously in the same month, since 4 years ago? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | 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 four most frequently given procedures for patients diagnosed with ath ext ntv art gngrene previously in the sam... |
systolic blood pressure > 160 or < 90 mmhg or diastolic blood pressure > 100 or < 60 mmhg at screening. | CREATE TABLE table_train_100 (
"id" int,
"systolic_blood_pressure_sbp" int,
"stroke" bool,
"body_weight" float,
"diastolic_blood_pressure_dbp" int,
"rosen_modified_hachinski_ischemic_score" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_100 WHERE (systolic_blood_pressure_sbp < 90 OR systolic_blood_pressure_sbp > 160) OR (diastolic_blood_pressure_dbp > 100 OR diastolic_blood_pressure_dbp < 60) | 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: systolic blood pressure > 160 or < 90 mmhg or diastolic blood pressure > 100 or < 60 mmhg at screening. ### Input: CREATE TA... |
How many league cups associated with under 10 championships and a total of under 3? | CREATE TABLE table_69699 (
"Name" text,
"Championship" real,
"League Cup" real,
"FA Cup" real,
"Total" real
) | SELECT SUM("League Cup") FROM table_69699 WHERE "Championship" < '10' AND "Total" < '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: How many league cups associated with under 10 championships and a total of under 3? ### Input: CREATE TABLE table_69699 (
... |
what is the number of patients whose primary disease is mesenteric ischemia and age is less than 86? | 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 WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND demographic.age < "86" | 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 whose primary disease is mesenteric ischemia and age is less than 86? ### Input: CREATE TABLE... |
What 2008 has A as the 2007, and 2r as the 2010? | CREATE TABLE table_61616 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2008" FROM table_61616 WHERE "2007" = 'a' AND "2010" = '2r' | 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 2008 has A as the 2007, and 2r as the 2010? ### Input: CREATE TABLE table_61616 (
"Tournament" text,
"2006" tex... |
how many hours has it been since patient 015-23047 has been admitted to the hospital? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '015-23047' AND patient.hospitaldischargetime 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: how many hours has it been since patient 015-23047 has been admitted to the hospital? ### Input: CREATE TABLE allergy (
... |
Just show the employee's last name and their manager's id using a bar chart, could you order MANAGER_ID from low to high order please? | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY MANAGER_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: Just show the employee's last name and their manager's id using a bar chart, could you order MANAGER_ID from low to high ord... |
calculate the number of times that patient 15821 took po intake on the first hospital visit. | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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,
... | SELECT COUNT(*) 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 = 15821 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND inputevents_cv.itemid... | 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 number of times that patient 15821 took po intake on the first hospital visit. ### Input: CREATE TABLE d_icd_d... |
What is the highest number of wins of the player with less than $4,976,980 in earnings and a rank lower than 4? | CREATE TABLE table_39571 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Wins" real
) | SELECT MAX("Wins") FROM table_39571 WHERE "Earnings ( $ )" < '4,976,980' AND "Rank" > '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: What is the highest number of wins of the player with less than $4,976,980 in earnings and a rank lower than 4? ### Input: C... |
has patient 54825 undergone a rt/left heart card cath procedure until 1 year ago? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE labevents (
row... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'rt/left heart card cath') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825) AND DATETIME(pro... | 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: has patient 54825 undergone a rt/left heart card cath procedure until 1 year ago? ### Input: CREATE TABLE inputevents_cv (
... |
what is the number of patients whose admission type is urgent and procedure short title is coronary arteriogram nec? | 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 WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Coronary arteriogram NEC" | 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 whose admission type is urgent and procedure short title is coronary arteriogram nec? ### Inp... |
What is the production code for season episode 8? | CREATE TABLE table_18778 (
"Series Number" real,
"Season Number" real,
"Episode Title" text,
"Premiere Date" text,
"Production Code" real
) | SELECT MIN("Production Code") FROM table_18778 WHERE "Season Number" = '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 production code for season episode 8? ### Input: CREATE TABLE table_18778 (
"Series Number" real,
"Seaso... |
since 07/2104, patient 013-9305 has had any gastric tube intake? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-9305')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput... | 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 07/2104, patient 013-9305 has had any gastric tube intake? ### Input: CREATE TABLE microlab (
microlabid number,
... |
how many patients whose primary disease is acidosis and lab test category is blood gas? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "ACIDOSIS" AND lab."CATEGORY" = "Blood Gas" | 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 primary disease is acidosis and lab test category is blood gas? ### Input: CREATE TABLE lab (
su... |
get the number of patients on neb route of drug administration who have diagnoses icd9 code 23875. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "23875" AND prescriptions.route = "NEB" | 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: get the number of patients on neb route of drug administration who have diagnoses icd9 code 23875. ### Input: CREATE TABLE p... |
what time are the flights leaving from DENVER to PITTSBURGH on 7 7 | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
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,
... | SELECT DISTINCT flight.departure_time FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 7 AND date_day.month_number = ... | 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 time are the flights leaving from DENVER to PITTSBURGH on 7 7 ### Input: CREATE TABLE date_day (
month_number int,
... |
which employer has the most employees ? | CREATE TABLE table_203_737 (
id number,
"#" number,
"employer" text,
"# of employees" number
) | SELECT "employer" FROM table_203_737 ORDER BY "# of employees" 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: which employer has the most employees ? ### Input: CREATE TABLE table_203_737 (
id number,
"#" number,
"employer... |
what were the three drugs that were ordered the most frequently during this year? | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 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: what were the three drugs that were ordered the most frequently during this year? ### Input: CREATE TABLE prescriptions (
... |
What is the average loss with a goal higher than 51 and wins higher than 14? | CREATE TABLE table_name_88 (
losses INTEGER,
goals_against VARCHAR,
wins VARCHAR
) | SELECT AVG(losses) FROM table_name_88 WHERE goals_against > 51 AND wins > 14 | 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 loss with a goal higher than 51 and wins higher than 14? ### Input: CREATE TABLE table_name_88 (
los... |
What player has a rating greater than 2746, with a prev less than 4, and +4 as the chng? | CREATE TABLE table_40182 (
"Rank" real,
"Prev" real,
"Player" text,
"Rating" real,
"Chng" text
) | SELECT "Player" FROM table_40182 WHERE "Rating" > '2746' AND "Prev" < '4' AND "Chng" = '+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: What player has a rating greater than 2746, with a prev less than 4, and +4 as the chng? ### Input: CREATE TABLE table_40182... |
have the sao2 of patient 3125 remained normal on the current intensive care unit visit? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
... | SELECT COUNT(*) > 0 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 = 3125) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_item... | 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: have the sao2 of patient 3125 remained normal on the current intensive care unit visit? ### Input: CREATE TABLE patients (
... |
what is the number of patients whose admission location is clinic referral/premature and discharge location is home health care? | 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.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.discharge_location = "HOME HEALTH CARE" | 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 whose admission location is clinic referral/premature and discharge location is home health c... |
What sport did Miroslav Jambor Richard Csejtey participate in? | CREATE TABLE table_name_16 (
sport VARCHAR,
name VARCHAR
) | SELECT sport FROM table_name_16 WHERE name = "miroslav jambor richard csejtey" | 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 sport did Miroslav Jambor Richard Csejtey participate in? ### Input: CREATE TABLE table_name_16 (
sport VARCHAR,
... |
Bar chart x axis headquarters y axis the total number, and sort by the bars in asc. | 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 TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TAB... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY Headquarters | 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: Bar chart x axis headquarters y axis the total number, and sort by the bars in asc. ### Input: CREATE TABLE company (
Co... |
What is the total number of Points 1, when Position is '7', and when Drawn is greater than 6? | CREATE TABLE table_58662 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" real
) | SELECT COUNT("Points 1") FROM table_58662 WHERE "Position" = '7' AND "Drawn" > '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 total number of Points 1, when Position is '7', and when Drawn is greater than 6? ### Input: CREATE TABLE table_... |
how did last patient 021-155303 get admitted to the hospital? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
in... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '021-155303' ORDER BY patient.hospitaladmittime 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: how did last patient 021-155303 get admitted to the hospital? ### Input: CREATE TABLE vitalperiodic (
vitalperiodicid nu... |
What is the lowest Pick # of Saint Vincent College? | CREATE TABLE table_name_78 (
pick__number INTEGER,
college VARCHAR
) | SELECT MIN(pick__number) FROM table_name_78 WHERE college = "saint vincent college" | 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 Pick # of Saint Vincent College? ### Input: CREATE TABLE table_name_78 (
pick__number INTEGER,
co... |
Which player is from Ohio State College? | CREATE TABLE table_name_55 (
player VARCHAR,
college VARCHAR
) | SELECT player FROM table_name_55 WHERE college = "ohio state" | 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 is from Ohio State College? ### Input: CREATE TABLE table_name_55 (
player VARCHAR,
college VARCHAR
) #... |
What was the largest crowd for North Melbourne | CREATE TABLE table_33685 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MAX("Crowd") FROM table_33685 WHERE "Home team" = 'north melbourne' | 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 largest crowd for North Melbourne ### Input: CREATE TABLE table_33685 (
"Home team" text,
"Home team sc... |
Which home team has an Away team score of 18.21 (129)? | CREATE TABLE table_56250 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_56250 WHERE "Away team score" = '18.21 (129)' | 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 home team has an Away team score of 18.21 (129)? ### Input: CREATE TABLE table_56250 (
"Home team" text,
"Home... |
What was the score when the home team had a crowd larger than 21,188? | CREATE TABLE table_name_32 (
home_team VARCHAR,
crowd INTEGER
) | SELECT home_team AS score FROM table_name_32 WHERE crowd > 21 OFFSET 188 | 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 score when the home team had a crowd larger than 21,188? ### Input: CREATE TABLE table_name_32 (
home_team ... |
how many patients less than 80 years have had intravenous infusion of clofarabine procedure? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "80" AND procedures.long_title = "Intravenous infusion of clofarabine" | 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 less than 80 years have had intravenous infusion of clofarabine procedure? ### Input: CREATE TABLE procedu... |
I want the attendance for week larger than 10 and result of l 22-21 | CREATE TABLE table_52183 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Attendance" FROM table_52183 WHERE "Week" > '10' AND "Result" = 'l 22-21' | 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 the attendance for week larger than 10 and result of l 22-21 ### Input: CREATE TABLE table_52183 (
"Week" real,
... |
how many patients whose admission type is elective and procedure short title is incision of aorta? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.short_title = "Incision of aorta" | 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 admission type is elective and procedure short title is incision of aorta? ### Input: CREATE TABLE d... |
what was the name of the output the last time patient 030-21071 had on last month/21? | 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 cost (
costid num... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-21071')) AND intakeoutput.cellpath LIKE '%output%' AND D... | 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 the last time patient 030-21071 had on last month/21? ### Input: CREATE TABLE vitalperiodic ... |
What team was the opponent on October 15, 1967? | CREATE TABLE table_48724 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Opponent" FROM table_48724 WHERE "Date" = 'october 15, 1967' | 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 team was the opponent on October 15, 1967? ### Input: CREATE TABLE table_48724 (
"Week" real,
"Date" text,
... |
uncontrolled hypertension: systolic blood pressure ( sbp ) > 150 | CREATE TABLE table_train_155 (
"id" int,
"cholesterol" float,
"bleeding" int,
"systolic_blood_pressure_sbp" int,
"diabetic" string,
"hyperlipidemia" bool,
"creatinine_clearance_cl" float,
"platelet_count" float,
"hypertension" bool,
"NOUSE" float
) | SELECT * FROM table_train_155 WHERE hypertension = 1 OR systolic_blood_pressure_sbp > 150 | 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: uncontrolled hypertension: systolic blood pressure ( sbp ) > 150 ### Input: CREATE TABLE table_train_155 (
"id" int,
... |
Which Home is on january 11? | CREATE TABLE table_8374 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Home" FROM table_8374 WHERE "Date" = 'january 11' | 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 Home is on january 11? ### Input: CREATE TABLE table_8374 (
"Date" text,
"Visitor" text,
"Score" text,
... |
how many of the patients treated with drug lido2/5j had a lab test for cerebrospinal fluid (csf)? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "LIDO2/5J" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | 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 lido2/5j had a lab test for cerebrospinal fluid (csf)? ### Input: CREATE TABLE de... |
count the number of patients whose diagnosis icd9 code is 29281 and lab test abnormal status is delta. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "29281" AND lab.flag = "delta" | 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 diagnosis icd9 code is 29281 and lab test abnormal status is delta. ### Input: CREATE TAB... |
Gold of 0, and a Total larger than 0, and a Silver larger than 1 and what is the highest bronze? | CREATE TABLE table_name_70 (
bronze INTEGER,
silver VARCHAR,
gold VARCHAR,
total VARCHAR
) | SELECT MAX(bronze) FROM table_name_70 WHERE gold = 0 AND total > 0 AND silver > 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: Gold of 0, and a Total larger than 0, and a Silver larger than 1 and what is the highest bronze? ### Input: CREATE TABLE tab... |
Show the name of each party and the corresponding number of delegates from that party in a bar chart, order by the the average of count(*) from low to high please. | CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE party (
Party_ID int,
... | SELECT T2.Party, AVG(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY AVG(COUNT(*)) | 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 name of each party and the corresponding number of delegates from that party in a bar chart, order by the the avera... |
How many students are in each department? | CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_address text,
dept_extension text
)
CREATE TABLE course (
crs_code text,
dept_code text,
crs_description text,
crs_credit number
)
CREATE TABLE employee (
emp_num number,
em... | SELECT COUNT(*), dept_code FROM student GROUP BY dept_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: How many students are in each department? ### Input: CREATE TABLE department (
dept_code text,
dept_name text,
s... |
Who had the most assists in the game against Indiana? | CREATE TABLE table_name_57 (
high_assists VARCHAR,
team VARCHAR
) | SELECT high_assists FROM table_name_57 WHERE team = "indiana" | 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 most assists in the game against Indiana? ### Input: CREATE TABLE table_name_57 (
high_assists VARCHAR,
... |
What is the average Gold where the Nation is Russia (rus) and the number of silver is less than 2? | CREATE TABLE table_name_99 (
gold INTEGER,
nation VARCHAR,
silver VARCHAR
) | SELECT AVG(gold) FROM table_name_99 WHERE nation = "russia (rus)" AND silver < 2 | 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 Gold where the Nation is Russia (rus) and the number of silver is less than 2? ### Input: CREATE TABLE t... |
Bar chart x axis name y axis age | CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int... | SELECT Name, Age FROM artist | 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: Bar chart x axis name y axis age ### Input: CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Ye... |
Which Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no? | CREATE TABLE table_name_47 (
sydney VARCHAR,
auckland VARCHAR,
melbourne VARCHAR,
gold_coast VARCHAR,
adelaide VARCHAR
) | SELECT sydney FROM table_name_47 WHERE gold_coast = "no" AND adelaide = "no" AND melbourne = "no" AND auckland = "no" | 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 Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no? ### Input: CREATE TABLE table_name_47 (
sydne... |
Show names for all employees who do not have certificate of Boeing 737-800. | CREATE TABLE Certificate (
eid VARCHAR,
aid VARCHAR
)
CREATE TABLE Aircraft (
aid VARCHAR,
name VARCHAR
)
CREATE TABLE Employee (
name VARCHAR,
eid VARCHAR
) | SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800" | 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 names for all employees who do not have certificate of Boeing 737-800. ### Input: CREATE TABLE Certificate (
eid VA... |
Count the number of male students who had class senator votes in the fall election cycle. | CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number... | SELECT COUNT(*) FROM student AS T1 JOIN voting_record AS T2 ON T1.stuid = class_senator_vote WHERE T1.sex = "M" AND T2.election_cycle = "Fall" | 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 male students who had class senator votes in the fall election cycle. ### Input: CREATE TABLE student (
... |
Show the race class and number of races in each class with a bar chart. | CREATE TABLE race (
Race_ID int,
Name text,
Class text,
Date text,
Track_ID text
)
CREATE TABLE track (
Track_ID int,
Name text,
Location text,
Seating real,
Year_Opened real
) | SELECT Class, COUNT(*) FROM race GROUP BY Class | 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 race class and number of races in each class with a bar chart. ### Input: CREATE TABLE race (
Race_ID int,
... |
For each city, what is the highest latitude for its stations. Visualize by pie chart. | CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station... | SELECT city, MAX(lat) FROM station GROUP BY city | 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 each city, what is the highest latitude for its stations. Visualize by pie chart. ### Input: CREATE TABLE status (
s... |
Show me about the distribution of Nationality and the average of meter_100 , and group by attribute Nationality in a bar chart, show the average of meter 100 in asc order. | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality ORDER BY AVG(meter_100) | 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 about the distribution of Nationality and the average of meter_100 , and group by attribute Nationality in a bar cha... |
how was patient 007-2498 admitted to the hospital in the last year for the first time? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '007-2498' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY patient.hospitaladmittime 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: how was patient 007-2498 admitted to the hospital in the last year for the first time? ### Input: CREATE TABLE medication (
... |
Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. | CREATE TABLE university (
school_id number,
school text,
location text,
founded number,
affiliation text,
enrollment number,
nickname text,
primary_conference text
)
CREATE TABLE basketball_match (
team_id number,
school_id number,
team_name text,
acc_regular_season text... | SELECT SUM(enrollment), affiliation FROM university WHERE founded > 1850 GROUP BY affiliation | 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 total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation typ... |
give me the number of patients whose gender is m and item id is 51146? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.itemid = "51146" | 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 gender is m and item id is 51146? ### Input: CREATE TABLE prescriptions (
subject_i... |
What was the original name for the song performed by Brad Kavanagh? | CREATE TABLE table_name_42 (
original_name VARCHAR,
singer_s_ VARCHAR
) | SELECT original_name FROM table_name_42 WHERE singer_s_ = "brad kavanagh" | 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 original name for the song performed by Brad Kavanagh? ### Input: CREATE TABLE table_name_42 (
original_nam... |
How many players are from each country. Show a pie chart. | CREATE TABLE team (
Team_id int,
Name text
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
... | SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_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: How many players are from each country. Show a pie chart. ### Input: CREATE TABLE team (
Team_id int,
Name text
)
C... |
Find the patients aged less than 64 years old with procedure icd9 code 4311. | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "64" AND procedures.icd9_code = "4311" | 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 patients aged less than 64 years old with procedure icd9 code 4311. ### Input: CREATE TABLE demographic (
subje... |
Which team won on the day when attendance was 42,308? | CREATE TABLE table_41931 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Result" FROM table_41931 WHERE "Attendance" = '42,308' | 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 team won on the day when attendance was 42,308? ### Input: CREATE TABLE table_41931 (
"Week" real,
"Date" text... |
what are the prices of the drug dexamethasone? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE i... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'dexamethasone') | 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 prices of the drug dexamethasone? ### Input: CREATE TABLE procedures_icd (
row_id number,
subject_id nu... |
the last month, when was the last time patient 7698 was prescribed doxazosin? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7698) AND prescriptions.drug = 'doxazosin' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY p... | 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 last month, when was the last time patient 7698 was prescribed doxazosin? ### Input: CREATE TABLE diagnoses_icd (
ro... |
Which home team has 44 ties? | CREATE TABLE table_name_12 (
home_team VARCHAR,
tie_no VARCHAR
) | SELECT home_team FROM table_name_12 WHERE tie_no = "44" | 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 home team has 44 ties? ### Input: CREATE TABLE table_name_12 (
home_team VARCHAR,
tie_no VARCHAR
) ### Respons... |
how many hours has passed since patient 027-61708 stayed in ward 971 for the last time during this hospital visit? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '027-61708' AND patient.wardid = 971 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime 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: how many hours has passed since patient 027-61708 stayed in ward 971 for the last time during this hospital visit? ### Input... |
What title was used in the nomination of the Spanish language film Traffic? | CREATE TABLE table_65600 (
"Year (Ceremony)" text,
"Category" text,
"Film title used in nomination" text,
"Original title" text,
"Language" text,
"Result" text
) | SELECT "Film title used in nomination" FROM table_65600 WHERE "Language" = 'spanish' AND "Original title" = 'traffic' | 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 title was used in the nomination of the Spanish language film Traffic? ### Input: CREATE TABLE table_65600 (
"Year ... |
Which Visitor has a Score of 0-4? | CREATE TABLE table_name_78 (
visitor VARCHAR,
score VARCHAR
) | SELECT visitor FROM table_name_78 WHERE score = "0-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: Which Visitor has a Score of 0-4? ### Input: CREATE TABLE table_name_78 (
visitor VARCHAR,
score VARCHAR
) ### Respo... |
What's the score of the game they played against a team with a record of 81-54? | CREATE TABLE table_name_95 (
score VARCHAR,
record VARCHAR
) | SELECT score FROM table_name_95 WHERE record = "81-54" | 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 score of the game they played against a team with a record of 81-54? ### Input: CREATE TABLE table_name_95 (
... |
how many of the newborn patients received id therapy? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "NEWBORN" AND prescriptions.route = "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 of the newborn patients received id therapy? ### Input: CREATE TABLE prescriptions (
subject_id text,
hadm_... |
please show me the flights from ATLANTA to DENVER | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
... | 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER... | 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: please show me the flights from ATLANTA to DENVER ### Input: CREATE TABLE date_day (
month_number int,
day_number in... |
did patient 012-66291 ever have lab testing in this hospital visit? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-66291' AND patient.hospitaldischargetime 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: did patient 012-66291 ever have lab testing in this hospital visit? ### Input: CREATE TABLE patient (
uniquepid text,
... |
how much did patient 23070's weight differ from the value measured at 2105-12-12 04:00:00 compared to the value measured at 2105-12-08 03:00:00? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
... | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23070)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '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: how much did patient 23070's weight differ from the value measured at 2105-12-12 04:00:00 compared to the value measured at ... |
have patient 18237 had any lab testing done in 05/2105? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id ... | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18237) AND STRFTIME('%y-%m', labevents.charttime) = '2105-05' | 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: have patient 18237 had any lab testing done in 05/2105? ### Input: CREATE TABLE labevents (
row_id number,
subject_i... |
has patient 030-47098 visited an admission? | 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 COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '030-47098' | 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: has patient 030-47098 visited an admission? ### Input: CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientu... |
give me the number of patients whose gender is m and procedure short title is endosc destr stomach les? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.short_title = "Endosc destr stomach les" | 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 gender is m and procedure short title is endosc destr stomach les? ### Input: CREATE TA... |
To take HUMGEN 553 , is the prerequisite HUMGEN 632 ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABL... | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_0.department = 'HUMGEN' AND COURSE_0.number = 632 AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'HUMGEN' AND COURSE_1.number = 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: To take HUMGEN 553 , is the prerequisite HUMGEN 632 ? ### Input: CREATE TABLE requirement (
requirement_id int,
requ... |
who is the the fastest lap with grand prix being european grand prix | CREATE TABLE table_12161822_5 (
fastest_lap VARCHAR,
grand_prix VARCHAR
) | SELECT fastest_lap FROM table_12161822_5 WHERE grand_prix = "European grand_prix" | 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 the fastest lap with grand prix being european grand prix ### Input: CREATE TABLE table_12161822_5 (
fastest_... |
what were the five most common drugs prescribed until 2103? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE STRFTIME('%y', medication.drugstarttime) <= '2103' GROUP BY medication.drugname) 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 were the five most common drugs prescribed until 2103? ### Input: CREATE TABLE diagnosis (
diagnosisid number,
... |
what is the monthly maximum amount of wbc of patient 95235 since 04/2102? | 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,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CR... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95235) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'wbc') AND STRFTIME('%y-%m', labevents.charttime) >= '2102-04' GROUP BY STRF... | 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 monthly maximum amount of wbc of patient 95235 since 04/2102? ### Input: CREATE TABLE patients (
row_id numb... |
Are there any courses I can take in the Fall or Winter semester to satisfy my ULCS requirement ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREA... | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, program_course AS PROGRAM_COURSEalias0... | 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 any courses I can take in the Fall or Winter semester to satisfy my ULCS requirement ? ### Input: CREATE TABLE ins... |
What 's the difference between courses RCNSCI 104 and RCNSCI 232 ? | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
... | SELECT DISTINCT department, description, number FROM course WHERE (department = 'RCNSCI' AND number = 104) OR (department = 'RCNSCI' AND number = 232) | 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 difference between courses RCNSCI 104 and RCNSCI 232 ? ### Input: CREATE TABLE program_course (
program_id i... |
How many movie reviews does each director get? | CREATE TABLE Movie (
director VARCHAR,
mID VARCHAR
)
CREATE TABLE Rating (
mID VARCHAR
) | SELECT COUNT(*), T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director | 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 movie reviews does each director get? ### Input: CREATE TABLE Movie (
director VARCHAR,
mID VARCHAR
)
CREA... |
For those dates with a max temperature greater than or equal to 80, I would like a line chart to show the tendency, display by the X in asc. | CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE station (
id INTEG... | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 GROUP BY date ORDER BY 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 dates with a max temperature greater than or equal to 80, I would like a line chart to show the tendency, display ... |
Against the Houston Oilers after week 14, what was the result of the game? | CREATE TABLE table_46931 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" text
) | SELECT "Result" FROM table_46931 WHERE "Week" > '14' AND "Opponent" = 'houston oilers' | 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: Against the Houston Oilers after week 14, what was the result of the game? ### Input: CREATE TABLE table_46931 (
"Week" ... |
what specimen test was given for the last time to patient 16088 on the first hospital visit? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
h... | SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16088 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) ORDER BY microbiologyevents.charttime 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: what specimen test was given for the last time to patient 16088 on the first hospital visit? ### Input: CREATE TABLE diagnos... |
Bar chart x axis policy type code y axis the total number, could you list the total number from low to high order please? | CREATE TABLE Staff (
Staff_ID INTEGER,
Staff_Details VARCHAR(255)
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Claim_Headers (
Claim_Header_ID INTEGER,
Claim_Status_Code CHAR(15),
Claim_Type_Code CHAR(15),
Policy_ID INTEGER,
Date_of_C... | SELECT Policy_Type_Code, COUNT(*) FROM Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) | 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: Bar chart x axis policy type code y axis the total number, could you list the total number from low to high order please? ##... |
What was the name of the episode that had 14.52 viewers? | CREATE TABLE table_22904707_1 (
title VARCHAR,
us_viewers__million_ VARCHAR
) | SELECT title FROM table_22904707_1 WHERE us_viewers__million_ = "14.52" | 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 episode that had 14.52 viewers? ### Input: CREATE TABLE table_22904707_1 (
title VARCHAR,
u... |
what was the name of the procedure that's been performed to patient 5310 two times during a month before? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
cha... | 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, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 531... | 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 that's been performed to patient 5310 two times during a month before? ### Input: CREATE ... |
what is the total when bronze is more than 1 and gold smaller than 1? | CREATE TABLE table_71288 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Total") FROM table_71288 WHERE "Bronze" > '1' AND "Gold" < '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 total when bronze is more than 1 and gold smaller than 1? ### Input: CREATE TABLE table_71288 (
"Rank" real,... |
What is the total number of Week, when Opponent is At Chicago Bears, and when Attendance is greater than 49,070? | CREATE TABLE table_name_81 (
week VARCHAR,
opponent VARCHAR,
attendance VARCHAR
) | SELECT COUNT(week) FROM table_name_81 WHERE opponent = "at chicago bears" AND attendance > 49 OFFSET 070 | 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 number of Week, when Opponent is At Chicago Bears, and when Attendance is greater than 49,070? ### Input: ... |
For those products with a price between 60 and 120, draw a scatter chart about the correlation between code and manufacturer , and group by attribute name. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Code, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 GROUP BY 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: For those products with a price between 60 and 120, draw a scatter chart about the correlation between code and manufacturer... |
Can you tell me the average Attendance rhat has the Opponent of dunfermline athletic? | CREATE TABLE table_name_85 (
attendance INTEGER,
opponent VARCHAR
) | SELECT AVG(attendance) FROM table_name_85 WHERE opponent = "dunfermline athletic" | 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 average Attendance rhat has the Opponent of dunfermline athletic? ### Input: CREATE TABLE table_name_85 ... |
what kind of ground transportation is available in ATLANTA | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE code_description (
code varchar,
descript... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'ATLANTA' AND ground_service.city_code = city.city_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 kind of ground transportation is available in ATLANTA ### Input: CREATE TABLE date_day (
month_number int,
day_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.