instruction
stringlengths
11
303
input
stringlengths
38
5.51k
output
stringlengths
25
1.92k
text
stringlengths
321
6.52k
give me flights on AA from MILWAUKEE to PHOENIX
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE fare ( fare_id int, from_airport va...
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 = 'PHOENIX' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWA...
Below are sql tables 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 flights on AA from MILWAUKEE to PHOENIX ### Input: CREATE TABLE date_day ( month_number int, day_number int,...
What is the proportion of the minimum price of the rooms for each different decor? Show me a pie chart!
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 decor, MIN(basePrice) FROM Rooms GROUP BY decor
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the proportion of the minimum price of the rooms for each different decor? Show me a pie chart! ### Input: CREATE TA...
Who is the home team when the score is 81-80?
CREATE TABLE table_name_56 ( home VARCHAR, score VARCHAR )
SELECT home FROM table_name_56 WHERE score = "81-80"
Below are sql tables 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 home team when the score is 81-80? ### Input: CREATE TABLE table_name_56 ( home VARCHAR, score VARCHAR ) ...
What is the country that the player is from with +3 to par and score of 74-73=147?
CREATE TABLE table_46933 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT "Country" FROM table_46933 WHERE "To par" = '+3' AND "Score" = '74-73=147'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the country that the player is from with +3 to par and score of 74-73=147? ### Input: CREATE TABLE table_46933 ( ...
Bar chart of sum age from each nationality, could you rank X in asc order?
CREATE TABLE journalist ( journalist_ID int, Name text, Nationality text, Age text, Years_working int ) CREATE TABLE event ( Event_ID int, Date text, Venue text, Name text, Event_Attendance int ) CREATE TABLE news_report ( journalist_ID int, Event_ID int, Work_Type ...
SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality ORDER BY Nationality
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar chart of sum age from each nationality, could you rank X in asc order? ### Input: CREATE TABLE journalist ( journali...
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, visualize a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, could you show in desc by the X-axis please?
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NA...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID 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 ...
What are the maximum and minimum product prices for each product type?
CREATE TABLE department_stores ( dept_store_id number, dept_store_chain_id number, store_name text, store_address text, store_phone text, store_email text ) CREATE TABLE customers ( customer_id number, payment_method_code text, customer_code text, customer_name text, custome...
SELECT product_type_code, MAX(product_price), MIN(product_price) FROM products GROUP BY product_type_code
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the maximum and minimum product prices for each product type? ### Input: CREATE TABLE department_stores ( dept_...
give me the drug that patient 011-59493 has been first prescribed in 06/2105.
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 medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-59493')) AND STRFTIME('%y-%m', medication.drugstarttime) = '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: give me the drug that patient 011-59493 has been first prescribed in 06/2105. ### Input: CREATE TABLE vitalperiodic ( vi...
hba1c between 7.5 and 10 %
CREATE TABLE table_train_229 ( "id" int, "hemoglobin_a1c_hba1c" float, "active_metabolic" bool, "body_weight" float, "hba1c" float, "age" float, "NOUSE" float )
SELECT * FROM table_train_229 WHERE hba1c >= 7.5 AND hemoglobin_a1c_hba1c <= 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: hba1c between 7.5 and 10 % ### Input: CREATE TABLE table_train_229 ( "id" int, "hemoglobin_a1c_hba1c" float, "ac...
give me the number of patients whose admission type is emergency and drug name is amaryl?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Amaryl"
Below are sql tables 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 admission type is emergency and drug name is amaryl? ### Input: CREATE TABLE demographi...
What is the average attendance of stadiums with capacity percentage higher than 100%?
CREATE TABLE game ( stadium_id number, id number, season number, date text, home_team text, away_team text, score text, competition text ) CREATE TABLE stadium ( id number, name text, home_games number, average_attendance number, total_attendance number, capacity...
SELECT average_attendance FROM stadium WHERE capacity_percentage > 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: What is the average attendance of stadiums with capacity percentage higher than 100%? ### Input: CREATE TABLE game ( sta...
Are any upper-level courses taught by Peter Dempsey ?
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE ...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.ins...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are any upper-level courses taught by Peter Dempsey ? ### Input: CREATE TABLE semester ( semester_id int, semester v...
how much is the change in weight of patient 739 measured at 2105-12-31 16:30:00 compared to the value measured at 2105-12-30 04:00:00?
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 (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 739)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'adm...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much is the change in weight of patient 739 measured at 2105-12-31 16:30:00 compared to the value measured at 2105-12-30...
What is the least lane number that Natalie Coughlin was in when she was ranked greater than 1?
CREATE TABLE table_63198 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
SELECT MIN("Lane") FROM table_63198 WHERE "Name" = 'natalie coughlin' AND "Rank" > '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 least lane number that Natalie Coughlin was in when she was ranked greater than 1? ### Input: CREATE TABLE table...
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, and could you display in descending by the the average of employee id please?
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(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, return a bar chart about the distribution of hire_date an...
Draw a bar chart for what is the ordered list of customer ids?
CREATE TABLE Services ( Service_ID INTEGER, Service_name VARCHAR(40) ) CREATE TABLE First_Notification_of_Loss ( FNOL_ID INTEGER, Customer_ID INTEGER, Policy_ID INTEGER, Service_ID INTEGER ) CREATE TABLE Settlements ( Settlement_ID INTEGER, Claim_ID INTEGER, Effective_Date DATE, ...
SELECT Customer_name, Customer_ID FROM Customers ORDER BY Customer_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: Draw a bar chart for what is the ordered list of customer ids? ### Input: CREATE TABLE Services ( Service_ID INTEGER, ...
CDA Cloud-Gazing: Azure Python Questions.
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body t...
SELECT Id AS "comment_link", Score, Text FROM Comments WHERE UPPER(Text) LIKE UPPER('Azure') ORDER BY Score 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: CDA Cloud-Gazing: Azure Python Questions. ### Input: CREATE TABLE ReviewRejectionReasons ( Id number, Name text, ...
give the number of patients whose diagnosis icd9 code is v4987.
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 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 diagnoses.icd9_code = "V4987"
Below are sql tables 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 diagnosis icd9 code is v4987. ### Input: CREATE TABLE diagnoses ( subject_id text, ...
Which year has a railway class of 250?
CREATE TABLE table_name_19 ( year VARCHAR, class VARCHAR )
SELECT year FROM table_name_19 WHERE class = "250"
Below are sql tables 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 year has a railway class of 250? ### Input: CREATE TABLE table_name_19 ( year VARCHAR, class VARCHAR ) ### Res...
Use a histogram to show the department's id and corresponding employees' first name, list from high to low by the FIRST_NAME.
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 job_history ( EMPLOYEE...
SELECT FIRST_NAME, DEPARTMENT_ID FROM employees ORDER BY FIRST_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: Use a histogram to show the department's id and corresponding employees' first name, list from high to low by the FIRST_NAME...
find the number of patients categorized under blood gas lab test who were diagnosed with injury to femoral nerve.
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Injury to femoral nerve" AND lab."CATEGORY" = "Blood Gas"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of patients categorized under blood gas lab test who were diagnosed with injury to femoral nerve. ### Input:...
For those employees whose first name does not containing the letter M, display their total salary by binning the hire date into Month interval for visualizing a bar chart, and display in descending by the Y-axis.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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 HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY SUM(SALARY) 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 first name does not containing the letter M, display their total salary by binning the hire date i...
Give me the comparison about the average of Team_ID over the ACC_Road , and group by attribute ACC_Road, I want to sort in desc by the Y-axis.
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 ACC_Road, AVG(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(Team_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: Give me the comparison about the average of Team_ID over the ACC_Road , and group by attribute ACC_Road, I want to sort in d...
what was the first operation time in 2105 for patient 73693?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, ...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73693) AND STRFTIME('%y', procedures_icd.charttime) = '2105' ORDER BY procedures_icd.charttime 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 first operation time in 2105 for patient 73693? ### Input: CREATE TABLE cost ( row_id number, subject_i...
when was patient 3267 first prescribed a medicine via the ip route?
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3267) AND prescriptions.route = 'ip' ORDER BY prescriptions.startdate 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: when was patient 3267 first prescribed a medicine via the ip route? ### Input: CREATE TABLE inputevents_cv ( row_id numb...
what are the top five most common diagnoses that followed within 2 months for those who received inject/infuse nec?
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the top five most common diagnoses that followed within 2 months for those who received inject/infuse nec? ### Inpu...
For all employees who have the letters D or S in their first name, give me the trend about commission_pct over hire_date .
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40)...
SELECT HIRE_DATE, 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, give me the trend about commission_pct over hire_date . #...
How many people attended the game with a Tie no of 30?
CREATE TABLE table_11091 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
SELECT "Attendance" FROM table_11091 WHERE "Tie no" = '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: How many people attended the game with a Tie no of 30? ### Input: CREATE TABLE table_11091 ( "Tie no" text, "Home te...
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id, and sort in ascending by the Y-axis please.
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varc...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY COUNT(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, visualize a bar chart about the distribution of job_id and the amo...
A bar chart about what are the average ages for male and female students?, and could you rank by the bars in desc?
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), ...
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex 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: A bar chart about what are the average ages for male and female students?, and could you rank by the bars in desc? ### Input...
what was patient 2518 first height in this month?
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 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 = 2518)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht' ...
Below are sql tables 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 patient 2518 first height in this month? ### Input: CREATE TABLE admissions ( row_id number, subject_id num...
What is the 2012 population of Indonesia?
CREATE TABLE table_28741_1 ( population_2012_ VARCHAR, country VARCHAR )
SELECT population_2012_ FROM table_28741_1 WHERE country = "Indonesia"
Below are sql tables 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 2012 population of Indonesia? ### Input: CREATE TABLE table_28741_1 ( population_2012_ VARCHAR, country ...
Dr. Yu-jui Huang has taught which classes ?
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, g...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Dr. Yu-jui Huang has taught which classes ? ### Input: CREATE TABLE program_course ( program_id int, course_id int, ...
Find the name and account balance of the customer whose name includes the letter a .
CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text ) CREATE TABL...
SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%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: Find the name and account balance of the customer whose name includes the letter a . ### Input: CREATE TABLE bank ( bran...
what is the flight number for the CO flight which leaves DENVER at 1220pm and goes to SAN FRANCISCO
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( days_code varchar, da...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.departure_time = 1220 AND flight.to_airport = AIRPORT_SERVICE_...
Below are sql tables 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 flight number for the CO flight which leaves DENVER at 1220pm and goes to SAN FRANCISCO ### Input: CREATE TABLE ...
how many patients the previous year were prescribed fluoxetine hcl after venous cath nec during the same month?
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 COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'venous cath...
Below are sql tables 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 the previous year were prescribed fluoxetine hcl after venous cath nec during the same month? ### Input: C...
Compare the lowest rating among all movies by each director using a bar chart, and display y axis from high to low order.
CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date )
SELECT director, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY director ORDER BY MIN(T1.stars) 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 lowest rating among all movies by each director using a bar chart, and display y axis from high to low order. ##...
where was stephanie suchan admitted?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT demographic.admission_location FROM demographic WHERE demographic.name = "Stephanie Suchan"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: where was stephanie suchan admitted? ### Input: CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_cod...
when was the last time that arterial bp mean was measured for patient 12927 in yesterday?
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE outputevents ( row_id number, subject_id number, ha...
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 = 12927)) 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: when was the last time that arterial bp mean was measured for patient 12927 in yesterday? ### Input: CREATE TABLE icustays (...
What country is phil mickelson from?
CREATE TABLE table_name_57 ( country VARCHAR, player VARCHAR )
SELECT country FROM table_name_57 WHERE player = "phil mickelson"
Below are sql tables 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 is phil mickelson from? ### Input: CREATE TABLE table_name_57 ( country VARCHAR, player VARCHAR ) ### R...
what was the first height of patient 8562 in a month before?
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 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 = 8562)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht' ...
Below are sql tables 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 height of patient 8562 in a month before? ### Input: CREATE TABLE admissions ( row_id number, sub...
What is the Team with a Lap that is 5?
CREATE TABLE table_name_48 ( team VARCHAR, laps VARCHAR )
SELECT team FROM table_name_48 WHERE laps = 5
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Team with a Lap that is 5? ### Input: CREATE TABLE table_name_48 ( team VARCHAR, laps VARCHAR ) ### Resp...
Who was the away team when North Melbourne was the home team?
CREATE TABLE table_77842 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team" FROM table_77842 WHERE "Home team" = 'north melbourne'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the away team when North Melbourne was the home team? ### Input: CREATE TABLE table_77842 ( "Home team" text, ...
Is Prof. Yves Atchade the head professor for 525 next semester ?
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_ins...
SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 525 AND instructor.name LIKE '%Yves Atchade%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_in...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is Prof. Yves Atchade the head professor for 525 next semester ? ### Input: CREATE TABLE program_requirement ( program_i...
count the number of patients whose gender is f and drug code is epo4i?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "EPO4I"
Below are sql tables 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 gender is f and drug code is epo4i? ### Input: CREATE TABLE demographic ( subject_id ...
what is the monthly minimum alkaline phosphatase value for patient 23475 since 01/2105?
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_i...
SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23475) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'alkaline phosphatase') AND STRFTIME('%y-%m', labevents.charttime) >= '2105-...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the monthly minimum alkaline phosphatase value for patient 23475 since 01/2105? ### Input: CREATE TABLE d_labitems (...
WHAT OPPONENT HAD A SCORE OF 5:5?
CREATE TABLE table_47635 ( "Opponent" text, "Res." text, "Class" text, "Score" text, "Date" text, "Competition" text, "Notes" text )
SELECT "Opponent" FROM table_47635 WHERE "Score" = '5:5'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT OPPONENT HAD A SCORE OF 5:5? ### Input: CREATE TABLE table_47635 ( "Opponent" text, "Res." text, "Class" te...
Which chassis is more recent than 1972 and has more than 0 Pts. ?
CREATE TABLE table_80393 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Pts." real )
SELECT "Chassis" FROM table_80393 WHERE "Year" > '1972' AND "Pts." > '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 chassis is more recent than 1972 and has more than 0 Pts. ? ### Input: CREATE TABLE table_80393 ( "Year" real, ...
What is the away team score for North Melbourne's home team?
CREATE TABLE table_name_5 ( away_team VARCHAR )
SELECT away_team AS score FROM table_name_5 WHERE away_team = "north melbourne"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the away team score for North Melbourne's home team? ### Input: CREATE TABLE table_name_5 ( away_team VARCHAR ) ...
What is the lowest Grid for jj lehto with over 51 laps?
CREATE TABLE table_name_81 ( grid INTEGER, laps VARCHAR, driver VARCHAR )
SELECT MIN(grid) FROM table_name_81 WHERE laps > 51 AND driver = "jj lehto"
Below are sql tables 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 Grid for jj lehto with over 51 laps? ### Input: CREATE TABLE table_name_81 ( grid INTEGER, laps V...
when has patient 24268 received a prescription for magnesium sulfate last in 03/last year?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id numbe...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24268) AND prescriptions.drug = 'magnesium sulfate' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') 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: when has patient 24268 received a prescription for magnesium sulfate last in 03/last year? ### Input: CREATE TABLE d_items (...
Which episode number drew in 3.84 million viewers in the U.S.?
CREATE TABLE table_72603 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
SELECT MAX("Series #") FROM table_72603 WHERE "U.S. viewers (million)" = '3.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: Which episode number drew in 3.84 million viewers in the U.S.? ### Input: CREATE TABLE table_72603 ( "Series #" real, ...
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 the trend about manager_id over hire_date with a line chart, list by the x-axis from high to low please.
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 countries ( COUNTRY_ID...
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY HIRE_DATE 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 ...
Which average Points have a Position of 7, and a Lost smaller than 4?
CREATE TABLE table_38953 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT AVG("Points") FROM table_38953 WHERE "Position" = '7' AND "Lost" < '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 average Points have a Position of 7, and a Lost smaller than 4? ### Input: CREATE TABLE table_38953 ( "Position" r...
WHAT IS THE PLACE WITH PLAYER mark o'meara?
CREATE TABLE table_51123 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT "Place" FROM table_51123 WHERE "Player" = 'mark o''meara'
Below are sql tables 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 WITH PLAYER mark o'meara? ### Input: CREATE TABLE table_51123 ( "Place" text, "Player" text, "...
Given a line chart about the maximum price of wines for each year, I want to show in descending by the x-axis please.
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 grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE appellations ( No...
SELECT Year, MAX(Price) FROM wine GROUP BY Year ORDER BY Year 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: Given a line chart about the maximum price of wines for each year, I want to show in descending by the x-axis please. ### In...
how many teams won , at most , 1 time ?
CREATE TABLE table_204_448 ( id number, "team" text, "winners" number, "runners-up" number, "years won" text, "years runner-up" text )
SELECT COUNT("team") FROM table_204_448 WHERE "winners" = 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many teams won , at most , 1 time ? ### Input: CREATE TABLE table_204_448 ( id number, "team" text, "winners...
What is the away team's score when the Home team score is 14.18 (102)?
CREATE TABLE table_57966 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team score" FROM table_57966 WHERE "Home team score" = '14.18 (102)'
Below are sql tables 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 away team's score when the Home team score is 14.18 (102)? ### Input: CREATE TABLE table_57966 ( "Home team"...
What was the home team's score at the game held at Junction Oval?
CREATE TABLE table_name_13 ( home_team VARCHAR, venue VARCHAR )
SELECT home_team AS score FROM table_name_13 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 home team's score at the game held at Junction Oval? ### Input: CREATE TABLE table_name_13 ( home_team VARC...
Which IHSAA Class has a School of mitchell?
CREATE TABLE table_65536 ( "School" text, "Location" text, "Mascot" text, "Size" real, "IHSAA Class" text, "County" text )
SELECT "IHSAA Class" FROM table_65536 WHERE "School" = 'mitchell'
Below are sql tables 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 IHSAA Class has a School of mitchell? ### Input: CREATE TABLE table_65536 ( "School" text, "Location" text, ...
Tell me the surface for 16 april 2007
CREATE TABLE table_32052 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
SELECT "Surface" FROM table_32052 WHERE "Date" = '16 april 2007'
Below are sql tables 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 surface for 16 april 2007 ### Input: CREATE TABLE table_32052 ( "Outcome" text, "Date" text, "Tourna...
do you have a flight from BOSTON to FORT WORTH
CREATE TABLE code_description ( code varchar, description text ) 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 time_inte...
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 = 'FORT WO...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: do you have a flight from BOSTON to FORT WORTH ### Input: CREATE TABLE code_description ( code varchar, description ...
Show me a scatter chart for how many games has each stadium held?
CREATE TABLE stadium ( id int, name text, Home_Games int, Average_Attendance real, Total_Attendance real, Capacity_Percentage real ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE game ( ...
SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.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: Show me a scatter chart for how many games has each stadium held? ### Input: CREATE TABLE stadium ( id int, name tex...
Are there courses that will offer 10 credits ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT name, number FROM course WHERE credits = 10 AND department = 'EECS'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there courses that will offer 10 credits ? ### Input: CREATE TABLE course_offering ( offering_id int, course_id ...
give me the number of patients whose ethnicity is asian and drug code is cara1?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "ASIAN" AND prescriptions.formulary_drug_cd = "CARA1"
Below are sql tables 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 ethnicity is asian and drug code is cara1? ### Input: CREATE TABLE prescriptions ( ...
Bar chart x axis all games y axis acc_percent, order by the ACC_Percent in ascending.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Games, ACC_Percent FROM basketball_match ORDER BY ACC_Percent
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar chart x axis all games y axis acc_percent, order by the ACC_Percent in ascending. ### Input: CREATE TABLE university ( ...
Provide me the number of patients admitted before 2167 who had percutaneous (endoscopic) jejunostomy pej procedure.
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.admityear < "2167" AND procedures.long_title = "Percutaneous (endoscopic) jejunostomy [PEJ]"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Provide me the number of patients admitted before 2167 who had percutaneous (endoscopic) jejunostomy pej procedure. ### Inpu...
What are the number of dates of birth of all the guests whose gender is 'Male'?, list by the y-axis in descending.
CREATE TABLE View_Unit_Status ( apt_id INTEGER, apt_booking_id INTEGER, status_date DATETIME, available_yn BIT ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_start_date DATETIME, booking_end_dat...
SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male" ORDER BY COUNT(date_of_birth) 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 dates of birth of all the guests whose gender is 'Male'?, list by the y-axis in descending. ### Input...
What is Record, when Game is '36'?
CREATE TABLE table_45691 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text )
SELECT "Record" FROM table_45691 WHERE "Game" = '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 Record, when Game is '36'? ### Input: CREATE TABLE table_45691 ( "Game" real, "December" real, "Opponent...
Draw a pie chart about the proportion of ACC_Road and the amount of ACC_Road.
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 ACC_Road, COUNT(ACC_Road) FROM basketball_match GROUP BY ACC_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 pie chart about the proportion of ACC_Road and the amount of ACC_Road. ### Input: CREATE TABLE basketball_match ( ...
provide the number of patients whose admission type is urgent.
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.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: provide the number of patients whose admission type is urgent. ### Input: CREATE TABLE procedures ( subject_id text, ...
specify the number of patients with icd9 code 5849 who had a stay at hospital for more than 6 days
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "6" AND diagnoses.icd9_code = "5849"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: specify the number of patients with icd9 code 5849 who had a stay at hospital for more than 6 days ### Input: CREATE TABLE l...
plot scatter on what are the id of each employee and the number of document destruction authorised by that employee?
CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Description VARCHAR(255) )...
SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_Destroyed GROUP BY Destruction_Authorised_by_Employee_ID
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: plot scatter on what are the id of each employee and the number of document destruction authorised by that employee? ### Inp...
Show the number of type of thing code from each type of thing code, and sort in descending by the total number.
CREATE TABLE Residents ( resident_id INTEGER, property_id INTEGER, date_moved_in DATETIME, date_moved_out DATETIME, other_details VARCHAR(255) ) CREATE TABLE Timed_Locations_of_Things ( thing_id INTEGER, Date_and_Time DATETIME, Location_Code CHAR(15) ) CREATE TABLE Properties ( pro...
SELECT Type_of_Thing_Code, COUNT(Type_of_Thing_Code) FROM Things GROUP BY Type_of_Thing_Code ORDER BY COUNT(Type_of_Thing_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: Show the number of type of thing code from each type of thing code, and sort in descending by the total number. ### Input: C...
Other than Prof. Kyongmi Park , who else teaches 460 .
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semes...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 460 AND NOT instructor.name LIKE '%Kyongmi Park%' AND offering_instructor.instructor_id = instructor.instructor_id AND offer...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Other than Prof. Kyongmi Park , who else teaches 460 . ### Input: CREATE TABLE offering_instructor ( offering_instructor...
List the description of the outcomes for all projects, and count them by a bar chart, rank bars from low to high order.
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 Project_Staff ( staff_id DOUBLE, project_id INTEGER, role_code VARCHAR(10), date_from DATETI...
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: List the description of the outcomes for all projects, and count them by a bar chart, rank bars from low to high order. ### ...
which patients have oral route of drug administration?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "ORAL"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which patients have oral route of drug administration? ### Input: CREATE TABLE demographic ( subject_id text, hadm_i...
have there been any microbiological other tests for patient 031-3355?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND microlab.culturesite = 'other'
Below are sql tables 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 there been any microbiological other tests for patient 031-3355? ### Input: CREATE TABLE intakeoutput ( intakeoutpu...
patient 95986 has produced gastric emesis in 05/this year?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, g...
SELECT COUNT(*) > 0 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 = 95986)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'gastric emesis...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patient 95986 has produced gastric emesis in 05/this year? ### Input: CREATE TABLE d_icd_diagnoses ( row_id number, ...
What is the highest attendance that has oakland raiders as the opponent, with a week greater than 9?
CREATE TABLE table_35913 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attendance" real )
SELECT MAX("Attendance") FROM table_35913 WHERE "Opponent" = 'oakland raiders' AND "Week" > '9'
Below are sql tables 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 attendance that has oakland raiders as the opponent, with a week greater than 9? ### Input: CREATE TABLE...
What is the Home team on October 17 with a Score of 1 2?
CREATE TABLE table_name_21 ( home VARCHAR, score VARCHAR, date VARCHAR )
SELECT home FROM table_name_21 WHERE score = "1–2" AND date = "october 17"
Below are sql tables 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 on October 17 with a Score of 1 2? ### Input: CREATE TABLE table_name_21 ( home VARCHAR, score...
How many episodes have 18.73 million viewers?
CREATE TABLE table_27481781_2 ( no_in_series VARCHAR, viewers__millions_ VARCHAR )
SELECT COUNT(no_in_series) FROM table_27481781_2 WHERE viewers__millions_ = "18.73"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many episodes have 18.73 million viewers? ### Input: CREATE TABLE table_27481781_2 ( no_in_series VARCHAR, viewe...
Which average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?
CREATE TABLE table_37109 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT AVG("Drawn") FROM table_37109 WHERE "Points" < '14' AND "Lost" < '4' AND "Played" > '9'
Below are sql tables 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 average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9? ### Input: CREATE TAB...
count the number of patients until 2101 that had been discharged from the hospital.
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 COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) <= '2101'
Below are sql tables 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 until 2101 that had been discharged from the hospital. ### Input: CREATE TABLE intakeoutput ( ...
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of job_id and department_id , and I want to display from low to high by the names.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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), ...
SELECT JOB_ID, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about...
after december 29 what is the score?
CREATE TABLE table_75294 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
SELECT "Score" FROM table_75294 WHERE "December" > '29'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: after december 29 what is the score? ### Input: CREATE TABLE table_75294 ( "Game" real, "December" real, "Oppone...
A bar chart for finding the number of the physicians who are trained in a procedure that costs more than 5000, could you rank x axis in desc order please?
CREATE TABLE On_Call ( Nurse INTEGER, BlockFloor INTEGER, BlockCode INTEGER, OnCallStart DATETIME, OnCallEnd DATETIME ) CREATE TABLE Affiliated_With ( Physician INTEGER, Department INTEGER, PrimaryAffiliation BOOLEAN ) CREATE TABLE Medication ( Code INTEGER, Name VARCHAR(30), ...
SELECT T1.Name, COUNT(T1.Name) FROM Physician AS T1 JOIN Trained_In AS T2 ON T1.EmployeeID = T2.Physician JOIN Procedures AS T3 ON T3.Code = T2.Treatment WHERE T3.Cost > 5000 GROUP BY T1.Name ORDER BY T1.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: A bar chart for finding the number of the physicians who are trained in a procedure that costs more than 5000, could you ran...
when patient 14671 got his arterial bp [systolic] measured for the first time since 74 days ago?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, val...
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 = 14671)) 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: when patient 14671 got his arterial bp [systolic] measured for the first time since 74 days ago? ### Input: CREATE TABLE mic...
Return a bar chart on how many classes are held in each department?, and I want to sort in desc by the Y-axis.
CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE STUDENT...
SELECT DEPT_CODE, COUNT(*) FROM CLASS AS T1 JOIN COURSE AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY DEPT_CODE 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: Return a bar chart on how many classes are held in each department?, and I want to sort in desc by the Y-axis. ### Input: CR...
How many episodes were watched by 12.72 million U.S. viewers?
CREATE TABLE table_72317 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
SELECT COUNT("Written by") FROM table_72317 WHERE "U.S. viewers (millions)" = '12.72'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many episodes were watched by 12.72 million U.S. viewers? ### Input: CREATE TABLE table_72317 ( "No. in series" real...
Are there any upper-level ROMLANG classes available this Spring ?
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int,...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ROMLANG' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Spr...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there any upper-level ROMLANG classes available this Spring ? ### Input: CREATE TABLE comment_instructor ( instructo...
On what day did the home team score 18.12 (120)?
CREATE TABLE table_4601 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_4601 WHERE "Home team score" = '18.12 (120)'
Below are sql tables 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 day did the home team score 18.12 (120)? ### Input: CREATE TABLE table_4601 ( "Home team" text, "Home team s...
Who made the decision when atlanta was the home team?
CREATE TABLE table_46335 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Record" text )
SELECT "Decision" FROM table_46335 WHERE "Home" = 'atlanta'
Below are sql tables 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 made the decision when atlanta was the home team? ### Input: CREATE TABLE table_46335 ( "Date" text, "Visitor" t...
Name the average for 23 games played
CREATE TABLE table_26611679_3 ( average VARCHAR, games_played VARCHAR )
SELECT average FROM table_26611679_3 WHERE games_played = 23
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the average for 23 games played ### Input: CREATE TABLE table_26611679_3 ( average VARCHAR, games_played VARCHA...
count the number of patients who received a insulin - continuous infusion procedure during the same month after they received a analgesics - narcotic analgesic procedure during this year.
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, a...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'analgesics - narcotic analgesic' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_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: count the number of patients who received a insulin - continuous infusion procedure during the same month after they receive...
Name the team for w 115 104 (ot)
CREATE TABLE table_22669044_8 ( team VARCHAR, score VARCHAR )
SELECT team FROM table_22669044_8 WHERE score = "W 115–104 (OT)"
Below are sql tables 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 team for w 115 104 (ot) ### Input: CREATE TABLE table_22669044_8 ( team VARCHAR, score VARCHAR ) ### Respon...
What is the earliest year the new york jets won at harvard stadium?
CREATE TABLE table_name_35 ( year INTEGER, winner VARCHAR, location VARCHAR )
SELECT MIN(year) FROM table_name_35 WHERE winner = "new york jets" AND location = "harvard 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 is the earliest year the new york jets won at harvard stadium? ### Input: CREATE TABLE table_name_35 ( year INTEGER...
what was the first time patient 11362 had a sodium test in 11/this year?
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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11362) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the first time patient 11362 had a sodium test in 11/this year? ### Input: CREATE TABLE transfers ( row_id numb...
how many patients received fiber-optic bronchoscopy during the same month after having been diagnosed with acidosis, the last year?
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE icustays ( row_id number, s...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'acidosis') AND DAT...
Below are sql tables 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 received fiber-optic bronchoscopy during the same month after having been diagnosed with acidosis, the las...
How many wins in the 4th position?
CREATE TABLE table_73179 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text )
SELECT MIN("Wins") FROM table_73179 WHERE "Position" = '4th'
Below are sql tables 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 wins in the 4th position? ### Input: CREATE TABLE table_73179 ( "Year" real, "Starts" real, "Wins" real...