instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
What is the make of the car that drove 54 laps? | CREATE TABLE table_32043 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT "Constructor" FROM table_32043 WHERE "Laps" = '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 is the make of the car that drove 54 laps? ### Input: CREATE TABLE table_32043 (
"Driver" text,
"Constructor" t... |
what is the number of patients whose discharge location is rehab/distinct part hosp and procedure icd9 code is 5187? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND procedures.icd9_code = "5187" | Below are sql tables 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 discharge location is rehab/distinct part hosp and procedure icd9 code is 5187? ### Inp... |
What is the total draw count with 52 goals and less than 15 losses? | CREATE TABLE table_name_38 (
draws INTEGER,
goals_against VARCHAR,
losses VARCHAR
) | SELECT SUM(draws) FROM table_name_38 WHERE goals_against = 52 AND losses < 15 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total draw count with 52 goals and less than 15 losses? ### Input: CREATE TABLE table_name_38 (
draws INTEGE... |
Find the status of orders which belong to the customer named 'Jeramie', group by order status, and count them. Show the result with a bar chart. | CREATE TABLE Customers (
customer_id INTEGER,
customer_name VARCHAR(80),
customer_details VARCHAR(255)
)
CREATE TABLE Shipments (
shipment_id INTEGER,
order_id INTEGER,
invoice_number INTEGER,
shipment_tracking_number VARCHAR(80),
shipment_date DATETIME,
other_shipment_details VARCH... | SELECT T2.order_status, COUNT(T2.order_status) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie" GROUP BY order_status | Below are sql tables 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 status of orders which belong to the customer named 'Jeramie', group by order status, and count them. Show the resu... |
What was the name of the home team playing at the Junction Oval venue? | CREATE TABLE table_52176 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
) | SELECT "Home team" FROM table_52176 WHERE "Venue" = 'junction oval' | Below are sql tables 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 home team playing at the Junction Oval venue? ### Input: CREATE TABLE table_52176 (
"Home team"... |
what are the four most frequent drugs that were prescribed to the leukocytosis female patients 40s within 2 months after having been diagnosed with leukocytosis last year? | 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 t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'leukocytosis' AND DATETIME(diagnosis.diagnosistime... | Below are sql tables 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 frequent drugs that were prescribed to the leukocytosis female patients 40s within 2 months after hav... |
What is the relationship between Team_ID and ACC_Percent , and group by attribute All_Home? | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Home | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the relationship between Team_ID and ACC_Percent , and group by attribute All_Home? ### Input: CREATE TABLE basketba... |
how many patients admitted before the year 2135 are diagnosed with kidney fail, tubr necr? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.short_title = "Ac kidny fail, tubr necr" | Below are sql tables 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 admitted before the year 2135 are diagnosed with kidney fail, tubr necr? ### Input: CREATE TABLE procedure... |
how many female patients were born before the year 1821? | 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 WHERE demographic.gender = "F" AND demographic.dob_year < "1821" | Below are sql tables 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 female patients were born before the year 1821? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_i... |
In what prefecture is Daito located? | CREATE TABLE table_2518850_4 (
prefecture VARCHAR,
city_town VARCHAR
) | SELECT prefecture FROM table_2518850_4 WHERE city_town = "Daito" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what prefecture is Daito located? ### Input: CREATE TABLE table_2518850_4 (
prefecture VARCHAR,
city_town VARCHAR... |
select * from Users where Reputation > 200000. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Po... | SELECT * FROM Users WHERE Reputation > 200000 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: select * from Users where Reputation > 200000. ### Input: CREATE TABLE PostLinks (
Id number,
CreationDate time,
... |
Count the number of captains that have each rank Visualize by bar chart, rank by the the total number in descending. | 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 Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY COUNT(*) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Count the number of captains that have each rank Visualize by bar chart, rank by the the total number in descending. ### Inp... |
Which Home team score has an Away team score of 11.9 (75)? | CREATE TABLE table_51357 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_51357 WHERE "Away team score" = '11.9 (75)' | Below are sql tables 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 score has an Away team score of 11.9 (75)? ### Input: CREATE TABLE table_51357 (
"Home team" text,
"... |
When richmond played away, what was the largest number of people who watched? | CREATE TABLE table_32567 (
"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_32567 WHERE "Away team" = 'richmond' | Below are sql tables 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 richmond played away, what was the largest number of people who watched? ### Input: CREATE TABLE table_32567 (
"Hom... |
Show the names and ids of tourist attractions that are visited at most once by a bar chart, and I want to show from low to high by the X-axis. | CREATE TABLE Shops (
Shop_ID INTEGER,
Shop_Details 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 TABLE Museums (
Museum_ID INTEGER,
Mu... | SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID ORDER BY T1.Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the names and ids of tourist attractions that are visited at most once by a bar chart, and I want to show from low to h... |
What was the maximum capacity of larry gomes stadium? | CREATE TABLE table_25794138_1 (
capacity INTEGER,
stadium VARCHAR
) | SELECT MAX(capacity) FROM table_25794138_1 WHERE stadium = "Larry Gomes stadium" | Below are sql tables 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 maximum capacity of larry gomes stadium? ### Input: CREATE TABLE table_25794138_1 (
capacity INTEGER,
s... |
What is the 2nd leg for Barcelona Team 2? | CREATE TABLE table_name_49 (
team_2 VARCHAR
) | SELECT 2 AS nd_leg FROM table_name_49 WHERE team_2 = "barcelona" | Below are sql tables 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 2nd leg for Barcelona Team 2? ### Input: CREATE TABLE table_name_49 (
team_2 VARCHAR
) ### Response: SELECT ... |
when was patient 002-70965 last prescribed with nss infusion and protonix at the same time since 151 months ago? | 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 t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'nss infusion' AND patient.uniquepid = '002-70965' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-15... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was patient 002-70965 last prescribed with nss infusion and protonix at the same time since 151 months ago? ### Input: ... |
how many patients whose admission year is less than 2194 and procedure long title is angiocardiography of right heart structures? | 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.admityear < "2194" AND procedures.long_title = "Angiocardiography of right heart structures" | Below are sql tables 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 year is less than 2194 and procedure long title is angiocardiography of right heart struct... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the sum of employee_id , and group by attribute job_id in a bar chart, rank y axis in descending order. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
on this month/28 what was the arterial bp mean maximum value of patient 28447? | 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
... | SELECT MAX(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 = 28447)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | Below are sql tables 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 this month/28 what was the arterial bp mean maximum value of patient 28447? ### Input: CREATE TABLE chartevents (
row... |
find the number of russian speaking patients who are diagnosed with proteus infection nos. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.language = "RUSS" AND diagnoses.short_title = "Proteus infection NOS" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of russian speaking patients who are diagnosed with proteus infection nos. ### Input: CREATE TABLE demograph... |
Show me a pie chart for how many songs were released for each format? | CREATE TABLE genre (
g_name varchar2(20),
rating varchar2(10),
most_popular_in varchar2(50)
)
CREATE TABLE song (
song_name varchar2(50),
artist_name varchar2(50),
country varchar2(20),
f_id number(10),
genre_is varchar2(20),
rating number(10),
languages varchar2(20),
releas... | SELECT formats, COUNT(*) FROM files GROUP BY formats | Below are sql tables 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 pie chart for how many songs were released for each format? ### Input: CREATE TABLE genre (
g_name varchar2(20... |
What Week 4 has a Week 2 of samantha speer? | CREATE TABLE table_name_62 (
week_4 VARCHAR,
week_2 VARCHAR
) | SELECT week_4 FROM table_name_62 WHERE week_2 = "samantha speer" | Below are sql tables 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 Week 4 has a Week 2 of samantha speer? ### Input: CREATE TABLE table_name_62 (
week_4 VARCHAR,
week_2 VARCHAR
)... |
How many registed students do each course have? List course name and the number of their registered students, display X in descending order. | CREATE TABLE Courses (
course_id VARCHAR(100),
course_name VARCHAR(120),
course_description VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Student_Course_Registrations (
student_id INTEGER,
course_id INTEGER,
registration_date DATETIME
)
CREATE TABLE People (
person_id INTEGER... | SELECT course_name, COUNT(*) FROM Students AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id ORDER BY course_name DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many registed students do each course have? List course name and the number of their registered students, display X in d... |
What is the highest ranked nation with 15 silver medals and no more than 47 total? | CREATE TABLE table_33568 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Rank") FROM table_33568 WHERE "Silver" = '15' AND "Total" < '47' | Below are sql tables 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 ranked nation with 15 silver medals and no more than 47 total? ### Input: CREATE TABLE table_33568 (
... |
What safari has 2012 q4 as the period? | CREATE TABLE table_name_58 (
safari VARCHAR,
period VARCHAR
) | SELECT safari FROM table_name_58 WHERE period = "2012 q4" | Below are sql tables 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 safari has 2012 q4 as the period? ### Input: CREATE TABLE table_name_58 (
safari VARCHAR,
period VARCHAR
) ### ... |
For those employees who did not have any job in the past, draw a bar chart about the distribution of job_id and the sum of department_id , and group by attribute job_id, rank by the total number of department id in asc please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, draw a bar chart about the distribution of job_id and the sum of d... |
For all employees who have the letters D or S in their first name, draw a scatter chart about the correlation between salary and commission_pct . | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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),
CO... | SELECT SALARY, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | Below are sql tables 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, draw a scatter chart about the correlation between salary... |
when was the first time that patient 004-86136 got a urine output today? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CRE... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-86136')) AND intakeoutput.cellpath LIKE '%output%... | Below are sql tables 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 the first time that patient 004-86136 got a urine output today? ### Input: CREATE TABLE allergy (
allergyid num... |
how many female patients had urgent hospital admission? | 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 WHERE demographic.gender = "F" AND demographic.admission_type = "URGENT" | Below are sql tables 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 female patients had urgent hospital admission? ### Input: CREATE TABLE procedures (
subject_id text,
hadm_i... |
information on flights from PITTSBURGH to SAN FRANCISCO | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE month (
... | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: information on flights from PITTSBURGH to SAN FRANCISCO ### Input: CREATE TABLE restriction (
restriction_code text,
... |
What was the date of the match with a winning score of 7 (67-72-69-69=277)? | CREATE TABLE table_47391 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | SELECT "Date" FROM table_47391 WHERE "Winning score" = '–7 (67-72-69-69=277)' | Below are sql tables 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 date of the match with a winning score of 7 (67-72-69-69=277)? ### Input: CREATE TABLE table_47391 (
"Date"... |
count the number of patients whose ethnicity is black/african american and age is less than 81? | 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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.age < "81" | Below are sql tables 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 ethnicity is black/african american and age is less than 81? ### Input: CREATE TABLE proc... |
count the number of patients who have been on 3% normal saline intake. | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '3% normal saline' 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: count the number of patients who have been on 3% normal saline intake. ### Input: CREATE TABLE procedures_icd (
row_id n... |
what is the number of patients whose diagnoses short title is arthropathy nos-unspec and lab test fluid is blood? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Arthropathy NOS-unspec" AND lab.fluid = "Blood" | Below are sql tables 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 diagnoses short title is arthropathy nos-unspec and lab test fluid is blood? ### Input:... |
What was the purse when the trainer was Aidan O'Brien? | CREATE TABLE table_name_21 (
purse VARCHAR,
trainer VARCHAR
) | SELECT purse FROM table_name_21 WHERE trainer = "aidan o'brien" | Below are sql tables 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 purse when the trainer was Aidan O'Brien? ### Input: CREATE TABLE table_name_21 (
purse VARCHAR,
traine... |
what allergy does patient 018-118331 has in 01/this year? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartr... | SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-118331')) AND DATETIME(allergy.allergytime, 'start of year') = DATETI... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what allergy does patient 018-118331 has in 01/this year? ### Input: CREATE TABLE intakeoutput (
intakeoutputid number,
... |
Draw a bar chart about the distribution of All_Road and All_Games_Percent , and I want to display X in ascending order please. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Road | Below are sql tables 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 All_Road and All_Games_Percent , and I want to display X in ascending order pleas... |
What's the score for December of 30? | CREATE TABLE table_36128 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT "Score" FROM table_36128 WHERE "December" = '30' | Below are sql tables 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 for December of 30? ### Input: CREATE TABLE table_36128 (
"Game" real,
"December" real,
"Oppone... |
How many departments are in each school Show bar chart, and could you list by the x-axis from high to low? | CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE CO... | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT ORDER BY SCHOOL_CODE DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many departments are in each school Show bar chart, and could you list by the x-axis from high to low? ### Input: CREATE... |
show me a list of flights from DENVER to BALTIMORE on UA for 8 3 | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_dista... | 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 ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 3 AND date_day.month_number = 8 AND... | Below are sql tables 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 list of flights from DENVER to BALTIMORE on UA for 8 3 ### Input: CREATE TABLE date_day (
month_number int,
... |
Which Visiting Team has a Stadium of servus centre? | CREATE TABLE table_56761 (
"Date" text,
"Home Team" text,
"Score" text,
"Visiting Team" text,
"Stadium" text
) | SELECT "Visiting Team" FROM table_56761 WHERE "Stadium" = 'servus centre' | Below are sql tables 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 Visiting Team has a Stadium of servus centre? ### Input: CREATE TABLE table_56761 (
"Date" text,
"Home Team" t... |
what is minimum days of hospital stay of patients whose year of death is less than 2173? | 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 MIN(demographic.days_stay) FROM demographic WHERE demographic.dod_year < "2173.0" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is minimum days of hospital stay of patients whose year of death is less than 2173? ### Input: CREATE TABLE procedures ... |
Where did Richmond play? | CREATE TABLE table_78494 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_78494 WHERE "Away team" = 'richmond' | Below are sql tables 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 did Richmond play? ### Input: CREATE TABLE table_78494 (
"Home team" text,
"Home team score" text,
"Away t... |
Which the highest Bronze of czech republic with a Total smaller than 4? | CREATE TABLE table_14272 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Bronze") FROM table_14272 WHERE "Nation" = 'czech republic' AND "Total" < '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 the highest Bronze of czech republic with a Total smaller than 4? ### Input: CREATE TABLE table_14272 (
"Rank" tex... |
what is patient 017-101426's change in weight from the last value measured on the last hospital visit compared to the first value measured on the last hospital visit? | 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 intakeoutput (
intakeou... | SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-101426' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS N... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is patient 017-101426's change in weight from the last value measured on the last hospital visit compared to the first ... |
Compare the frequency of each type of bed by a bar chart, and I want to list by the y-axis in desc. | CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT bedType, COUNT(bedType) FROM Rooms WHERE decor = "traditional" GROUP BY bedType ORDER BY COUNT(bedType) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Compare the frequency of each type of bed by a bar chart, and I want to list by the y-axis in desc. ### Input: CREATE TABLE ... |
Which driver has 62 laps? | CREATE TABLE table_58304 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT "Driver" FROM table_58304 WHERE "Laps" = '62' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which driver has 62 laps? ### Input: CREATE TABLE table_58304 (
"Driver" text,
"Constructor" text,
"Laps" real,
... |
What is the average number of draws that have a total of 1 and a goal difference of 2:0? | CREATE TABLE table_67928 (
"Wins" real,
"Draws" real,
"Losses" real,
"Goal difference" text,
"Total" real
) | SELECT AVG("Draws") FROM table_67928 WHERE "Total" = '1' AND "Goal difference" = '2:0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average number of draws that have a total of 1 and a goal difference of 2:0? ### Input: CREATE TABLE table_67928... |
When did an away team score 7.8 (50)? | CREATE TABLE table_33243 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_33243 WHERE "Away team score" = '7.8 (50)' | Below are sql tables 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 an away team score 7.8 (50)? ### Input: CREATE TABLE table_33243 (
"Home team" text,
"Home team score" text... |
For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the job_id , and group by attribute job_id by a bar chart, and display by the the average of manager id in asc please. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY AVG(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: For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the jo... |
when did patient 021-80293 get mcv lab test for the last time in this month? | 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 medication (
medication... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-80293')) AND lab.labname = 'mcv' AND DATETIME(lab.labresulttime, 'start of mont... | Below are sql tables 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 021-80293 get mcv lab test for the last time in this month? ### Input: CREATE TABLE microlab (
microlab... |
What away has toronto downtown dingos as the home? | CREATE TABLE table_name_71 (
away VARCHAR,
home VARCHAR
) | SELECT away FROM table_name_71 WHERE home = "toronto downtown dingos" | Below are sql tables 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 away has toronto downtown dingos as the home? ### Input: CREATE TABLE table_name_71 (
away VARCHAR,
home VARCHA... |
what is the date when the competition is 1996 tiger cup and the result is drew? | CREATE TABLE table_63979 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Date" FROM table_63979 WHERE "Competition" = '1996 tiger cup' AND "Result" = 'drew' | Below are sql tables 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 when the competition is 1996 tiger cup and the result is drew? ### Input: CREATE TABLE table_63979 (
"D... |
What was the event for round 1 against Lance Wipf? | CREATE TABLE table_46181 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Location" text
) | SELECT "Event" FROM table_46181 WHERE "Round" = '1' AND "Opponent" = 'lance wipf' | Below are sql tables 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 event for round 1 against Lance Wipf? ### Input: CREATE TABLE table_46181 (
"Res." text,
"Record" text,... |
Which Venue has a Home team of essendon? | CREATE TABLE table_77837 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_77837 WHERE "Home team" = 'essendon' | Below are sql tables 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 Venue has a Home team of essendon? ### Input: CREATE TABLE table_77837 (
"Home team" text,
"Home team score" t... |
What is the Standings of Eintracht Braunschweig? | CREATE TABLE table_name_28 (
standings VARCHAR,
champions VARCHAR
) | SELECT standings FROM table_name_28 WHERE champions = "eintracht braunschweig" | Below are sql tables 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 Standings of Eintracht Braunschweig? ### Input: CREATE TABLE table_name_28 (
standings VARCHAR,
champion... |
Show the proportion of the number of customers for each payment method code in a pie chart. | CREATE TABLE Products (
product_id INTEGER,
product_type_code VARCHAR(15),
product_name VARCHAR(80),
product_price DOUBLE
)
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Addresses (
address_id IN... | SELECT payment_method_code, COUNT(payment_method_code) FROM Customers GROUP BY payment_method_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: Show the proportion of the number of customers for each payment method code in a pie chart. ### Input: CREATE TABLE Products... |
What papers talk about Reinforcement Learning ? | CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
pape... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Reinforcement Learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | Below are sql tables 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 papers talk about Reinforcement Learning ? ### Input: CREATE TABLE paperfield (
fieldid int,
paperid int
)
CRE... |
in 2102 what were the top five most common specimen tests? | 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 prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE STRFTIME('%y', microbiologyevents.charttime) = '2102' GROUP BY microbiologyevents.spec_type_desc) 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: in 2102 what were the top five most common specimen tests? ### Input: CREATE TABLE chartevents (
row_id number,
subj... |
how many patients whose diagnoses short title is alzheimer's disease and drug route is po/ng? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Alzheimer's disease" AND prescriptions.route = "PO/NG" | Below are sql tables 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 diagnoses short title is alzheimer's disease and drug route is po/ng? ### Input: CREATE TABLE diagno... |
what are the maximum total costs of a hospital involving acute respiratory distress until 1 year ago? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute respiratory distress')) AND DATETIME(c... | Below are sql tables 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 maximum total costs of a hospital involving acute respiratory distress until 1 year ago? ### Input: CREATE TABL... |
What are the names of KINESLGY classes that are considered to be Other ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester i... | SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE course.department LIKE '%KINESLGY%' AND program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_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: What are the names of KINESLGY classes that are considered to be Other ? ### Input: CREATE TABLE program (
program_id in... |
the spouse will have to score 27 or higher on the mmse. | CREATE TABLE table_train_116 (
"id" int,
"mini_mental_state_examination_mmse" int,
"hemoglobin_a1c_hba1c" float,
"body_weight" float,
"hepatic_disease" bool,
"geriatric_depression_scale_gds" int,
"NOUSE" float
) | SELECT * FROM table_train_116 WHERE mini_mental_state_examination_mmse >= 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: the spouse will have to score 27 or higher on the mmse. ### Input: CREATE TABLE table_train_116 (
"id" int,
"mini_me... |
What country scored 67? | CREATE TABLE table_name_76 (
country VARCHAR,
score VARCHAR
) | SELECT country FROM table_name_76 WHERE score = 67 | Below are sql tables 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 country scored 67? ### Input: CREATE TABLE table_name_76 (
country VARCHAR,
score VARCHAR
) ### Response: SELEC... |
How many u.s. viewers (million) have a series # 83? | CREATE TABLE table_25123 (
"Series #" real,
"Season #" real,
"Episode title" text,
"Written by" text,
"Directed by" text,
"U.S. viewers (millions)" text,
"Original air date" text
) | SELECT "U.S. viewers (millions)" FROM table_25123 WHERE "Series #" = '83' | Below are sql tables 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 u.s. viewers (million) have a series # 83? ### Input: CREATE TABLE table_25123 (
"Series #" real,
"Season #... |
Which home team played at Princes Park? | CREATE TABLE table_name_67 (
home_team VARCHAR,
venue VARCHAR
) | SELECT home_team FROM table_name_67 WHERE venue = "princes park" | Below are sql tables 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 played at Princes Park? ### Input: CREATE TABLE table_name_67 (
home_team VARCHAR,
venue VARCHAR
) #... |
Bar graph to show total number of cloud cover from different date | CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_... | SELECT date, SUM(cloud_cover) FROM weather | Below are sql tables 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 graph to show total number of cloud cover from different date ### Input: CREATE TABLE status (
station_id INTEGER,
... |
what was the last time that patient 25523 had the minimum arterial bp mean on 06/09/2104? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
... | SELECT chartevents.charttime 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 = 25523)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the last time that patient 25523 had the minimum arterial bp mean on 06/09/2104? ### Input: CREATE TABLE diagnoses_... |
how many days have passed since the first time that patient 12726 had a .9% normal saline intake on the current icu visit? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) 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 = 12726) AND icustays.outtime 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 days have passed since the first time that patient 12726 had a .9% normal saline intake on the current icu visit? #... |
Which home team had a crowd larger than 20,822 at VFL Park? | CREATE TABLE table_56901 (
"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_56901 WHERE "Crowd" > '20,822' AND "Venue" = 'vfl park' | Below are sql tables 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 had a crowd larger than 20,822 at VFL Park? ### Input: CREATE TABLE table_56901 (
"Home team" text,
... |
provide the number of patients whose ethnicity is black/cape verdean and drug type is base? | 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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND prescriptions.drug_type = "BASE" | Below are sql tables 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 ethnicity is black/cape verdean and drug type is base? ### Input: CREATE TABLE procedur... |
What is Label, when Region is Japan? | CREATE TABLE table_48242 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Label" FROM table_48242 WHERE "Region" = 'japan' | Below are sql tables 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 Label, when Region is Japan? ### Input: CREATE TABLE table_48242 (
"Region" text,
"Date" text,
"Label" t... |
What is the home team score at windy hill? | CREATE TABLE table_name_16 (
home_team VARCHAR,
venue VARCHAR
) | SELECT home_team AS score FROM table_name_16 WHERE venue = "windy hill" | Below are sql tables 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 home team score at windy hill? ### Input: CREATE TABLE table_name_16 (
home_team VARCHAR,
venue VARCHAR
... |
Name the most wins for sport colombia | CREATE TABLE table_18703133_1 (
wins INTEGER,
team VARCHAR
) | SELECT MAX(wins) FROM table_18703133_1 WHERE team = "Sport Colombia" | Below are sql tables 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 most wins for sport colombia ### Input: CREATE TABLE table_18703133_1 (
wins INTEGER,
team VARCHAR
) ### Re... |
what is the yearly minimum amount of bilirubin, total, ascites patient 31243 has since 2104? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
chart... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31243) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total, ascites') AND STRFTIME('%y', labevents.charttime) >= '210... | Below are sql tables 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 yearly minimum amount of bilirubin, total, ascites patient 31243 has since 2104? ### Input: CREATE TABLE transfe... |
resting blood pressure greater than or equal to 160 / 100 mm hg | CREATE TABLE table_train_171 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hepatitis_c" bool,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"triglyceride_tg" float,
"NOUSE" float
) | SELECT * FROM table_train_171 WHERE (systolic_blood_pressure_sbp >= 160 OR diastolic_blood_pressure_dbp >= 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: resting blood pressure greater than or equal to 160 / 100 mm hg ### Input: CREATE TABLE table_train_171 (
"id" int,
... |
what was the marital status of patient 45321 on their first hospital visit? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,... | SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 45321 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime 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 was the marital status of patient 45321 on their first hospital visit? ### Input: CREATE TABLE patients (
row_id nu... |
what DL flights are available from PITTSBURGH to SAN FRANCISCO | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what DL flights are available from PITTSBURGH to SAN FRANCISCO ### Input: CREATE TABLE restriction (
restriction_code te... |
For those records from the products and each product's manufacturer, show me about the distribution of founder and the sum of revenue , and group by attribute founder in a bar chart, and display y-axis in asc order please. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Revenue) | Below are sql tables 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 records from the products and each product's manufacturer, show me about the distribution of founder and the sum o... |
what is the total amount of input patient 031-3355 had received? | 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(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND intakeoutput.cellpath LIKE '%int... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total amount of input patient 031-3355 had received? ### Input: CREATE TABLE cost (
costid number,
uniqu... |
What are the number of the descriptions of the categories that products with product descriptions that contain the letter t are in?, display by the total number in desc. | CREATE TABLE Ref_Product_Categories (
product_category_code VARCHAR(15),
product_category_description VARCHAR(80),
unit_of_measure VARCHAR(20)
)
CREATE TABLE Products (
product_id INTEGER,
color_code VARCHAR(15),
product_category_code VARCHAR(15),
product_name VARCHAR(80),
typical_buyin... | 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 | Below are sql tables 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 number of the descriptions of the categories that products with product descriptions that contain the letter t ... |
What are the dominant religions in the place with a population of 83? | CREATE TABLE table_2562572_27 (
dominant_religion__2002_ VARCHAR,
population__2011_ VARCHAR
) | SELECT dominant_religion__2002_ FROM table_2562572_27 WHERE population__2011_ = "83" | Below are sql tables 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 dominant religions in the place with a population of 83? ### Input: CREATE TABLE table_2562572_27 (
dominan... |
what is the least silver when gold is 0? | CREATE TABLE table_65436 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MIN("Silver") FROM table_65436 WHERE "Gold" < '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the least silver when gold is 0? ### Input: CREATE TABLE table_65436 (
"Rank" text,
"Nation" text,
"Gold... |
what is the average ga cup goals when the league cup apps is 2, the fa cup apps is 3 and the league goals is 3? | CREATE TABLE table_65281 (
"Name" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"FLT Apps" text,
"FLT Goals" real,
"Total Apps" text,
"Total Goals" real
) | SELECT AVG("FA Cup Goals") FROM table_65281 WHERE "League Cup Apps" = '2' AND "FA Cup Apps" = '3' AND "League Goals" = '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 is the average ga cup goals when the league cup apps is 2, the fa cup apps is 3 and the league goals is 3? ### Input: C... |
give me the number of patients whose year of death is less than or equal to 2131 and lab test name is white blood cells? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2131.0" AND lab.label = "White Blood Cells" | Below are sql tables 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 year of death is less than or equal to 2131 and lab test name is white blood cells? ###... |
what was first procedure time of patient 013-11660 during this hospital encounter? | 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 treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-11660' AND patient.hospitaldischargetime IS NULL)) ORDER BY t... | Below are sql tables 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 first procedure time of patient 013-11660 during this hospital encounter? ### Input: CREATE TABLE patient (
uni... |
i want to go between BOSTON and WASHINGTON early in the morning | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE flight (
aircraft_code_sequence 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHIN... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i want to go between BOSTON and WASHINGTON early in the morning ### Input: CREATE TABLE dual_carrier (
main_airline varc... |
A bar chart for what are the number of the descriptions of all the project outcomes?, list from low to high by the X. | CREATE TABLE Documents (
document_id INTEGER,
document_type_code VARCHAR(10),
grant_id INTEGER,
sent_date DATETIME,
response_received_date DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Organisation_Types (
organisation_type VARCHAR(10),
organisation_type_description VARCHAR(255)
)... | SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY outcome_description | Below are sql tables 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 all the project outcomes?, list from low to high by the X. ### In... |
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of hire_date and the amount of hire_date bin hire_date by time. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(4... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | Below are sql tables 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, a bar chart shows the di... |
how many patients were prescribed lipitor in the same hospital visit after they had undergone a analgesics - narcotic analgesic, until 2102? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'analgesics - narcotic analgesic' AND STRFTIME('%y', treatment.treatmentti... | Below are sql tables 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 lipitor in the same hospital visit after they had undergone a analgesics - narcotic analge... |
Return a bar chart about the distribution of Date_of_Birth and Height , and order Y-axis from high to low order. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Date_of_Birth, Height FROM people ORDER BY Height DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of Date_of_Birth and Height , and order Y-axis from high to low order. ### Input: ... |
How many people were in the crowd with the away team being collingwood? | CREATE TABLE table_78421 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT COUNT("Crowd") FROM table_78421 WHERE "Away team" = 'collingwood' | Below are sql tables 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 people were in the crowd with the away team being collingwood? ### Input: CREATE TABLE table_78421 (
"Home team... |
Top 100 Highest reputation holder from Ahmedabad. | CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", DisplayName, Id, Reputation FROM Users WHERE LOWER(Location) LIKE '%gujarat%' ORDER BY Reputation DESC LIMIT 1000 | Below are sql tables 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 100 Highest reputation holder from Ahmedabad. ### Input: CREATE TABLE ReviewTaskStates (
Id number,
Name text,
... |
when did the last microbiology test take place for patient 26313 in 03/last year? | CREATE TABLE procedures_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 d_icd_diagnoses (
row_id number,
icd9_code text,
... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26313) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', microbiolo... | Below are sql tables 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 the last microbiology test take place for patient 26313 in 03/last year? ### Input: CREATE TABLE procedures_icd (
... |
Return a bar chart about the distribution of meter_300 and ID , could you display in descending by the X-axis? | 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 stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimme... | SELECT meter_300, ID FROM swimmer ORDER BY meter_300 DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of meter_300 and ID , could you display in descending by the X-axis? ### Input: CR... |
What team is based at junction oval? | CREATE TABLE table_52085 (
"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_52085 WHERE "Venue" = 'junction oval' | Below are sql tables 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 is based at junction oval? ### Input: CREATE TABLE table_52085 (
"Home team" text,
"Home team score" text,... |
what was the amount of total output that patient 25312 had received on the first intensive care unit visit? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_id... | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25312) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime 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 was the amount of total output that patient 25312 had received on the first intensive care unit visit? ### Input: CREAT... |
WHAT IS THE NUMBER OF Attendance WITH A RECORD 94 36 | CREATE TABLE table_57722 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text,
"Attendance" real,
"Record" text
) | SELECT AVG("Attendance") FROM table_57722 WHERE "Save" = '–' AND "Record" = '94–36' | Below are sql tables 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 Attendance WITH A RECORD 94 36 ### Input: CREATE TABLE table_57722 (
"Date" text,
"Opponent" t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.