instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
List the number of courses in year 2008 for each instructor in a bar chart. | CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE instructor (
ID var... | SELECT name, COUNT(name) FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.ID = T3.ID WHERE year = 2008 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: List the number of courses in year 2008 for each instructor in a bar chart. ### Input: CREATE TABLE advisor (
s_ID varch... |
What was the result of the los angeles rams game? | CREATE TABLE table_9746 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Result" FROM table_9746 WHERE "Opponent" = 'los angeles rams' | Below are sql tables 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 result of the los angeles rams game? ### Input: CREATE TABLE table_9746 (
"Week" real,
"Date" text,
... |
does any airline have a JET flight between PITTSBURGH and BALTIMORE | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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,
depart... | SELECT DISTINCT flight.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (aircraft.propulsion = 'JET' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND equipment_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: does any airline have a JET flight between PITTSBURGH and BALTIMORE ### Input: CREATE TABLE ground_service (
city_code t... |
is TW flight 497 766 from ST. PETERSBURG to MILWAUKEE with 1 stop available tomorrow morning | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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,
depart... | SELECT DISTINCT FLIGHT_0.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 AS FLIGHT_0, flight AS FLIGHT_1, flight AS FLIGHT_2, flight_leg AS FLIGHT_LEG_0, flight_leg AS FLIGHT_LEG_1 WHERE ((((((date_day.day_number = 20 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: is TW flight 497 766 from ST. PETERSBURG to MILWAUKEE with 1 stop available tomorrow morning ### Input: CREATE TABLE ground_... |
How many votes did Kerry get in the county that gave Bush 189,605 votes? | CREATE TABLE table_name_46 (
kerry_number INTEGER,
bush_number VARCHAR
) | SELECT AVG(kerry_number) FROM table_name_46 WHERE bush_number = 189 OFFSET 605 | Below are sql tables 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 votes did Kerry get in the county that gave Bush 189,605 votes? ### Input: CREATE TABLE table_name_46 (
kerry_n... |
In next semester when is 480 offered ? | CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number ... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe... | Below are sql tables 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 next semester when is 480 offered ? ### Input: CREATE TABLE offering_instructor (
offering_instructor_id int,
off... |
For those employees who was hired before 2002-06-21, find hire_date and the sum of employee_id bin hire_date by weekday, and visualize them by a bar chart. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-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: For those employees who was hired before 2002-06-21, find hire_date and the sum of employee_id bin hire_date by weekday, and... |
what is the total number of representatives from the democratic party ? | CREATE TABLE table_203_16 (
id number,
"name" text,
"took office" text,
"left office" text,
"party" text,
"district residence" text,
"notes" text
) | SELECT COUNT(*) FROM table_203_16 WHERE "party" = 'democratic' | Below are sql tables 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 representatives from the democratic party ? ### Input: CREATE TABLE table_203_16 (
id number... |
how many patients whose days of hospital stay is greater than 1 and drug name is timolol maleate 0.5%? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "1" AND prescriptions.drug = "Timolol Maleate 0.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: how many patients whose days of hospital stay is greater than 1 and drug name is timolol maleate 0.5%? ### Input: CREATE TAB... |
Return a bar chart about the number bookings for each apartment number, and rank from high to low by the x-axis. | CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartments (
apt_id INTEGER,
... | SELECT apt_number, COUNT(apt_number) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id GROUP BY apt_number ORDER BY apt_number 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 number bookings for each apartment number, and rank from high to low by the x-axis. ### Input: ... |
On what date was the attendance of the crowd 78,431? | CREATE TABLE table_52231 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Date" FROM table_52231 WHERE "Attendance" = '78,431' | Below are sql tables 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 what date was the attendance of the crowd 78,431? ### Input: CREATE TABLE table_52231 (
"Week" real,
"Date" text,... |
For all employees who have the letters D or S in their first name, find hire_date and the sum of employee_id bin hire_date by weekday, and visualize them by a bar chart, show y axis in desc order. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 departments (
DEPARTME... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' 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 all employees who have the letters D or S in their first name, find hire_date and the sum of employee_id bin hire_date b... |
For those employees who did not have any job in the past, a bar chart shows the distribution of job_id and the average of salary , and group by attribute job_id. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, a bar chart shows the distribution of job_id and the average of sa... |
What are the numbers of wines for different grapes Plot them as bar chart, show by the the total number in ascending. | CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No... | SELECT Grape, COUNT(*) FROM wine GROUP BY Grape 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: What are the numbers of wines for different grapes Plot them as bar chart, show by the the total number in ascending. ### In... |
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. | 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 | Below are sql tables 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... |
the number of intensive care unit visits that patient 035-2205 had during this year. | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2205') AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | Below are sql tables 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 number of intensive care unit visits that patient 035-2205 had during this year. ### Input: CREATE TABLE cost (
cost... |
how many patients whose admission year is less than 2184 and diagnoses long title is seroma complicating a procedure? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2184" AND diagnoses.long_title = "Seroma complicating a procedure" | Below are sql tables 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 2184 and diagnoses long title is seroma complicating a procedure? ### In... |
what are patient 25869's genders? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
value... | SELECT patients.gender FROM patients WHERE patients.subject_id = 25869 | Below are sql tables 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 patient 25869's genders? ### Input: CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id numbe... |
What is the most common prerequisite this semester ? | CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | SELECT COUNT(DISTINCT course_prerequisite.course_id), course.department, course.name, course.number FROM course, course_offering, course_prerequisite, semester WHERE course.course_id = course_offering.course_id AND course.course_id = course_prerequisite.pre_course_id AND course.department = 'EECS' AND semester.semester... | Below are sql tables 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 most common prerequisite this semester ? ### Input: CREATE TABLE program_requirement (
program_id int,
c... |
what is the number of patients on main type drug prescription who had diagnoses of angioneurotic edema, not elsewhere classified? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Angioneurotic edema, not elsewhere classified" AND prescriptions.drug_type = "MAIN" | Below are sql tables 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 on main type drug prescription who had diagnoses of angioneurotic edema, not elsewhere classi... |
What shows for 2009 when 2008 is A, 2012 is 1r, 2010 is q2, and 2011 is 2r? | CREATE TABLE table_65399 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2009" FROM table_65399 WHERE "2008" = 'a' AND "2012" = '1r' AND "2010" = 'q2' AND "2011" = '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 shows for 2009 when 2008 is A, 2012 is 1r, 2010 is q2, and 2011 is 2r? ### Input: CREATE TABLE table_65399 (
"Tourn... |
what was the first time patient 12927 had a maximum of hematocrit in this month? | 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 d_items (
row_id number,
itemid ... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12927) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hematocrit') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CUR... | Below are sql tables 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 first time patient 12927 had a maximum of hematocrit in this month? ### Input: CREATE TABLE procedures_icd (
... |
For each party, return the name of the party and the number of delegates from that party Plot them as bar chart, and sort bar from high to low order. | 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 T2.Party 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 each party, return the name of the party and the number of delegates from that party Plot them as bar chart, and sort ba... |
What was the score of the game that was played on a grass surface? | CREATE TABLE table_name_24 (
score VARCHAR,
surface VARCHAR
) | SELECT score FROM table_name_24 WHERE surface = "grass" | Below are sql tables 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 of the game that was played on a grass surface? ### Input: CREATE TABLE table_name_24 (
score VARCHAR... |
How many courses for each subject? Plot a bar chart, and list by the Y in asc please. | CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_des... | SELECT subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id 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: How many courses for each subject? Plot a bar chart, and list by the Y in asc please. ### Input: CREATE TABLE Student_Course... |
let me know the death status and days for which patient paul dunn was hospitalized. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Paul Dunn" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: let me know the death status and days for which patient paul dunn was hospitalized. ### Input: CREATE TABLE prescriptions (
... |
what is the number of patients whose death status is 0 and year of birth is less than 2083? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.dob_year < "2083" | Below are sql tables 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 death status is 0 and year of birth is less than 2083? ### Input: CREATE TABLE prescrip... |
was there a administration of electrolytes performed on patient 013-33898 in their current 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 COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-33898' AND patient.hospitaldischargetime IS NULL)) AND treatment.treatme... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: was there a administration of electrolytes performed on patient 013-33898 in their current hospital encounter? ### Input: CR... |
show me ground transportation in WESTCHESTER COUNTY | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airli... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'WESTCHESTER COUNTY' 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: show me ground transportation in WESTCHESTER COUNTY ### Input: CREATE TABLE code_description (
code varchar,
descrip... |
what is maximum days of hospital stay of patients whose primary disease is hypoxia? | 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 MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "HYPOXIA" | Below are sql tables 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 maximum days of hospital stay of patients whose primary disease is hypoxia? ### Input: CREATE TABLE demographic (
... |
Which venue has a Result of 1 0? | CREATE TABLE table_name_96 (
venue VARCHAR,
result VARCHAR
) | SELECT venue FROM table_name_96 WHERE result = "1–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: Which venue has a Result of 1 0? ### Input: CREATE TABLE table_name_96 (
venue VARCHAR,
result VARCHAR
) ### Respons... |
What was the tie number for the round against visiting opponent Newcastle United? | CREATE TABLE table_name_53 (
tie_no VARCHAR,
away_team VARCHAR
) | SELECT tie_no FROM table_name_53 WHERE away_team = "newcastle united" | Below are sql tables 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 tie number for the round against visiting opponent Newcastle United? ### Input: CREATE TABLE table_name_53 (
... |
How many people were in the crowd when the away team scored 15.18 (108)? | CREATE TABLE table_51915 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Crowd" FROM table_51915 WHERE "Away team score" = '15.18 (108)' | Below are sql tables 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 when the away team scored 15.18 (108)? ### Input: CREATE TABLE table_51915 (
"Home tea... |
give the number of patients whose admission year is before 2111 and lab test fluid is pleural. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2111" AND lab.fluid = "Pleural" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the number of patients whose admission year is before 2111 and lab test fluid is pleural. ### Input: CREATE TABLE diagn... |
provide the number of patients whose primary disease is congestive heart failure and admission year is less than 2155? | 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 = "CONGESTIVE HEART FAILURE" AND demographic.admityear < "2155" | Below are sql tables 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 primary disease is congestive heart failure and admission year is less than 2155? ### I... |
Top 1000 users from India. | CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%IND' 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 1000 users from India. ### Input: CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
... |
How many Touchdowns have Extra points larger than 0, and Points of 48? | CREATE TABLE table_37812 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | SELECT COUNT("Touchdowns") FROM table_37812 WHERE "Extra points" > '0' AND "Points" = '48' | Below are sql tables 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 Touchdowns have Extra points larger than 0, and Points of 48? ### Input: CREATE TABLE table_37812 (
"Player" te... |
What are the ids and details for all organizations that have grants of more than 6000 dollars Show bar chart, and could you order in descending by the total number? | CREATE TABLE Grants (
grant_id INTEGER,
organisation_id INTEGER,
grant_amount DECIMAL(19,4),
grant_start_date DATETIME,
grant_end_date DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Documents (
document_id INTEGER,
document_type_code VARCHAR(10),
grant_id INTEGER,
sent_date... | SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details ORDER BY T1.organisation_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: What are the ids and details for all organizations that have grants of more than 6000 dollars Show bar chart, and could you ... |
give the maximum days of hospital stay for patients who are born after 2053. | 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 procedures (
... | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.dob_year > "2053" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the maximum days of hospital stay for patients who are born after 2053. ### Input: CREATE TABLE lab (
subject_id te... |
What was the loss of the game when the record was 46-84? | CREATE TABLE table_34841 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Loss" FROM table_34841 WHERE "Record" = '46-84' | Below are sql tables 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 loss of the game when the record was 46-84? ### Input: CREATE TABLE table_34841 (
"Date" text,
"Opponen... |
provide the number of patients whose drug code is mago140 and lab test category is hematology. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "MAGO140" AND lab."CATEGORY" = "Hematology" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose drug code is mago140 and lab test category is hematology. ### Input: CREATE TABLE proce... |
For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time, and show Y-axis in desc order. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(DEPARTMENT_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum o... |
how many days have elapsed since patient 004-13127 last received a -monos lab test on their current hospital visit? | 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 patient (
uniquep... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '004-13127' AND patient.hospi... | Below are sql tables 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 elapsed since patient 004-13127 last received a -monos lab test on their current hospital visit? ### Inpu... |
What was the attendance of the game on December 13, 1970? | CREATE TABLE table_name_34 (
attendance VARCHAR,
date VARCHAR,
week VARCHAR
) | SELECT COUNT(attendance) FROM table_name_34 WHERE date = "december 13, 1970" AND week > 13 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance of the game on December 13, 1970? ### Input: CREATE TABLE table_name_34 (
attendance VARCHAR,
... |
Have I completed any hardware courses yet ? | CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN area ON student_record.course_id = area.course_id WHERE area.area LIKE '%hardware%' AND student_record.student_id = 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Have I completed any hardware courses yet ? ### Input: CREATE TABLE course_tags_count (
course_id int,
clear_grading... |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart, list in asc by the y axis. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS va... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(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 do not work in departments with managers that have ids between 100 and 200, give me the comparison a... |
Who is the opponent with a score of 5 4? | CREATE TABLE table_51776 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | SELECT "Opponent" FROM table_51776 WHERE "Score" = '5–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: Who is the opponent with a score of 5 4? ### Input: CREATE TABLE table_51776 (
"Date" text,
"Opponent" text,
"Sc... |
What was the smallist population in 2010? | CREATE TABLE table_261951_1 (
population__2010_ INTEGER
) | SELECT MIN(population__2010_) FROM table_261951_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 smallist population in 2010? ### Input: CREATE TABLE table_261951_1 (
population__2010_ INTEGER
) ### Respo... |
For all employees who have the letters D or S in their first name, find hire_date and the sum of manager_id bin hire_date by weekday, and visualize them by a bar chart, order from low to high by the y-axis. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(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 all employees who have the letters D or S in their first name, find hire_date and the sum of manager_id bin hire_date by... |
how many married patients had the procedure long title percutaneous abdominal drainage? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Percutaneous abdominal drainage" | Below are sql tables 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 married patients had the procedure long title percutaneous abdominal drainage? ### Input: CREATE TABLE lab (
su... |
What is the tie number for Middlesbrough? | CREATE TABLE table_name_46 (
tie_no VARCHAR,
home_team VARCHAR
) | SELECT tie_no FROM table_name_46 WHERE home_team = "middlesbrough" | Below are sql tables 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 tie number for Middlesbrough? ### Input: CREATE TABLE table_name_46 (
tie_no VARCHAR,
home_team VARCHAR
... |
Which league goals has FA cup apps of 2? | CREATE TABLE table_31788 (
"Division" text,
"League Apps" real,
"League Goals" real,
"FA Cup Apps" real,
"FA Cup Goals" real,
"Total Apps" real,
"Total Goals" real
) | SELECT "League Goals" FROM table_31788 WHERE "FA Cup Apps" = '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: Which league goals has FA cup apps of 2? ### Input: CREATE TABLE table_31788 (
"Division" text,
"League Apps" real,
... |
What is the name of the county with the greatest population? | CREATE TABLE city (
city_id number,
county_id number,
name text,
white number,
black number,
amerindian number,
asian number,
multiracial number,
hispanic number
)
CREATE TABLE county_public_safety (
county_id number,
name text,
population number,
police_officers num... | SELECT name FROM county_public_safety ORDER BY population 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 is the name of the county with the greatest population? ### Input: CREATE TABLE city (
city_id number,
county_i... |
What was the result for the best musical revival category? | CREATE TABLE table_37962 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
) | SELECT "Result" FROM table_37962 WHERE "Category" = 'best musical revival' | Below are sql tables 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 result for the best musical revival category? ### Input: CREATE TABLE table_37962 (
"Year" real,
"Award... |
How many gold are a rank 1 and larger than 16? | CREATE TABLE table_80445 (
"Rank" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Gold") FROM table_80445 WHERE "Rank" = '1' AND "Total" > '16' | Below are sql tables 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 gold are a rank 1 and larger than 16? ### Input: CREATE TABLE table_80445 (
"Rank" text,
"Gold" real,
"... |
... my posts that have links to other posts. | CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,... | SELECT Id AS "post_link", CreationDate FROM Posts WHERE OwnerUserId = '##UserID##' AND Body LIKE '%http%//%' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: ... my posts that have links to other posts. ### Input: CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId... |
What is the Ti no of the Walsall Home game? | CREATE TABLE table_name_38 (
tie_no VARCHAR,
home_team VARCHAR
) | SELECT tie_no FROM table_name_38 WHERE home_team = "walsall" | Below are sql tables 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 Ti no of the Walsall Home game? ### Input: CREATE TABLE table_name_38 (
tie_no VARCHAR,
home_team VARCHA... |
tell me the cost of a lab bilirubin, total, body fluid test? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'labevents' AND cost.event_id IN (SELECT labevents.row_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, total, body fluid')) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the cost of a lab bilirubin, total, body fluid test? ### Input: CREATE TABLE admissions (
row_id number,
sub... |
what is the lowest crowd at kardinia park | CREATE TABLE table_58066 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_58066 WHERE "Venue" = 'kardinia 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: what is the lowest crowd at kardinia park ### Input: CREATE TABLE table_58066 (
"Home team" text,
"Home team score" ... |
Name the Home captain for venue of the oval | CREATE TABLE table_70120 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) | SELECT "Home captain" FROM table_70120 WHERE "Venue" = 'the 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: Name the Home captain for venue of the oval ### Input: CREATE TABLE table_70120 (
"Date" text,
"Home captain" text,
... |
What date has the format of CD and catalog of alca-274? | CREATE TABLE table_name_72 (
date VARCHAR,
format VARCHAR,
catalog VARCHAR
) | SELECT date FROM table_name_72 WHERE format = "cd" AND catalog = "alca-274" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date has the format of CD and catalog of alca-274? ### Input: CREATE TABLE table_name_72 (
date VARCHAR,
format... |
Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL? | CREATE TABLE table_1473672_3 (
college_junior_club_team VARCHAR,
nhl_team VARCHAR
) | SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = "Buffalo Sabres" | Below are sql tables 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 college/junior/club team did the player play on that played for the Buffalo Sabres in NHL? ### Input: CREATE TABLE tab... |
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, and rank by the y-axis in asc. | 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 JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(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, visualize a bar chart about the distribution of job_id and the sum... |
what is icu stay id of subject id 3343? | 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 prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "3343" | Below are sql tables 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 icu stay id of subject id 3343? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_... |
What iwas the attendance of the game that took place on december 6, 1998? | CREATE TABLE table_8742 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_8742 WHERE "Date" = 'december 6, 1998' | Below are sql tables 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 iwas the attendance of the game that took place on december 6, 1998? ### Input: CREATE TABLE table_8742 (
"Week" re... |
Visualize a bar chart for how many assets can each parts be used in? List the part name and the number, and I want to list Y-axis from high to low order. | CREATE TABLE Fault_Log (
fault_log_entry_id INTEGER,
asset_id INTEGER,
recorded_by_staff_id INTEGER,
fault_log_entry_datetime DATETIME,
fault_description VARCHAR(255),
other_fault_details VARCHAR(255)
)
CREATE TABLE Asset_Parts (
asset_id INTEGER,
part_id INTEGER
)
CREATE TABLE Staff (... | SELECT part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name 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: Visualize a bar chart for how many assets can each parts be used in? List the part name and the number, and I want to list Y... |
What was the location of the bout that lasted 5:00 and led to a 6-2-1 record? | CREATE TABLE table_37136 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Location" FROM table_37136 WHERE "Time" = '5:00' AND "Record" = '6-2-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 location of the bout that lasted 5:00 and led to a 6-2-1 record? ### Input: CREATE TABLE table_37136 (
"Res... |
Name who wrote the episode when the viewers was 1.81 | CREATE TABLE table_15584067_7 (
written_by VARCHAR,
us_viewers__million_ VARCHAR
) | SELECT written_by FROM table_15584067_7 WHERE us_viewers__million_ = "1.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: Name who wrote the episode when the viewers was 1.81 ### Input: CREATE TABLE table_15584067_7 (
written_by VARCHAR,
... |
What is the name of the venue that away team footscray played at? | CREATE TABLE table_56963 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_56963 WHERE "Away team" = 'footscray' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the venue that away team footscray played at? ### Input: CREATE TABLE table_56963 (
"Home team" text... |
provide the number of patients whose admission type is emergency and drug name is sodium polystyrene sulfonate? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Sodium Polystyrene Sulfonate" | Below are sql tables 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 admission type is emergency and drug name is sodium polystyrene sulfonate? ### Input: C... |
what is the number of patients whose drug name is sulfameth/trimethoprim suspension? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sulfameth/Trimethoprim Suspension" | Below are sql tables 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 drug name is sulfameth/trimethoprim suspension? ### Input: CREATE TABLE lab (
subje... |
severe renal insufficiency ( creatinine clearance < 30 ml / min ) | CREATE TABLE table_test_26 (
"id" int,
"bleeding" int,
"left_ventricular_ejection_fraction_lvef" int,
"left_main_coronary_artery_disease" bool,
"uncontrolled_diabetes" bool,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hepatitis_b_infection" bool,
"renal_disease" bool,
"u... | SELECT * FROM table_test_26 WHERE renal_disease = 1 OR creatinine_clearance_cl < 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: severe renal insufficiency ( creatinine clearance < 30 ml / min ) ### Input: CREATE TABLE table_test_26 (
"id" int,
... |
how many patients of asian ethnicity are under 48 years of age? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "48" | Below are sql tables 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 of asian ethnicity are under 48 years of age? ### Input: CREATE TABLE demographic (
subject_id text,
... |
what are the five most common microbiology tests that patients had within 2 months after receiving colonoscopy the previous year? | 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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_ty... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | Below are sql tables 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 five most common microbiology tests that patients had within 2 months after receiving colonoscopy the previous ... |
What is the Place of the Player with a Score of 69-72-72=213? | CREATE TABLE table_12501 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Place" FROM table_12501 WHERE "Score" = '69-72-72=213' | Below are sql tables 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 Place of the Player with a Score of 69-72-72=213? ### Input: CREATE TABLE table_12501 (
"Place" text,
"P... |
patients with severe renal impairment ( estimated creatinine clearance < 35 ml / min ) . | CREATE TABLE table_train_89 (
"id" int,
"chronically_uncontrolled_hypertension" bool,
"uncontrolled_diabetes" bool,
"hemoglobin_a1c_hba1c" float,
"body_weight" float,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"geriatric_depression_scale_gds" int,
"major_depression" bool,... | SELECT * FROM table_train_89 WHERE renal_disease = 1 OR creatinine_clearance_cl < 35 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patients with severe renal impairment ( estimated creatinine clearance < 35 ml / min ) . ### Input: CREATE TABLE table_train... |
What college did the player who was drafted by Calgary go to? | CREATE TABLE table_30269 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "College" FROM table_30269 WHERE "CFL Team" = 'Calgary' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What college did the player who was drafted by Calgary go to? ### Input: CREATE TABLE table_30269 (
"Pick #" real,
"... |
get the short title as well as the icd9 code of diagnoses for patient with patient id 55094. | 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 demographic ... | SELECT diagnoses.icd9_code, diagnoses.short_title FROM diagnoses WHERE diagnoses.subject_id = "55094" | Below are sql tables 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 short title as well as the icd9 code of diagnoses for patient with patient id 55094. ### Input: CREATE TABLE procedu... |
A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, and I want to sort in ascending by the y-axis. | CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
fam... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion) | Below are sql tables 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 completion dates of all the tests that have result 'Fail'?, and I want to sort in... |
What day(s) did they play on week 2? | CREATE TABLE table_20781 (
"Week" real,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Final score" text,
"Team record" text,
"Game site" text,
"Attendance" real
) | SELECT "Date" FROM table_20781 WHERE "Week" = '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 day(s) did they play on week 2? ### Input: CREATE TABLE table_20781 (
"Week" real,
"Date" text,
"Kickoff" t... |
What was the result of April 27's game? | CREATE TABLE table_name_21 (
score VARCHAR,
date VARCHAR
) | SELECT score FROM table_name_21 WHERE date = "april 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: What was the result of April 27's game? ### Input: CREATE TABLE table_name_21 (
score VARCHAR,
date VARCHAR
) ### Re... |
What is the record when they play the canucks and have under 98 points? | CREATE TABLE table_53804 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text,
"Arena" text,
"Points" real
) | SELECT "Record" FROM table_53804 WHERE "Points" < '98' AND "Opponent" = 'canucks' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the record when they play the canucks and have under 98 points? ### Input: CREATE TABLE table_53804 (
"Date" tex... |
The district North Carolina 10 have what candidates? | CREATE TABLE table_3608 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | SELECT "Candidates" FROM table_3608 WHERE "District" = 'North Carolina 10' | Below are sql tables 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 district North Carolina 10 have what candidates? ### Input: CREATE TABLE table_3608 (
"District" text,
"Incumben... |
What is the minimum number of members Europe had at the time Africa had 7375139? | CREATE TABLE table_22853 (
"Year" real,
"Worldwide" real,
"Africa" real,
"America" real,
"Asia" real,
"Australia" real,
"Europe" real
) | SELECT MIN("Europe") FROM table_22853 WHERE "Africa" = '7375139' | Below are sql tables 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 minimum number of members Europe had at the time Africa had 7375139? ### Input: CREATE TABLE table_22853 (
"... |
For those records from the products and each product's manufacturer, show me about the distribution of name and the average of manufacturer , and group by attribute name in a bar chart, and I want to order in desc by the y axis 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 T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Manufacturer 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 records from the products and each product's manufacturer, show me about the distribution of name and the average ... |
in the last year what are the five most commonly ordered specimen tests? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number... | SELECT t1.culturesite FROM (SELECT microlab.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microlab WHERE DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY microlab.culturesite) 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 the last year what are the five most commonly ordered specimen tests? ### Input: CREATE TABLE microlab (
microlabid n... |
What is the place of player peter oosterhuis, who has $7,500? | CREATE TABLE table_name_7 (
place VARCHAR,
money___$__ VARCHAR,
player VARCHAR
) | SELECT place FROM table_name_7 WHERE money___$__ = "7,500" AND player = "peter oosterhuis" | Below are sql tables 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 place of player peter oosterhuis, who has $7,500? ### Input: CREATE TABLE table_name_7 (
place VARCHAR,
... |
On which circuit does lorenzo bandini have the fastest lap as well as the pole position? | CREATE TABLE table_57912 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
) | SELECT "Circuit" FROM table_57912 WHERE "Fastest lap" = 'lorenzo bandini' AND "Pole position" = 'lorenzo bandini' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On which circuit does lorenzo bandini have the fastest lap as well as the pole position? ### Input: CREATE TABLE table_57912... |
against which opponent were there the most people in attendance ? | CREATE TABLE table_203_478 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
) | SELECT "opponent" FROM table_203_478 ORDER BY "attendance" 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: against which opponent were there the most people in attendance ? ### Input: CREATE TABLE table_203_478 (
id number,
... |
provide the number of patients who underwent procedure on single vessel and had inpatient hospital discharge. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.short_title = "Procedure-one vessel" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients who underwent procedure on single vessel and had inpatient hospital discharge. ### Input: CRE... |
What was the attendance at Kardinia Park? | CREATE TABLE table_name_63 (
crowd INTEGER,
venue VARCHAR
) | SELECT AVG(crowd) FROM table_name_63 WHERE venue = "kardinia 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: What was the attendance at Kardinia Park? ### Input: CREATE TABLE table_name_63 (
crowd INTEGER,
venue VARCHAR
) ###... |
Who was the away team at South Melbourne with a crowd size larger than 10,000. | CREATE TABLE table_53983 (
"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_53983 WHERE "Crowd" > '10,000' AND "Away team" = 'south 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: Who was the away team at South Melbourne with a crowd size larger than 10,000. ### Input: CREATE TABLE table_53983 (
"Ho... |
among the patients aged 60 or above in this year, what were the top five most frequent procedures? | 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 t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'st... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: among the patients aged 60 or above in this year, what were the top five most frequent procedures? ### Input: CREATE TABLE p... |
count the number of times during the last hospital encounter that patient 15107 had received inject/infus nesiritide procedures. | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost numb... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject/infus nesiritide') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15107 AND NOT admissions.di... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of times during the last hospital encounter that patient 15107 had received inject/infus nesiritide procedu... |
what is the fare going from BOSTON to DALLAS FORT WORTH one way on 11 7 | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
econ... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ... | Below are sql tables 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 fare going from BOSTON to DALLAS FORT WORTH one way on 11 7 ### Input: CREATE TABLE code_description (
code ... |
What are the number of rooms for each bed type Show bar chart, order by the total number from low to high. | 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(*) FROM Rooms GROUP BY bedType 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: What are the number of rooms for each bed type Show bar chart, order by the total number from low to high. ### Input: CREATE... |
What are the full names and ages for all female students whose sex is F? | CREATE TABLE allergy_type (
allergy text,
allergytype text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE has_allergy (
stuid number,
allergy text
) | SELECT fname, lname, age FROM student WHERE sex = 'F' | Below are sql tables 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 full names and ages for all female students whose sex is F? ### Input: CREATE TABLE allergy_type (
allergy ... |
how many patients died within the same month after being diagnosed until 2102 with drug overdose- general? | 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 t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'drug overdose- general') AS t1 GROUP BY t1.uniquepid HAVING MIN(... | Below are sql tables 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 died within the same month after being diagnosed until 2102 with drug overdose- general? ### Input: CREATE... |
How many patients are with asian ethnicity and with lab test name gentamicin? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "ASIAN" AND lab.label = "Gentamicin" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many patients are with asian ethnicity and with lab test name gentamicin? ### Input: CREATE TABLE procedures (
subje... |
what was the only nation to win less than 10 medals total ? | CREATE TABLE table_203_497 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "nation" FROM table_203_497 WHERE "total" < 10 | Below are sql tables 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 only nation to win less than 10 medals total ? ### Input: CREATE TABLE table_203_497 (
id number,
"rank... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.