instruction
stringlengths
11
303
input
stringlengths
38
5.51k
output
stringlengths
25
1.92k
text
stringlengths
321
6.52k
Which Score has an Opponent of @ la lakers, and a Record of 8-6?
CREATE TABLE table_46171 ( "Date" text, "Opponent" text, "Score" text, "Result" text, "Record" text )
SELECT "Score" FROM table_46171 WHERE "Opponent" = '@ la lakers' AND "Record" = '8-6'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Score has an Opponent of @ la lakers, and a Record of 8-6? ### Input: CREATE TABLE table_46171 ( "Date" text, ...
Find ACC_Road and Team_ID , and group by attribute All_Home, and visualize them by a bar chart, and could you sort by the bar in descending?
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, Team_ID FROM basketball_match GROUP BY All_Home, ACC_Road ORDER BY ACC_Road 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: Find ACC_Road and Team_ID , and group by attribute All_Home, and visualize them by a bar chart, and could you sort by the ba...
what flights fly from DENVER to SAN FRANCISCO on this monday tuesday wednesday thursday and friday
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, ni...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, date_day AS DATE_DAY_2, date_day AS DATE_DAY_3, date_day AS DATE_DAY_4, days AS DAYS_0, days AS DAYS_1, days AS DAYS_2, days 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: what flights fly from DENVER to SAN FRANCISCO on this monday tuesday wednesday thursday and friday ### Input: CREATE TABLE t...
Which of the courses are worth 7 credits ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instruc...
SELECT DISTINCT name, number FROM course WHERE credits = 7 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: Which of the courses are worth 7 credits ? ### Input: CREATE TABLE course_prerequisite ( pre_course_id int, course_i...
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the sum of manager_id over the hire_date bin hire_date by time by a bar chart, list by the Y in asc.
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 NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) 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 do not work in departments with managers that have ids between 100 and 200, give me the comparison a...
Which Brilliance Grade has a Crown angle of 41.1 ?
CREATE TABLE table_name_6 ( brilliance_grade VARCHAR, crown_angle VARCHAR )
SELECT brilliance_grade FROM table_name_6 WHERE crown_angle = "41.1°"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Brilliance Grade has a Crown angle of 41.1 ? ### Input: CREATE TABLE table_name_6 ( brilliance_grade VARCHAR, ...
in 2105 was there any microbiology test result for patient 025-19271?
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 microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-19271')) AND STRFTIME('%y', microlab.culturetakentime) = '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: in 2105 was there any microbiology test result for patient 025-19271? ### Input: CREATE TABLE patient ( uniquepid text, ...
Which Country has a Player of jodie mudd?
CREATE TABLE table_62670 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( \u00a3 )" real )
SELECT "Country" FROM table_62670 WHERE "Player" = 'jodie mudd'
Below are sql tables 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 Country has a Player of jodie mudd? ### Input: CREATE TABLE table_62670 ( "Place" text, "Player" text, "Co...
how many patients admitted before the year 2137 are procedured with icd9 code 3322?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2137" AND procedures.icd9_code = "3322"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients admitted before the year 2137 are procedured with icd9 code 3322? ### Input: CREATE TABLE demographic ( ...
was there any record of the microbiology test for the nasopharynx of patient 031-16123 until 2104?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( ...
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-16123')) AND microlab.culturesite = 'nasopharynx' AND STRFTIME('%y', microlab....
Below are sql tables 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 any record of the microbiology test for the nasopharynx of patient 031-16123 until 2104? ### Input: CREATE TABLE a...
Which class most easily fulfills the MDE requirement ?
CREATE TABLE gsi ( course_offering_id int, student_id int ) 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 TABL...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
Below are sql tables 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 class most easily fulfills the MDE requirement ? ### Input: CREATE TABLE gsi ( course_offering_id int, student...
What are the Ages of the Seashell Trust School with Ofsted Report?
CREATE TABLE table_8414 ( "School" text, "Locality" text, "Ages" text, "Report" text, "Website" text )
SELECT "Ages" FROM table_8414 WHERE "Report" = 'ofsted' AND "School" = 'seashell trust'
Below are sql tables 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 Ages of the Seashell Trust School with Ofsted Report? ### Input: CREATE TABLE table_8414 ( "School" text, ...
How many courses for each course description? Show me a bar chart, list by the X in desc.
CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE DE...
SELECT CRS_DESCRIPTION, COUNT(CRS_DESCRIPTION) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY CRS_DESCRIPTION ORDER BY CRS_DESCRIPTION DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many courses for each course description? Show me a bar chart, list by the X in desc. ### Input: CREATE TABLE STUDENT ( ...
A bar chart shows the distribution of name and ID , I want to order by the Y-axis in asc.
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text...
SELECT name, ID FROM swimmer ORDER BY 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: A bar chart shows the distribution of name and ID , I want to order by the Y-axis in asc. ### Input: CREATE TABLE event ( ...
What day in february was game 53?
CREATE TABLE table_name_96 ( february INTEGER, game VARCHAR )
SELECT AVG(february) FROM table_name_96 WHERE game = 53
Below are sql tables 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 in february was game 53? ### Input: CREATE TABLE table_name_96 ( february INTEGER, game VARCHAR ) ### Respo...
Who was the opponent when the Phillies played on April 28?
CREATE TABLE table_name_77 ( opponent VARCHAR, date VARCHAR )
SELECT opponent FROM table_name_77 WHERE date = "april 28"
Below are sql tables 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 opponent when the Phillies played on April 28? ### Input: CREATE TABLE table_name_77 ( opponent VARCHAR, ...
How long has MEDEDUC 883 been up for offer ?
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, ...
SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MEDEDUC' AND course.number = 883 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How long has MEDEDUC 883 been up for offer ? ### Input: CREATE TABLE area ( course_id int, area varchar ) CREATE TA...
Who is the opponent on October 28, 2001?
CREATE TABLE table_45571 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" text )
SELECT "Opponent" FROM table_45571 WHERE "Date" = 'october 28, 2001'
Below are sql tables 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 on October 28, 2001? ### Input: CREATE TABLE table_45571 ( "Week" real, "Date" text, "Oppone...
What was the smallest crowd at a home game for essendon?
CREATE TABLE table_55491 ( "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_55491 WHERE "Home team" = 'essendon'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the smallest crowd at a home game for essendon? ### Input: CREATE TABLE table_55491 ( "Home team" text, "Ho...
when did patient 009-4569 last have minimum hgb until 16 months ago?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-4569')) AND lab.labname = 'hgb' AND DATETIME(lab.labresulttime) <= 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: when did patient 009-4569 last have minimum hgb until 16 months ago? ### Input: CREATE TABLE cost ( costid number, u...
what is the number of patients whose days of hospital stay is greater than 5 and diagnoses long title is phlebitis and thrombophlebitis of superficial veins of upper extremities?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "5" AND diagnoses.long_title = "Phlebitis and thrombophlebitis of superficial veins of upper extremities"
Below are sql tables 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 days of hospital stay is greater than 5 and diagnoses long title is phlebitis and throm...
what is the red blood cells percentile of 3.88 among patients of the same age as patient 27146 in the current hospital encounter?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE charte...
SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'red blood cells') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissio...
Below are sql tables 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 red blood cells percentile of 3.88 among patients of the same age as patient 27146 in the current hospital encou...
Who did the high rebounds in the game in which Brandon Jennings (8) did the high assists?
CREATE TABLE table_25470 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "High rebounds" FROM table_25470 WHERE "High assists" = 'Brandon Jennings (8)'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who did the high rebounds in the game in which Brandon Jennings (8) did the high assists? ### Input: CREATE TABLE table_2547...
i'd like a flight on UA from DALLAS to SAN FRANCISCO that leaves after 815
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE...
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 > 815 AND flight.to_airport = AIRPORT_SERVICE_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: i'd like a flight on UA from DALLAS to SAN FRANCISCO that leaves after 815 ### Input: CREATE TABLE flight_leg ( flight_i...
show me the cheapest one way flight from SAN FRANCISCO to BOSTON leaving SAN FRANCISCO after 2100
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.departure_time > 2100 AND flight.to_airport = AIRP...
Below are sql tables 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 the cheapest one way flight from SAN FRANCISCO to BOSTON leaving SAN FRANCISCO after 2100 ### Input: CREATE TABLE eq...
Find the first and last name of the faculty who is involved in the largest number of activities.
CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE...
SELECT T1.fname, T1.lname FROM faculty AS T1 JOIN faculty_participates_in AS T2 ON T1.facid = T2.facid GROUP BY T1.facid ORDER BY COUNT(*) 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: Find the first and last name of the faculty who is involved in the largest number of activities. ### Input: CREATE TABLE fac...
For those employees who was hired before 2002-06-21, give me the trend about manager_id over hire_date , I want to rank x-axis in asc order.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), ...
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, give me the trend about manager_id over hire_date , I want to rank x-ax...
how many times has a remov intralum trach fb been done until 2 years ago?
CREATE TABLE procedures_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_id number, charttime time, itemid number, amount number ) CREATE TABL...
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 = 'remov intralum trach fb') AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-2 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: how many times has a remov intralum trach fb been done until 2 years ago? ### Input: CREATE TABLE procedures_icd ( row_i...
what is the location/attendance when the record is 9-2?
CREATE TABLE table_76284 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
SELECT "Location/Attendance" FROM table_76284 WHERE "Record" = '9-2'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the location/attendance when the record is 9-2? ### Input: CREATE TABLE table_76284 ( "Game" real, "Date" te...
What driver has 22 as nor 1?
CREATE TABLE table_name_85 ( driver VARCHAR, nor_1 VARCHAR )
SELECT driver FROM table_name_85 WHERE nor_1 = "22"
Below are sql tables 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 driver has 22 as nor 1? ### Input: CREATE TABLE table_name_85 ( driver VARCHAR, nor_1 VARCHAR ) ### Response: S...
What are the names and ages of editors? Show me a bar chart, and sort Y-axis in ascending order please.
CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int ) CREATE TABLE editor ( Editor_ID int, Name text, Age real ) CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text )
SELECT Name, Age FROM editor ORDER BY Age
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the names and ages of editors? Show me a bar chart, and sort Y-axis in ascending order please. ### Input: CREATE TA...
What is the starting point of the north/south operating Palafox Street route?
CREATE TABLE table_15805 ( "Name" text, "Starting Point" text, "Terminus" text, "Operates" text, "Direction" text )
SELECT "Starting Point" FROM table_15805 WHERE "Operates" = 'north/south' AND "Name" = 'palafox street'
Below are sql tables 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 starting point of the north/south operating Palafox Street route? ### Input: CREATE TABLE table_15805 ( "Nam...
Name the number of region for
CREATE TABLE table_160510_5 ( region VARCHAR, hangul_chosongul VARCHAR )
SELECT COUNT(region) FROM table_160510_5 WHERE hangul_chosongul = "경상남도"
Below are sql tables 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 number of region for ### Input: CREATE TABLE table_160510_5 ( region VARCHAR, hangul_chosongul VARCHAR ) ##...
What is the largest gold with a Total of 2, and a Rank smaller than 2?
CREATE TABLE table_15178 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MAX("Gold") FROM table_15178 WHERE "Total" = '2' AND "Rank" < '2'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the largest gold with a Total of 2, and a Rank smaller than 2? ### Input: CREATE TABLE table_15178 ( "Rank" real...
what is the number of patients whose insurance is self pay and year of birth is less than 2138?
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 WHERE demographic.insurance = "Self Pay" AND demographic.dob_year < "2138"
Below are sql tables 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 insurance is self pay and year of birth is less than 2138? ### Input: CREATE TABLE proc...
what is the number of patients whose procedure icd9 code is 5187 and drug route is nu?
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 procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "5187" AND prescriptions.route = "NU"
Below are sql tables 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 procedure icd9 code is 5187 and drug route is nu? ### Input: CREATE TABLE prescriptions...
what is age and admission location of subject name jerry deberry?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.age, demographic.admission_location FROM demographic WHERE demographic.name = "Jerry Deberry"
Below are sql tables 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 age and admission location of subject name jerry deberry? ### Input: CREATE TABLE diagnoses ( subject_id text, ...
What was the score on February 17?
CREATE TABLE table_12351 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Score" FROM table_12351 WHERE "Date" = 'february 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 was the score on February 17? ### Input: CREATE TABLE table_12351 ( "Date" text, "Visitor" text, "Score" te...
How many medicaid insurance patients have undergone a conduit left ventr-aorta 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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.short_title = "Conduit left ventr-aorta"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many medicaid insurance patients have undergone a conduit left ventr-aorta procedure? ### Input: CREATE TABLE lab ( ...
among patients who had a hospital stay for more than 2 days, how many of them were tested for anion gap?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "2" AND lab.label = "Anion Gap"
Below are sql tables 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 patients who had a hospital stay for more than 2 days, how many of them were tested for anion gap? ### Input: CREATE T...
Bar chart of how many date of completion from each date of completion
CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80),...
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment
Below are sql tables 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 how many date of completion from each date of completion ### Input: CREATE TABLE Subjects ( subject_id INTE...
A pie chart shows the proportion of Sex and the amount of Sex.
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex
Below are sql tables 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 pie chart shows the proportion of Sex and the amount of Sex. ### Input: CREATE TABLE candidate ( Candidate_ID int, ...
Who was the episode writer when the viewers reached 3.03 million in the US?
CREATE TABLE table_17861265_1 ( written_by VARCHAR, us_viewers__million_ VARCHAR )
SELECT written_by FROM table_17861265_1 WHERE us_viewers__million_ = "3.03"
Below are sql tables 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 episode writer when the viewers reached 3.03 million in the US? ### Input: CREATE TABLE table_17861265_1 ( w...
what procedure is provided to patient 027-24468 two times until 40 months ago?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalp...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
Below are sql tables 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 procedure is provided to patient 027-24468 two times until 40 months ago? ### Input: CREATE TABLE lab ( labid numbe...
What was the score for the home team of essendon?
CREATE TABLE table_name_45 ( home_team VARCHAR )
SELECT home_team AS score FROM table_name_45 WHERE home_team = "essendon"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score for the home team of essendon? ### Input: CREATE TABLE table_name_45 ( home_team VARCHAR ) ### Respon...
what percentile of bedside glucose is 84.0 in patients of the same age as patient 030-42006 during this hospital encounter?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = 'bedside glucose' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '030-42006' AND p...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what percentile of bedside glucose is 84.0 in patients of the same age as patient 030-42006 during this hospital encounter? ...
count the number of patients whose gender is m and drug type is additive?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.drug_type = "ADDITIVE"
Below are sql tables 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 m and drug type is additive? ### Input: CREATE TABLE diagnoses ( subject_id...
Compare the total number of different product names, show y axis in asc order.
CREATE TABLE Events ( Event_ID INTEGER, Address_ID INTEGER, Channel_ID INTEGER, Event_Type_Code CHAR(15), Finance_ID INTEGER, Location_ID INTEGER ) CREATE TABLE Products_in_Events ( Product_in_Event_ID INTEGER, Event_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Agreements ( Do...
SELECT Product_Name, COUNT(Product_Name) FROM Products GROUP BY Product_Name ORDER BY COUNT(Product_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: Compare the total number of different product names, show y axis in asc order. ### Input: CREATE TABLE Events ( Event_ID...
List all directors along with the number of films directed by each director Plot them as bar chart, list X-axis from high to low order please.
CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE schedule...
SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by ORDER BY Directed_by 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: List all directors along with the number of films directed by each director Plot them as bar chart, list X-axis from high to...
When the Home team was Carlton, what was the Away team score?
CREATE TABLE table_56816 ( "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_56816 WHERE "Home team" = 'carlton'
Below are sql tables 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 the Home team was Carlton, what was the Away team score? ### Input: CREATE TABLE table_56816 ( "Home team" text, ...
What are the draft pick numbers and draft classes for players who play the Defender position. Show bar chart.
CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL tex...
SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender"
Below are sql tables 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 draft pick numbers and draft classes for players who play the Defender position. Show bar chart. ### Input: CRE...
how many of the female patients had sdh as the primary disease?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "SDH"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the female patients had sdh as the primary disease? ### Input: CREATE TABLE procedures ( subject_id text, ...
Visualize a bar chart for what are the name and level of catalog structure with level number between 5 and 10
CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREATE TABLE Attribute_Definitions ( attribute_id INTEGER, attribute_name VARCHAR(30), attribute_data_type VARCHAR(10) ) ...
SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 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: Visualize a bar chart for what are the name and level of catalog structure with level number between 5 and 10 ### Input: CRE...
What is the highest track for the song Rip it Up?
CREATE TABLE table_54850 ( "Track" real, "Recorded" text, "Catalogue" text, "Release Date" text, "Song Title" text, "Time" text )
SELECT MAX("Track") FROM table_54850 WHERE "Song Title" = 'rip it up'
Below are sql tables 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 track for the song Rip it Up? ### Input: CREATE TABLE table_54850 ( "Track" real, "Recorded" tex...
count the number of patients whose age is less than 55 and drug code is syrg1?
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.age < "55" AND prescriptions.formulary_drug_cd = "SYRG1"
Below are sql tables 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 age is less than 55 and drug code is syrg1? ### Input: CREATE TABLE procedures ( subj...
Which Opponent has a Score of 3 6, 5 7?
CREATE TABLE table_38576 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
SELECT "Opponent" FROM table_38576 WHERE "Score" = '3–6, 5–7'
Below are sql tables 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 Opponent has a Score of 3 6, 5 7? ### Input: CREATE TABLE table_38576 ( "Date" text, "Tournament" text, "S...
Does the university offer MDE or PreMajor classes for the Summer term ?
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 course.department, course.name, course.number, program_course.category FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category IN ('MDE', 'PreMajor') AND program_course.course_id = course.course_id AND semester.semester = 'Sum...
Below are sql tables 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 the university offer MDE or PreMajor classes for the Summer term ? ### Input: CREATE TABLE course_offering ( offeri...
What is Partner Tomas Behrend's Score in the final?
CREATE TABLE table_71913 ( "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
SELECT "Score in the final" FROM table_71913 WHERE "Partner" = 'tomas behrend'
Below are sql tables 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 Partner Tomas Behrend's Score in the final? ### Input: CREATE TABLE table_71913 ( "Tournament" text, "Surfac...
In what prefecture is Daito located?
CREATE TABLE table_27445 ( "Prefecture" text, "City/Town" text, "High School Name" text, "Year of Previous Participation" text, "Total Number of Participation" real )
SELECT "Prefecture" FROM table_27445 WHERE "City/Town" = 'Daito'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what prefecture is Daito located? ### Input: CREATE TABLE table_27445 ( "Prefecture" text, "City/Town" text, ...
what were the four most frequently ordered lab tests for patients who had previously received cv cath plcmt w guidance in the same month, until 2104?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 ) ...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, 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_i...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the four most frequently ordered lab tests for patients who had previously received cv cath plcmt w guidance in th...
give the number of patients whose primary disease is coronary artery disease/coronary artery bypass graft/sda and who were aged below 89 years.
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND demographic.age < "89"
Below are sql tables 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 primary disease is coronary artery disease/coronary artery bypass graft/sda and who were a...
WHAT COUNTRY HAS THE HIGHEST BRONZE COUNT, MORE THAN 1 SILVER METAL, AND LESS THAN 1ST PLACE?
CREATE TABLE table_name_46 ( bronze INTEGER, silver VARCHAR, rank VARCHAR )
SELECT MAX(bronze) FROM table_name_46 WHERE silver > 1 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 COUNTRY HAS THE HIGHEST BRONZE COUNT, MORE THAN 1 SILVER METAL, AND LESS THAN 1ST PLACE? ### Input: CREATE TABLE table_...
Show the relationship between accout id and account name for all accounts by the customer with first name 'Meaghan' in a scatter chart.
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, account_id INTEGER, invoice_number INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DECIMAL(19,4), transaction_comment VARCHAR(255), other_transaction_details VARCHAR(255) ) CREATE TABLE Pr...
SELECT account_id, account_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'
Below are sql tables 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 relationship between accout id and account name for all accounts by the customer with first name 'Meaghan' in a sca...
until 35 months ago has patient 22295's sao2 been normal?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id ...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22295)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sao2' AND d_items...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: until 35 months ago has patient 22295's sao2 been normal? ### Input: CREATE TABLE d_icd_procedures ( row_id number, ...
what was the three most frequently taken lab test until 2 years ago for patients with an age 40s?
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 40 AND 49) AND DATETIME(labevents.chartti...
Below are sql tables 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 three most frequently taken lab test until 2 years ago for patients with an age 40s? ### Input: CREATE TABLE pr...
Provide the list of patients under 85 years who are suffering from pneumonia as their primary disease.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA" AND demographic.age < "85"
Below are sql tables 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 list of patients under 85 years who are suffering from pneumonia as their primary disease. ### Input: CREATE TAB...
What tournament was after 2009?
CREATE TABLE table_71139 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Event" text )
SELECT "Tournament" FROM table_71139 WHERE "Year" > '2009'
Below are sql tables 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 tournament was after 2009? ### Input: CREATE TABLE table_71139 ( "Year" real, "Tournament" text, "Venue" te...
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of phone_number and employee_id , and list X in desc order please.
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 PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_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: For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about t...
Give me a pie chart showing the proportion of ships' classes that do not have a captain.
CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text )
SELECT Class, COUNT(Class) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain) GROUP BY Class
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a pie chart showing the proportion of ships' classes that do not have a captain. ### Input: CREATE TABLE Ship ( ...
Who was driving with a Grid of 13?
CREATE TABLE table_53342 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Driver" FROM table_53342 WHERE "Grid" = '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: Who was driving with a Grid of 13? ### Input: CREATE TABLE table_53342 ( "Driver" text, "Constructor" text, "Lap...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the amount of hire_date bin hire_date by time.
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 HIRE_DATE, COUNT(HIRE_DATE) 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, a bar chart shows the distribution of hire_date and the a...
Are there Friday classes for Prof. Ian Fulcher 's 464 course ?
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, tes...
SELECT COUNT(*) = 0 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.instructor_id WHERE course.number = 464 AND c...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there Friday classes for Prof. Ian Fulcher 's 464 course ? ### Input: CREATE TABLE program_course ( program_id int, ...
count the number of patients whose ethnicity is black/cape verdean and procedure icd9 code is 3806?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND procedures.icd9_code = "3806"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose ethnicity is black/cape verdean and procedure icd9 code is 3806? ### Input: CREATE TABLE ...
How many jewish patients had a lab test named monocytes?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEWISH" AND lab.label = "Monocytes"
Below are sql tables 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 jewish patients had a lab test named monocytes? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text...
show me the number of female patients for whom nucleated red cells lab test order was placed.
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.gender = "F" AND lab.label = "Nucleated Red Cells"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the number of female patients for whom nucleated red cells lab test order was placed. ### Input: CREATE TABLE proced...
what is the number of patients whose days of hospital stay is greater than 16 and diagnoses icd9 code is 5781?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "16" AND diagnoses.icd9_code = "5781"
Below are sql tables 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 days of hospital stay is greater than 16 and diagnoses icd9 code is 5781? ### Input: CR...
How many races were there when Sigachev had 38 points?
CREATE TABLE table_25421463_1 ( races INTEGER, points VARCHAR )
SELECT MIN(races) FROM table_25421463_1 WHERE points = "38"
Below are sql tables 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 races were there when Sigachev had 38 points? ### Input: CREATE TABLE table_25421463_1 ( races INTEGER, poi...
Show different nominees and the number of musicals they have been nominated Plot them as bar chart, and could you order the total number in desc order?
CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text )
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee 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: Show different nominees and the number of musicals they have been nominated Plot them as bar chart, and could you order the ...
Which series occurred in which the semi-finalist was runner-up and the 7800.00 was 6420.00?
CREATE TABLE table_27681 ( "22/06/2008" text, "Indonesia Super Series 2008" text, "S.Series" text, "7800.00" text, "Runner-Up" text )
SELECT "Indonesia Super Series 2008" FROM table_27681 WHERE "Runner-Up" = 'Semi-Finalist' AND "7800.00" = '6420.00'
Below are sql tables 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 series occurred in which the semi-finalist was runner-up and the 7800.00 was 6420.00? ### Input: CREATE TABLE table_27...
Display a bar chart for what is the name of each aircraft and how many flights does each one complete?, and could you sort by the x axis in desc?
CREATE TABLE certificate ( eid number(9,0), aid number(9,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREATE TABLE employee ( ei...
SELECT name, COUNT(*) FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid ORDER BY 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: Display a bar chart for what is the name of each aircraft and how many flights does each one complete?, and could you sort b...
What was the Attendance on November 6, 1960?
CREATE TABLE table_8315 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT "Attendance" FROM table_8315 WHERE "Date" = 'november 6, 1960'
Below are sql tables 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 on November 6, 1960? ### Input: CREATE TABLE table_8315 ( "Week" real, "Date" text, "Opp...
How many bookings did each customer make? Show the customer id as the Y-axis and the first name as the X-axis in a bar chart, and rank by the customer_id in asc.
CREATE TABLE Customers ( customer_id INTEGER, coupon_id INTEGER, good_or_bad_customer VARCHAR(4), first_name VARCHAR(80), last_name VARCHAR(80), gender_mf VARCHAR(1), date_became_customer DATETIME, date_last_hire DATETIME ) CREATE TABLE Products_for_Hire ( product_id INTEGER, pr...
SELECT T1.first_name, T1.customer_id FROM Customers AS T1 JOIN Bookings AS T2 ON T1.customer_id = T2.customer_id ORDER BY T1.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: How many bookings did each customer make? Show the customer id as the Y-axis and the first name as the X-axis in a bar chart...
What courses are worth 10 credits ?
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) 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, additio...
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: What courses are worth 10 credits ? ### Input: CREATE TABLE requirement ( requirement_id int, requirement varchar, ...
can you list all flights that depart from ORLANDO to KANSAS CITY
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE state ( state_code text, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ORLANDO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'KANSAS...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: can you list all flights that depart from ORLANDO to KANSAS CITY ### Input: CREATE TABLE date_day ( month_number int, ...
What is the total PL G of player pennant, who has less than 7 CL G, less than 7 CL apps, and a FA YC of 0?
CREATE TABLE table_8288 ( "Player" text, "PL Apps" real, "PL G" real, "CL Apps" real, "CL G" real, "FAC / LC Apps" real, "FAC / LC G" real, "Total Apps" real, "Total G" real, "FA YC" real, "UEFA YC" real )
SELECT COUNT("PL G") FROM table_8288 WHERE "CL G" < '7' AND "CL Apps" < '7' AND "FA YC" = '0' AND "Player" = 'pennant'
Below are sql tables 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 PL G of player pennant, who has less than 7 CL G, less than 7 CL apps, and a FA YC of 0? ### Input: CREATE...
subjects with fasting triglyceride levels > 250 mg / dl prior to the study ( at sv1
CREATE TABLE table_train_277 ( "id" int, "gender" string, "cholesterol" float, "blood_platelet_counts" int, "creatinine_clearance_cl" float, "estimated_glomerular_filtration_rate_egfr" int, "severe_dyslipidemia" bool, "fasting_triglyceride" int, "body_mass_index_bmi" float, "trig...
SELECT * FROM table_train_277 WHERE fasting_triglyceride > 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: subjects with fasting triglyceride levels > 250 mg / dl prior to the study ( at sv1 ### Input: CREATE TABLE table_train_277 ...
For which tie was Scunthorpe United the away team?
CREATE TABLE table_name_5 ( tie_no VARCHAR, away_team VARCHAR )
SELECT tie_no FROM table_name_5 WHERE away_team = "scunthorpe 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: For which tie was Scunthorpe United the away team? ### Input: CREATE TABLE table_name_5 ( tie_no VARCHAR, away_team ...
what is the number of patients whose diagnoses short title is syncope and collapse and drug type is main?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Syncope and collapse" 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 whose diagnoses short title is syncope and collapse and drug type is main? ### Input: CREATE ...
Which IHSAA Class has a Location of linton?
CREATE TABLE table_64390 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "County" text, "Year Joined" real, "Previous Conference" text )
SELECT "IHSAA Class" FROM table_64390 WHERE "Location" = 'linton'
Below are sql tables 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 Location of linton? ### Input: CREATE TABLE table_64390 ( "School" text, "Location" text, ...
How many hosts does each nationality have? List the nationality and the count with a bar chart.
CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_host...
SELECT Nationality, COUNT(*) FROM host GROUP 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: How many hosts does each nationality have? List the nationality and the count with a bar chart. ### Input: CREATE TABLE part...
When South Melbourne was the Away Team, what was their score?
CREATE TABLE table_name_49 ( away_team VARCHAR )
SELECT away_team AS score FROM table_name_49 WHERE 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: When South Melbourne was the Away Team, what was their score? ### Input: CREATE TABLE table_name_49 ( away_team VARCHAR ...
What rank is the team with 1 silver, 3 bronze and a total of less than 8 medals?
CREATE TABLE table_name_32 ( rank VARCHAR, total VARCHAR, silver VARCHAR, bronze VARCHAR )
SELECT COUNT(rank) FROM table_name_32 WHERE silver = 1 AND bronze = 3 AND total < 8
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What rank is the team with 1 silver, 3 bronze and a total of less than 8 medals? ### Input: CREATE TABLE table_name_32 ( ...
what is the number of patients whose gender is f and diagnoses short title is depress psychosis-unspec?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Depress psychosis-unspec"
Below are sql tables 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 gender is f and diagnoses short title is depress psychosis-unspec? ### Input: CREATE TA...
How many weeks had an attendance larger than 84,816?
CREATE TABLE table_name_30 ( week VARCHAR, attendance INTEGER )
SELECT COUNT(week) FROM table_name_30 WHERE attendance > 84 OFFSET 816
Below are sql tables 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 weeks had an attendance larger than 84,816? ### Input: CREATE TABLE table_name_30 ( week VARCHAR, attendanc...
what were the last outputs of patient 26817 on the first intensive care unit visit?
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_i...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid 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 = 26817) AND NOT icustays.outtime IS NULL OR...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the last outputs of patient 26817 on the first intensive care unit visit? ### Input: CREATE TABLE patients ( r...
when has patient 035-24054 last had a enteral nepro intake yesterday?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, ...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-24054')) AND intakeoutput.cellpath LIKE '%intake%...
Below are sql tables 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 035-24054 last had a enteral nepro intake yesterday? ### Input: CREATE TABLE lab ( labid number, pa...
How many of the patients from a black/haitian ethnic origin were aged below 68?
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 = "BLACK/HAITIAN" AND demographic.age < "68"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many of the patients from a black/haitian ethnic origin were aged below 68? ### Input: CREATE TABLE demographic ( su...
In what Round was the draft pick from Florida with an Overall less than 166?
CREATE TABLE table_name_93 ( round INTEGER, college VARCHAR, overall VARCHAR )
SELECT AVG(round) FROM table_name_93 WHERE college = "florida" AND overall < 166
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what Round was the draft pick from Florida with an Overall less than 166? ### Input: CREATE TABLE table_name_93 ( rou...
since 4 years ago, what are the top three most frequently performed laboratory tests given to patients within the same month after being diagnosed with atrial fibrillation - without hemodynamic compromise?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'atrial fibrillation - without hemodynamic compromise...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 4 years ago, what are the top three most frequently performed laboratory tests given to patients within the same month...
Give me the comparison about Team_ID over the ACC_Regular_Season .
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_Regular_Season, Team_ID FROM basketball_match
Below are sql tables 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 Team_ID over the ACC_Regular_Season . ### Input: CREATE TABLE basketball_match ( Team_ID in...