instruction
stringlengths
11
303
input
stringlengths
38
5.51k
output
stringlengths
25
1.92k
text
stringlengths
321
6.52k
Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , and show by the Y-axis in desc.
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 ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY 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: Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , and show by the Y-axis in desc. ### Input: ...
What is the range of married filing jointly or qualified widower in which married filing separately is $33,951 $68,525?
CREATE TABLE table_11647327_2 ( married_filing_jointly_or_qualified_widow_er_ VARCHAR, married_filing_separately VARCHAR )
SELECT married_filing_jointly_or_qualified_widow_er_ FROM table_11647327_2 WHERE married_filing_separately = "$33,951–$68,525"
Below are sql tables 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 range of married filing jointly or qualified widower in which married filing separately is $33,951 $68,525? ### ...
Bar chart of the total number from each party
CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text ) CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real )
SELECT Party, COUNT(*) FROM representative GROUP BY Party
Below are sql tables 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 the total number from each party ### Input: CREATE TABLE representative ( Representative_ID int, Name t...
What was the original air date for Series 36?
CREATE TABLE table_16444 ( "Series #" real, "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT "Original air date" FROM table_16444 WHERE "Series #" = '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 was the original air date for Series 36? ### Input: CREATE TABLE table_16444 ( "Series #" real, "Episode #" rea...
count the number of patients who have already received the endo polpectomy lrge int two times since 2 years ago.
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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 chartevents ( row_id number, subject_i...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 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 = 'endo polpectomy lrge ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients who have already received the endo polpectomy lrge int two times since 2 years ago. ### Input: ...
list flights from DETROIT to SAN DIEGO on thursday
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varcha...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN DIEGO' AND date_day.day_number = 24 AND date_day.month_number = 5 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: list flights from DETROIT to SAN DIEGO on thursday ### Input: CREATE TABLE days ( days_code varchar, day_name varcha...
what country won the most medals ?
CREATE TABLE table_203_206 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT "nation" FROM table_203_206 ORDER BY "total" DESC LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what country won the most medals ? ### Input: CREATE TABLE table_203_206 ( id number, "rank" number, "nation" te...
What is the average Gold, when Silver is less than 107, when Bronze is greater than 42, and when Rank is 3?
CREATE TABLE table_name_95 ( gold INTEGER, rank VARCHAR, silver VARCHAR, bronze VARCHAR )
SELECT AVG(gold) FROM table_name_95 WHERE silver < 107 AND bronze > 42 AND rank = "3"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average Gold, when Silver is less than 107, when Bronze is greater than 42, and when Rank is 3? ### Input: CREAT...
What is the lowest grid with time of +0.499,when laps are larger than 21?
CREATE TABLE table_name_33 ( grid INTEGER, time VARCHAR, laps VARCHAR )
SELECT MIN(grid) FROM table_name_33 WHERE time = "+0.499" AND laps > 21
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest grid with time of +0.499,when laps are larger than 21? ### Input: CREATE TABLE table_name_33 ( grid I...
What are the number of the names of photos taken with the lens brand 'Sigma' or 'Olympus'?, sort by the total number in asc.
CREATE TABLE mountain ( id int, name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE photos ( id int, camera_lens_id int, mountain_id int, color text, name text ) CREATE TABLE camera_lens ( id int, brand text, name text, focal_len...
SELECT T1.name, COUNT(T1.name) FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY COUNT(T1.name)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the number of the names of photos taken with the lens brand 'Sigma' or 'Olympus'?, sort by the total number in asc....
give me the number of patients whose admission year is less than 2131 and procedure short title is open biopsy soft tissue?
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.admityear < "2131" AND procedures.short_title = "Open biopsy soft tissue"
Below are sql tables 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 year is less than 2131 and procedure short title is open biopsy soft tissue? ...
find the number of male patients who stayed in the hospital for more than 69 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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay = "69"
Below are sql tables 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 male patients who stayed in the hospital for more than 69 days. ### Input: CREATE TABLE lab ( subject...
what are the top four most common lab tests until 2100?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( row_id number, subject_id num...
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 STRFTIME('%y', labevents.charttime) <= '2100' GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 4)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the top four most common lab tests until 2100? ### Input: CREATE TABLE d_items ( row_id number, itemid numb...
What are the number of the names of the technicians that are assigned to repair machines with more point values than 70?, and order from high to low by the total number.
CREATE TABLE repair_assignment ( technician_id int, repair_ID int, Machine_ID int ) CREATE TABLE technician ( technician_id real, Name text, Team text, Starting_Year real, Age int ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machi...
SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id WHERE T2.value_points > 70 GROUP BY Name ORDER BY COUNT(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: What are the number of the names of the technicians that are assigned to repair machines with more point values than 70?, an...
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the average of employee_id , and group by attribute job_id, rank in desc by the Y-axis.
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 JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID 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 those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the average of employe...
Which upper elective courses can CS students take ?
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 FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_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: Which upper elective courses can CS students take ? ### Input: CREATE TABLE course_offering ( offering_id int, cours...
what is the name of the drug that was prescribed to patient 12938 within 2 days after having been diagnosed with a hx of gi malignancy nec in 03/last year?
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 number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems...
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 12938 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hx of ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the name of the drug that was prescribed to patient 12938 within 2 days after having been diagnosed with a hx of gi ...
what the last height of patient 007-16774 in 04/2104.
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 patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-16774') AND NOT patient.admissionheight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) = '2104-04' ORDER BY patient.unitadmittime DESC LIMIT ...
Below are sql tables 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 the last height of patient 007-16774 in 04/2104. ### Input: CREATE TABLE patient ( uniquepid text, patienthealt...
Construction start of phase i includes what type?
CREATE TABLE table_name_61 ( type VARCHAR, construction_start VARCHAR )
SELECT type FROM table_name_61 WHERE construction_start = "phase 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: Construction start of phase i includes what type? ### Input: CREATE TABLE table_name_61 ( type VARCHAR, construction...
Find the average capacity among rooms in each building with a bar chart, and display by the y axis from high to low.
CREATE TABLE department ( dept_name varchar(20), building varchar(15), budget numeric(12,2) ) CREATE TABLE course ( course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester va...
SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY AVG(capacity) 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 the average capacity among rooms in each building with a bar chart, and display by the y axis from high to low. ### Inp...
count the number of patients whose primary disease is guillain barre syndrome and year of birth is less than 2052?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "GUILLAIN BARRE SYNDROME" AND demographic.dob_year < "2052"
Below are sql tables 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 primary disease is guillain barre syndrome and year of birth is less than 2052? ### Input...
When did Geelong play as the home team?
CREATE TABLE table_name_89 ( date VARCHAR, home_team VARCHAR )
SELECT date FROM table_name_89 WHERE home_team = "geelong"
Below are sql tables 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 Geelong play as the home team? ### Input: CREATE TABLE table_name_89 ( date VARCHAR, home_team VARCHAR ) ##...
In what lane did the swimmer get a time of 1:59.42?
CREATE TABLE table_name_97 ( lane INTEGER, time VARCHAR )
SELECT SUM(lane) FROM table_name_97 WHERE time = "1:59.42"
Below are sql tables 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 lane did the swimmer get a time of 1:59.42? ### Input: CREATE TABLE table_name_97 ( lane INTEGER, time VARCH...
what was the name of the specimen test that patient 031-4987 received in 12/2104 first?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987')) AND STRFTIME('%y-%m', microlab.culturetakentime) = '2104-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 name of the specimen test that patient 031-4987 received in 12/2104 first? ### Input: CREATE TABLE diagnosis ( ...
what is the first ward identifier of patient 5828 on the current hospital encounter?
CREATE TABLE d_labitems ( row_id number, itemid number, label 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 ) CREATE TABLE cost ( row_id nu...
SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828 AND admissions.dischtime IS NULL) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the first ward identifier of patient 5828 on the current hospital encounter? ### Input: CREATE TABLE d_labitems ( ...
Bar chart x axis dept code y axis minimal stu gpa, could you show by the DEPT_CODE in desc?
CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) 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...
SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_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: Bar chart x axis dept code y axis minimal stu gpa, could you show by the DEPT_CODE in desc? ### Input: CREATE TABLE COURSE (...
give me the number of patients whose gender is m and item id is 51180?
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.gender = "M" AND lab.itemid = "51180"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose gender is m and item id is 51180? ### Input: CREATE TABLE lab ( subject_id text, ...
For ELI 512 , is it always taught by either Prof. William Gehring or Prof. Peter Yaman ?
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_ti...
SELECT COUNT(*) = 0 FROM course, course_offering, instructor, offering_instructor WHERE (NOT instructor.name LIKE '%William Gehring%' AND NOT instructor.name LIKE '%Peter Yaman%') AND course.course_id = course_offering.course_id AND course.department = 'ELI' AND course.number = 512 AND offering_instructor.instructor_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 ELI 512 , is it always taught by either Prof. William Gehring or Prof. Peter Yaman ? ### Input: CREATE TABLE program ( ...
give me the number of patients whose insurance is self pay and diagnoses short title is seroma complicting proc?
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 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.insurance = "Self Pay" AND diagnoses.short_title = "Seroma complicting proc"
Below are sql tables 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 insurance is self pay and diagnoses short title is seroma complicting proc? ### Input: ...
Which constructor has a Time/Retired of +37.311?
CREATE TABLE table_name_91 ( constructor VARCHAR, time_retired VARCHAR )
SELECT constructor FROM table_name_91 WHERE time_retired = "+37.311"
Below are sql tables 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 constructor has a Time/Retired of +37.311? ### Input: CREATE TABLE table_name_91 ( constructor VARCHAR, time_r...
this year, how many patients were prescribed potassium chloride in the same month after they had a analgesics - narcotic analgesic?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, ...
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: this year, how many patients were prescribed potassium chloride in the same month after they had a analgesics - narcotic ana...
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and manufacturer , and group by attribute founder, sort by the bar in desc.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, 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: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and man...
What is the low attendance rate against buffalo bills?
CREATE TABLE table_77763 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT MIN("Attendance") FROM table_77763 WHERE "Opponent" = 'buffalo bills'
Below are sql tables 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 low attendance rate against buffalo bills? ### Input: CREATE TABLE table_77763 ( "Week" real, "Date" tex...
How many wins when the draws are less than 1 and more than 4 losses?
CREATE TABLE table_62962 ( "Hampden FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
SELECT AVG("Wins") FROM table_62962 WHERE "Draws" < '1' AND "Losses" > '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: How many wins when the draws are less than 1 and more than 4 losses? ### Input: CREATE TABLE table_62962 ( "Hampden FL" ...
Tell me the lowest pick number for new england revolution
CREATE TABLE table_name_84 ( pick__number INTEGER, mls_team VARCHAR )
SELECT MIN(pick__number) FROM table_name_84 WHERE mls_team = "new england revolution"
Below are sql tables 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 lowest pick number for new england revolution ### Input: CREATE TABLE table_name_84 ( pick__number INTEGER, ...
what procedure is provided to patient 728 two or more times until 07/2102?
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 d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 728...
Below are sql tables 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 728 two or more times until 07/2102? ### Input: CREATE TABLE inputevents_cv ( row_...
what diagnosis did patient 54825 receive during their last hospital visit for the last time?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, h...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime D...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what diagnosis did patient 54825 receive during their last hospital visit for the last time? ### Input: CREATE TABLE diagnos...
What is the total draw count with 52 goals and less than 15 losses?
CREATE TABLE table_11155 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
SELECT SUM("Draws") FROM table_11155 WHERE "Goals against" = '52' AND "Losses" < '15'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total draw count with 52 goals and less than 15 losses? ### Input: CREATE TABLE table_11155 ( "Position" rea...
Which courses have been or will be taught by Kathy Velikov ?
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Kathy Velikov%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_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: Which courses have been or will be taught by Kathy Velikov ? ### Input: CREATE TABLE program_requirement ( program_id in...
how many hours have elapsed since patient 007-15837 last received an intake of intake (ml)-gastrostomy/enterostomy gastrostomy 20 fr. luq on the current icu visit?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientuni...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many hours have elapsed since patient 007-15837 last received an intake of intake (ml)-gastrostomy/enterostomy gastrosto...
count the number of patients whose year of birth is less than 2104 and drug type is main?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2104" 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: count the number of patients whose year of birth is less than 2104 and drug type is main? ### Input: CREATE TABLE diagnoses ...
Most popular StackOverflow tags in March 2015.
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS MarchRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInMay, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Most popular StackOverflow tags in March 2015. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUni...
show me the flights from BOSTON to FORT WORTH on the morning of 7 10 1991
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( d...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'FORT WORTH' AND date_day.day_number = 10 AND date_day.month_number = 7 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: show me the flights from BOSTON to FORT WORTH on the morning of 7 10 1991 ### Input: CREATE TABLE airport ( airport_code...
give me the number of patients whose primary disease is brain mass;intracranial hemorrhage and year of death is less than or equal to 2131?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND demographic.dod_year <= "2131.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: give me the number of patients whose primary disease is brain mass;intracranial hemorrhage and year of death is less than or...
Name the partner for mark woodforde martina navratilova
CREATE TABLE table_1547951_3 ( partner VARCHAR, opponents VARCHAR )
SELECT partner FROM table_1547951_3 WHERE opponents = "Mark Woodforde Martina Navratilova"
Below are sql tables 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 partner for mark woodforde martina navratilova ### Input: CREATE TABLE table_1547951_3 ( partner VARCHAR, o...
how much has patient 27703's change of weight last measured on the first hospital visit compared to the first value measured on the first hospital visit?
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 d_labitems ( row_id number, itemid number, label te...
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 = 27703 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartev...
Below are sql tables 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 has patient 27703's change of weight last measured on the first hospital visit compared to the first value measured...
What was the partner of the team that faced the guillermo garc a-l pez albert portas on clay?
CREATE TABLE table_69837 ( "Outcome" text, "Date" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
SELECT "Partner" FROM table_69837 WHERE "Surface" = 'clay' AND "Opponents" = 'guillermo garcía-lópez albert portas'
Below are sql tables 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 partner of the team that faced the guillermo garc a-l pez albert portas on clay? ### Input: CREATE TABLE table_...
had patient 002-19159 got a diagnosis?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-19159'))
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 002-19159 got a diagnosis? ### Input: CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid num...
What is the date of the home team from South Melbourne?
CREATE TABLE table_56905 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_56905 WHERE "Home 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: What is the date of the home team from South Melbourne? ### Input: CREATE TABLE table_56905 ( "Home team" text, "Hom...
Who are the opponents with a record of 3-0?
CREATE TABLE table_8054 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Falcons points" real, "Opponents" real, "Record" text )
SELECT "Opponents" FROM table_8054 WHERE "Record" = '3-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: Who are the opponents with a record of 3-0? ### Input: CREATE TABLE table_8054 ( "Game" real, "Date" text, "Oppo...
what were the top three frequently prescribed drugs that patients were prescribed within the same month after having been diagnosed with sepsis - sepsis with multi-organ dysfunction this year?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, ...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis - sepsis with multi-organ dysfunction' 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: what were the top three frequently prescribed drugs that patients were prescribed within the same month after having been di...
tries against is 55, what is the try bonus?
CREATE TABLE table_35277 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text )
SELECT "Try bonus" FROM table_35277 WHERE "Tries against" = '55'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tries against is 55, what is the try bonus? ### Input: CREATE TABLE table_35277 ( "Club" text, "Played" text, "D...
Which game had a record of 6-9-7?
CREATE TABLE table_21649 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real )
SELECT "Game" FROM table_21649 WHERE "Record" = '6-9-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 game had a record of 6-9-7? ### Input: CREATE TABLE table_21649 ( "Game" real, "Date" text, "Opponent" tex...
What type of engine does the model with model designation 97F00 have?
CREATE TABLE table_23977 ( "Model Type" text, "Model Designation" text, "Engine" text, "Wheelbase (mm/inch)" text, "GVW (kg/ton)" text, "Axle Ratio" text )
SELECT "Engine" FROM table_23977 WHERE "Model Designation" = '97F00'
Below are sql tables 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 type of engine does the model with model designation 97F00 have? ### Input: CREATE TABLE table_23977 ( "Model Type"...
For those records from the products and each product's manufacturer, show me about the distribution of name and the amount of name , and group by attribute name in a bar chart, and display y-axis in desc order please.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(T2.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: For those records from the products and each product's manufacturer, show me about the distribution of name and the amount o...
how many patients below 83 years of age are diagnosed with single ib in-hosp w cs?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "83" AND diagnoses.short_title = "Single lb in-hosp w cs"
Below are sql tables 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 below 83 years of age are diagnosed with single ib in-hosp w cs? ### Input: CREATE TABLE diagnoses ( s...
Which Location has Floors smaller than 27, and a Building of 150 elgin?
CREATE TABLE table_49600 ( "Building" text, "Location" text, "Height" text, "Floors" real, "Status" text )
SELECT "Location" FROM table_49600 WHERE "Floors" < '27' AND "Building" = '150 elgin'
Below are sql tables 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 Location has Floors smaller than 27, and a Building of 150 elgin? ### Input: CREATE TABLE table_49600 ( "Building"...
A bar chart showing how many representatives in each party.
CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text ) CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real )
SELECT Party, COUNT(Party) FROM representative GROUP BY Party
Below are sql tables 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 showing how many representatives in each party. ### Input: CREATE TABLE representative ( Representative_ID i...
What is the average Total, when Gold is less than 0?
CREATE TABLE table_name_12 ( total INTEGER, gold INTEGER )
SELECT AVG(total) FROM table_name_12 WHERE gold < 0
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average Total, when Gold is less than 0? ### Input: CREATE TABLE table_name_12 ( total INTEGER, gold INT...
give me a good restaurant on bethel island rd in bethel island ?
CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rati...
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'bethel island' AND location.street_name = 'bethel island rd' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.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: give me a good restaurant on bethel island rd in bethel island ? ### Input: CREATE TABLE location ( restaurant_id int, ...
List the hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text.
CREATE TABLE screen_mode ( Graphics_mode VARCHAR, Type VARCHAR ) CREATE TABLE phone ( Hardware_Model_name VARCHAR, screen_mode VARCHAR )
SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = "Nokia Corporation" AND T1.Type <> "Text"
Below are sql tables 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 hardware model name for the phons that were produced by 'Nokia Corporation' but whose screen mode type is not Text....
How many sets were played in the tournament that had 4R in 2011 and 2R in 2008?
CREATE TABLE table_name_60 ( Id VARCHAR )
SELECT 2009 FROM table_name_60 WHERE 2011 = "4r" AND 2008 = "2r"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many sets were played in the tournament that had 4R in 2011 and 2R in 2008? ### Input: CREATE TABLE table_name_60 ( ...
Which college with a position of rb had a pick larger than 6 in round 28?
CREATE TABLE table_name_19 ( college VARCHAR, round VARCHAR, pick VARCHAR, position VARCHAR )
SELECT college FROM table_name_19 WHERE pick > 6 AND position = "rb" AND round = 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: Which college with a position of rb had a pick larger than 6 in round 28? ### Input: CREATE TABLE table_name_19 ( colleg...
indicate the yearly maximum amount of pantoprazole patient 011-41829 has received since 175 months ago.
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-41829')) AND intakeoutput.celllabel = 'panto...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: indicate the yearly maximum amount of pantoprazole patient 011-41829 has received since 175 months ago. ### Input: CREATE TA...
Find the average unit price of jazz tracks.
CREATE TABLE employee ( employeeid number, lastname text, firstname text, title text, reportsto number, birthdate time, hiredate time, address text, city text, state text, country text, postalcode text, phone text, fax text, email text ) CREATE TABLE playlist...
SELECT AVG(unitprice) FROM genre AS T1 JOIN track AS T2 ON T1.genreid = T2.genreid WHERE T1.name = "Jazz"
Below are sql tables 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 average unit price of jazz tracks. ### Input: CREATE TABLE employee ( employeeid number, lastname text, ...
What is H/A/N, when Score is 104-109?
CREATE TABLE table_50110 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text )
SELECT "H/A/N" FROM table_50110 WHERE "Score" = '104-109'
Below are sql tables 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 H/A/N, when Score is 104-109? ### Input: CREATE TABLE table_50110 ( "Date" text, "H/A/N" text, "Opponent...
Questions with a deleted answer and no other answers.
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDe...
SELECT Id AS "post_link", CreationDate, Tags FROM Posts WHERE NOT AnswerCount IS NULL AND AnswerCount < 1 ORDER BY CreationDate 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: Questions with a deleted answer and no other answers. ### Input: CREATE TABLE PostHistoryTypes ( Id number, Name tex...
i need a flight from SAN DIEGO CALIFORNIA to INDIANAPOLIS INDIANA leaving in the afternoon on tuesday
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zo...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight, state AS STATE_0, state AS STATE_1 WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'INDIANAPOLIS' AND date_day.day_numbe...
Below are sql tables 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 need a flight from SAN DIEGO CALIFORNIA to INDIANAPOLIS INDIANA leaving in the afternoon on tuesday ### Input: CREATE TABL...
Which away team had a score of 11.11 (77)?
CREATE TABLE table_57088 ( "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_57088 WHERE "Away team score" = '11.11 (77)'
Below are sql tables 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 away team had a score of 11.11 (77)? ### Input: CREATE TABLE table_57088 ( "Home team" text, "Home team score"...
show me flights leaving from DALLAS to BALTIMORE
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_...
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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO...
Below are sql tables 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 flights leaving from DALLAS to BALTIMORE ### Input: CREATE TABLE code_description ( code varchar, descriptio...
what are the three most commonly ordered specimen tests for patients who were previously diagnosed with encephalopathy within the same month in 2104?
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 treatment ( treatmenti...
SELECT t3.culturesite FROM (SELECT t2.culturesite, 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 = 'encephalopathy' AND STRFTIME('%y', diagnosis...
Below are sql tables 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 three most commonly ordered specimen tests for patients who were previously diagnosed with encephalopathy withi...
What number episode had a rating of 4.7?
CREATE TABLE table_23730973_5 ( no INTEGER, rating VARCHAR )
SELECT MIN(no) FROM table_23730973_5 WHERE rating = "4.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: What number episode had a rating of 4.7? ### Input: CREATE TABLE table_23730973_5 ( no INTEGER, rating VARCHAR ) ###...
display all flights from PITTSBURGH to SAN FRANCISCO on 8 2
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREA...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 2 AND date_day.month_number = 8 ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: display all flights from PITTSBURGH to SAN FRANCISCO on 8 2 ### Input: CREATE TABLE days ( days_code varchar, day_na...
what procedure is provided to patient 3369 two or more times in 01/2101?
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 336...
Below are sql tables 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 3369 two or more times in 01/2101? ### Input: CREATE TABLE procedures_icd ( row_id...
what team has a score of 11
CREATE TABLE table_75223 ( "Game" real, "October" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
SELECT "Record" FROM table_75223 WHERE "Game" = '11'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what team has a score of 11 ### Input: CREATE TABLE table_75223 ( "Game" real, "October" real, "Opponent" text, ...
has tpn d8 been given since 695 days ago to patient 1417?
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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1417)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tpn d8' 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: has tpn d8 been given since 695 days ago to patient 1417? ### Input: CREATE TABLE transfers ( row_id number, subject...
hba1c > 7.5 %
CREATE TABLE table_train_207 ( "id" int, "anemia" bool, "hemoglobin_a1c_hba1c" float, "diabetic" string, "body_mass_index_bmi" float, "age" float, "NOUSE" float )
SELECT * FROM table_train_207 WHERE hemoglobin_a1c_hba1c > 7.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: hba1c > 7.5 % ### Input: CREATE TABLE table_train_207 ( "id" int, "anemia" bool, "hemoglobin_a1c_hba1c" float, ...
Draw a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Home, and display in descending by the X.
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_Home, Team_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY All_Home 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: Draw a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Home, and display in descending...
Where did the player loaned out on 27 november 2008 move to ?
CREATE TABLE table_name_65 ( moving_to VARCHAR, date_from VARCHAR )
SELECT moving_to FROM table_name_65 WHERE date_from = "27 november 2008"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where did the player loaned out on 27 november 2008 move to ? ### Input: CREATE TABLE table_name_65 ( moving_to VARCHAR,...
A bar chart shows the distribution of meter_600 and ID , order in asc by the ID.
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
SELECT meter_600, 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 meter_600 and ID , order in asc by the ID. ### Input: CREATE TABLE stadium ( ID in...
who was the last representative to take office ?
CREATE TABLE table_203_345 ( id number, "name" text, "party" text, "took office" number, "left office" number )
SELECT "name" FROM table_203_345 ORDER BY "took office" 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: who was the last representative to take office ? ### Input: CREATE TABLE table_203_345 ( id number, "name" text, ...
how many patients are married and followed the procedure icd9 code 3607?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.icd9_code = "3607"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients are married and followed the procedure icd9 code 3607? ### Input: CREATE TABLE diagnoses ( subject_id ...
What is the name of the episode that had 8.51 million viewers?
CREATE TABLE table_26139405_1 ( title VARCHAR, viewers__in_millions_ VARCHAR )
SELECT title FROM table_26139405_1 WHERE viewers__in_millions_ = "8.51"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the episode that had 8.51 million viewers? ### Input: CREATE TABLE table_26139405_1 ( title VARCHAR,...
how many days it's been since patient 027-120575 first got a total bilirubin lab test in the current hospital visit?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE treatment ( treat...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120575' AND patient.hosp...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many days it's been since patient 027-120575 first got a total bilirubin lab test in the current hospital visit? ### Inp...
what types of ground transportation are available in DENVER
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what types of ground transportation are available in DENVER ### Input: CREATE TABLE aircraft ( aircraft_code varchar, ...
Show the number of different competition types with a bar graph.
CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Club_ID_2 int, Score text ) CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_...
SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type
Below are sql tables 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 different competition types with a bar graph. ### Input: CREATE TABLE competition_result ( Competitio...
find the flights that leave PHILADELPHIA and arrive in DALLAS by 1200
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) 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, ...
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 = 'DALLAS' AND flight.arrival_time <= 1200 AND flight.to_airport = AIRPORT_SERVICE_1.airport...
Below are sql tables 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 flights that leave PHILADELPHIA and arrive in DALLAS by 1200 ### Input: CREATE TABLE class_of_service ( booking...
What is the undecided percentage of the poll where Goldberg had 6%?
CREATE TABLE table_75617 ( "Source" text, "Date" text, "Goldberg" text, "Murray" text, "Silbert" text, "Undecided" text )
SELECT "Undecided" FROM table_75617 WHERE "Goldberg" = '6%'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the undecided percentage of the poll where Goldberg had 6%? ### Input: CREATE TABLE table_75617 ( "Source" text,...
A bar chart shows the distribution of Team_Name and School_ID .
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 Team_Name, School_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: A bar chart shows the distribution of Team_Name and School_ID . ### Input: CREATE TABLE university ( School_ID int, ...
what were the top three most frequent diagnoses that patients were given within 2 months after being diagnosed with acidosis this year?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE admissions ( ro...
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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
Below are sql tables 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 top three most frequent diagnoses that patients were given within 2 months after being diagnosed with acidosis...
How many Picks have a Round larger than 2, and a Name of lawrence sidbury, and an Overall smaller than 125?
CREATE TABLE table_5581 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT COUNT("Pick #") FROM table_5581 WHERE "Round" > '2' AND "Name" = 'lawrence sidbury' AND "Overall" < '125'
Below are sql tables 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 Picks have a Round larger than 2, and a Name of lawrence sidbury, and an Overall smaller than 125? ### Input: CREAT...
how many countries did not win any gold medals ?
CREATE TABLE table_204_761 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT COUNT("nation") FROM table_204_761 WHERE "gold" = 0
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many countries did not win any gold medals ? ### Input: CREATE TABLE table_204_761 ( id number, "rank" number, ...
What are the average number of played with goals of less than 43, more than 9 draws, a higher position than 17 and 30-8 points?
CREATE TABLE table_69318 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
SELECT AVG("Played") FROM table_69318 WHERE "Goals for" < '43' AND "Draws" > '9' AND "Position" > '17' AND "Points" = '30-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 are the average number of played with goals of less than 43, more than 9 draws, a higher position than 17 and 30-8 poin...
provide the number of patients whose age is less than 44 and admission year is less than 2152?
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.age < "44" AND demographic.admityear < "2152"
Below are sql tables 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 age is less than 44 and admission year is less than 2152? ### Input: CREATE TABLE proce...
what was the daily average value of weight for patient 033-9204 in 2103?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid...
SELECT AVG(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-9204') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y', patient.unitadmittime) = '2103' GROUP BY STRFTIME('%y-%m-%d', patient.unitad...
Below are sql tables 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 daily average value of weight for patient 033-9204 in 2103? ### Input: CREATE TABLE microlab ( microlabid n...
How many male patients are with lab test item id 51176?
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 = "M" AND lab.itemid = "51176"
Below are sql tables 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 male patients are with lab test item id 51176? ### Input: CREATE TABLE procedures ( subject_id text, hadm_i...
how many times on this month/17 patient 92846 produces a stool out colostomy output?
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABL...
SELECT COUNT(*) 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 = 92846)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'stool out colostom...
Below are sql tables 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 on this month/17 patient 92846 produces a stool out colostomy output? ### Input: CREATE TABLE inputevents_cv ...
For the attribute other_details and the amount of other_details, show their proportion by a pie chart.
CREATE TABLE Ref_Detention_Type ( detention_type_code VARCHAR(10), detention_type_description VARCHAR(80) ) CREATE TABLE Students_in_Detention ( student_id INTEGER, detention_id INTEGER, incident_id INTEGER ) CREATE TABLE Addresses ( address_id INTEGER, line_1 VARCHAR(120), line_2 VARC...
SELECT other_details, COUNT(other_details) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental 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 the attribute other_details and the amount of other_details, show their proportion by a pie chart. ### Input: CREATE TAB...
What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68?
CREATE TABLE table_name_33 ( number_of_seasons_in_liga_mx INTEGER, club VARCHAR, number_of_seasons_in_top_division VARCHAR )
SELECT MAX(number_of_seasons_in_liga_mx) FROM table_name_33 WHERE club = "cruz azul" AND number_of_seasons_in_top_division > 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: What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68...
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, and show by the bar in asc please.
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(4...
SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID 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 did not have any job in the past, return a bar chart about the distribution of job_id and the averag...