instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday, I want to sort in asc by the Y-axis. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the ... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the sum of code , and group by attribute headquarter, rank bar from high to low order. | 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.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter 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 headquarter ... |
When south Melbourne was the home team, what was the away team? | CREATE TABLE table_name_53 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team FROM table_name_53 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: When south Melbourne was the home team, what was the away team? ### Input: CREATE TABLE table_name_53 (
away_team VARCHA... |
What date was Newcastle United the away team? | CREATE TABLE table_63324 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Date" FROM table_63324 WHERE "Away team" = 'newcastle united' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date was Newcastle United the away team? ### Input: CREATE TABLE table_63324 (
"Tie no" text,
"Home team" text,... |
Which Silver has a Total of 7, and a Gold larger than 1? | CREATE TABLE table_48067 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Silver") FROM table_48067 WHERE "Total" = '7' AND "Gold" > '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 Silver has a Total of 7, and a Gold larger than 1? ### Input: CREATE TABLE table_48067 (
"Rank" text,
"Nation"... |
What was the venue when the home team was footscray? | CREATE TABLE table_name_81 (
venue VARCHAR,
home_team VARCHAR
) | SELECT venue FROM table_name_81 WHERE home_team = "footscray" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the venue when the home team was footscray? ### Input: CREATE TABLE table_name_81 (
venue VARCHAR,
home_tea... |
Find ACC_Regular_Season and All_Games_Percent , and visualize them by a bar chart, I want to show X in desc order. | 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, All_Games_Percent FROM basketball_match ORDER BY ACC_Regular_Season 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_Regular_Season and All_Games_Percent , and visualize them by a bar chart, I want to show X in desc order. ### Input... |
Am I able to sign up for a Winter 2007 section of HEBREW 101 ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Am I able to sign up for a Winter 2007 section of HEBREW 101 ? ### Input: CREATE TABLE semester (
semester_id int,
s... |
What was the Opponents in Final during the match with a Score in Final of 6 4, 3 6, 5 7? | CREATE TABLE table_name_5 (
opponents_in_final VARCHAR,
score_in_final VARCHAR
) | SELECT opponents_in_final FROM table_name_5 WHERE score_in_final = "6–4, 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: What was the Opponents in Final during the match with a Score in Final of 6 4, 3 6, 5 7? ### Input: CREATE TABLE table_name_... |
when did patient 022-199074 last receive a lab test for -basos on the current hospital visit? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodi... | 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 = '022-199074' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = '-basos' ... | Below are sql tables 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 022-199074 last receive a lab test for -basos on the current hospital visit? ### Input: CREATE TABLE diagno... |
how many patients whose religion is christian scientist and diagnoses short title is atrial fibrillation? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND diagnoses.short_title = "Atrial fibrillation" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose religion is christian scientist and diagnoses short title is atrial fibrillation? ### Input: CREATE ... |
Final that has a Date of january 10, 2004 had what opponent? | CREATE TABLE table_name_23 (
opponent_in_the_final VARCHAR,
date VARCHAR
) | SELECT opponent_in_the_final FROM table_name_23 WHERE date = "january 10, 2004" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Final that has a Date of january 10, 2004 had what opponent? ### Input: CREATE TABLE table_name_23 (
opponent_in_the_fin... |
What is the number of gold medals for Lithuania (ltu), when the total is more than 1? | CREATE TABLE table_name_57 (
gold INTEGER,
nation VARCHAR,
total VARCHAR
) | SELECT MAX(gold) FROM table_name_57 WHERE nation = "lithuania (ltu)" AND total > 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 number of gold medals for Lithuania (ltu), when the total is more than 1? ### Input: CREATE TABLE table_name_57 ... |
Name the record for june 7 | CREATE TABLE table_17104539_9 (
record VARCHAR,
date VARCHAR
) | SELECT record FROM table_17104539_9 WHERE date = "June 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: Name the record for june 7 ### Input: CREATE TABLE table_17104539_9 (
record VARCHAR,
date VARCHAR
) ### Response: S... |
how many of the patients aged below 89 received drug via pb route? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "89" AND prescriptions.route = "PB" | Below are sql tables 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 aged below 89 received drug via pb route? ### Input: CREATE TABLE demographic (
subject_id text... |
What's the lowest Attendance for a Week of 2? | CREATE TABLE table_39102 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" real
) | SELECT MIN("Attendance") FROM table_39102 WHERE "Week" = '2' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the lowest Attendance for a Week of 2? ### Input: CREATE TABLE table_39102 (
"Week" real,
"Date" text,
"O... |
flights from BOSTON flights from PHILADELPHIA to BOSTON on monday | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 21 AND date_day.month_number = 2 AND da... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights from BOSTON flights from PHILADELPHIA to BOSTON on monday ### Input: CREATE TABLE code_description (
code varcha... |
What is the Opponent of the game with more than 13,567 in Attendance with more than 5 Points? | CREATE TABLE table_name_4 (
opponent VARCHAR,
points VARCHAR,
attendance VARCHAR
) | SELECT opponent FROM table_name_4 WHERE points > 5 AND attendance > 13 OFFSET 567 | Below are sql tables 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 Opponent of the game with more than 13,567 in Attendance with more than 5 Points? ### Input: CREATE TABLE table_... |
SPACE 574 is being offered next semester ? | CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semes... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'SPACE' AND course.number = 574 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: SPACE 574 is being offered next semester ? ### Input: CREATE TABLE offering_instructor (
offering_instructor_id int,
... |
what is TPA | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | SELECT DISTINCT airport_code FROM airport WHERE airport_code = 'TPA' | Below are sql tables 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 TPA ### Input: CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
... |
how many patients died in the same hospital visit after being diagnosed since 1 year ago with hypotension / pressor dependent? | 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 t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients died in the same hospital visit after being diagnosed since 1 year ago with hypotension / pressor dependen... |
What is the to par of the player with a 73-70-70-65=278 score? | CREATE TABLE table_name_92 (
to_par VARCHAR,
score VARCHAR
) | SELECT to_par FROM table_name_92 WHERE score = 73 - 70 - 70 - 65 = 278 | Below are sql tables 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 to par of the player with a 73-70-70-65=278 score? ### Input: CREATE TABLE table_name_92 (
to_par VARCHAR,
... |
Create a bar chart showing how many location across location, and show names from low to high order. | CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
... | SELECT Location, COUNT(Location) FROM shop GROUP BY Location ORDER BY Location | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Create a bar chart showing how many location across location, and show names from low to high order. ### Input: CREATE TABLE... |
Who was the Elevator of Giacomo Colonna? | CREATE TABLE table_63621 (
"Elector" text,
"Nationality" text,
"Cardinalatial order and title" text,
"Elevated" text,
"Elevator" text
) | SELECT "Elevator" FROM table_63621 WHERE "Elector" = 'giacomo colonna' | Below are sql tables 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 Elevator of Giacomo Colonna? ### Input: CREATE TABLE table_63621 (
"Elector" text,
"Nationality" text,
... |
Which Date has an Outcome of winner, and a Score of 7 5, 6 4? | CREATE TABLE table_name_69 (
date VARCHAR,
outcome VARCHAR,
score VARCHAR
) | SELECT date FROM table_name_69 WHERE outcome = "winner" AND score = "7–5, 6–4" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Date has an Outcome of winner, and a Score of 7 5, 6 4? ### Input: CREATE TABLE table_name_69 (
date VARCHAR,
... |
Draw a bar chart of main industry versus total number of market value | CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE company (
Company_ID int,
Rank i... | SELECT Main_Industry, SUM(Market_Value) FROM company GROUP BY Main_Industry | Below are sql tables 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 of main industry versus total number of market value ### Input: CREATE TABLE station_company (
Station_... |
What is the highest population in the millions that has an influence of 1.02? | CREATE TABLE table_name_55 (
population_millions INTEGER,
influence VARCHAR
) | SELECT MAX(population_millions) FROM table_name_55 WHERE influence = 1.02 | Below are sql tables 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 population in the millions that has an influence of 1.02? ### Input: CREATE TABLE table_name_55 (
po... |
what competition is lorenzo 's top position in ? | CREATE TABLE table_203_734 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | SELECT "competition" FROM table_203_734 ORDER BY "position" 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 competition is lorenzo 's top position in ? ### Input: CREATE TABLE table_203_734 (
id number,
"year" number,
... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of code , and group by attribute name, order in asc by the total number. | 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.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.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: For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and t... |
Pie. what is the first name and GPA of every student that has a GPA lower than average? | CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIG... | SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Pie. what is the first name and GPA of every student that has a GPA lower than average? ### Input: CREATE TABLE CLASS (
... |
how many patients admitted for elective procedure had hemodialysis? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Hemodialysis" | Below are sql tables 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 for elective procedure had hemodialysis? ### Input: CREATE TABLE procedures (
subject_id text... |
what was the score of the parallel bars with a floor exercise score more than 9.137, vault more than 9.5 and horizontal bar of 9.225? | CREATE TABLE table_54115 (
"Gymnast" text,
"Floor Exercise" real,
"Pommel Horse" real,
"Rings" real,
"Vault" real,
"Parallel Bars" real,
"Horizontal Bar" real,
"Total" real
) | SELECT SUM("Parallel Bars") FROM table_54115 WHERE "Floor Exercise" > '9.137' AND "Horizontal Bar" = '9.225' AND "Vault" > '9.5' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the score of the parallel bars with a floor exercise score more than 9.137, vault more than 9.5 and horizontal bar ... |
count the number of patients who have been dead after having been diagnosed with personal history uti within 2 months. | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_di... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients who have been dead after having been diagnosed with personal history uti within 2 months. ### I... |
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name, order from high to low by the names. | 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.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, give me the comparison about the average of code over t... |
Return a bar chart on how many customers use each payment method?, and could you sort in asc by the Y-axis? | CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Staff_Department_Assignments (
staff_id INTEGER,
department_id INTEGER,
date_assigned_from DATETIME,
job_title_code VARCHAR(10),
date_assigned_to DATETIME
)... | SELECT payment_method_code, COUNT(*) FROM Customers GROUP BY payment_method_code ORDER BY COUNT(*) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart on how many customers use each payment method?, and could you sort in asc by the Y-axis? ### Input: CREAT... |
if the peak is 9, how many weeks was it in the top 10? | CREATE TABLE table_26400041_2 (
weeks_in_top_10 INTEGER,
peak VARCHAR
) | SELECT MAX(weeks_in_top_10) FROM table_26400041_2 WHERE peak = 9 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: if the peak is 9, how many weeks was it in the top 10? ### Input: CREATE TABLE table_26400041_2 (
weeks_in_top_10 INTEGE... |
For those employees who was hired before 2002-06-21, give me the comparison about the average of department_id over the job_id , and group by attribute job_id by a bar chart. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, give me the comparison about the average of department_id over the job_... |
flights from CLEVELAND to KANSAS CITY | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost 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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'CLEVELAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'KANS... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights from CLEVELAND to KANSAS CITY ### Input: CREATE TABLE date_day (
month_number int,
day_number int,
year ... |
what are patient 92846's new drugs today compared to those yesterday? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id num... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92846) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are patient 92846's new drugs today compared to those yesterday? ### Input: CREATE TABLE labevents (
row_id number,... |
how many patients whose marital status is divorced and lab test name is cholesterol, hdl? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Cholesterol, HDL" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose marital status is divorced and lab test name is cholesterol, hdl? ### Input: CREATE TABLE procedures... |
what is the minimum total cost for a hospital that includes a drug called piperacillin-tazobactam 3.375 g mini-bag plus in 2105? | 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 MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'piperacillin-tazobactam 3.375 g mini-bag plus'... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the minimum total cost for a hospital that includes a drug called piperacillin-tazobactam 3.375 g mini-bag plus in 2... |
What is the total credit does each department offer, and list from high to low by the X. | CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
... | SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE 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: What is the total credit does each department offer, and list from high to low by the X. ### Input: CREATE TABLE PROFESSOR (... |
What is the lane with a time of 1:56.64, and a tank smaller than 7? | CREATE TABLE table_name_31 (
lane VARCHAR,
time VARCHAR,
rank VARCHAR
) | SELECT COUNT(lane) FROM table_name_31 WHERE time = "1:56.64" AND rank < 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 is the lane with a time of 1:56.64, and a tank smaller than 7? ### Input: CREATE TABLE table_name_31 (
lane VARCHAR... |
how many patients are admitted in the year before 2179 and diagnosed with icd9 code 5695? | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2179" AND diagnoses.icd9_code = "5695" | Below are sql tables 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 admitted in the year before 2179 and diagnosed with icd9 code 5695? ### Input: CREATE TABLE procedures... |
Visualize a bar chart about the distribution of All_Neutral and Team_ID , I want to display by the Y-axis from high to low please. | 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_Neutral, 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 All_Neutral and Team_ID , I want to display by the Y-axis from high to low p... |
What's the Chinese (simplified/traditional) name of Susong County? | CREATE TABLE table_23306 (
"English Name" text,
"Chinese Name (Simplified / Traditional)" text,
"Pinyin" text,
"Population" real,
"Post Code" real
) | SELECT "Chinese Name (Simplified / Traditional)" FROM table_23306 WHERE "English Name" = 'Susong County' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the Chinese (simplified/traditional) name of Susong County? ### Input: CREATE TABLE table_23306 (
"English Name" ... |
For each bed type, find the average room price Show bar chart, could you list by the Y-axis from low to high? | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each bed type, find the average room price Show bar chart, could you list by the Y-axis from low to high? ### Input: CRE... |
when does the train arriving at stamford east at 11.45 departure | CREATE TABLE table_22278 (
"Departure" text,
"Going to" text,
"Calling at" text,
"Arrival" text,
"Operator" text
) | SELECT "Departure" FROM table_22278 WHERE "Arrival" = '11.45' AND "Going to" = 'Stamford East' | Below are sql tables 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 does the train arriving at stamford east at 11.45 departure ### Input: CREATE TABLE table_22278 (
"Departure" text,... |
what was patient 28443 diagnosed with on this hospital visit for the first 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
value... | 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 = 28443 AND admissions.dischtime IS NULL) ORDER BY diagnoses_icd.charttime L... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was patient 28443 diagnosed with on this hospital visit for the first time? ### Input: CREATE TABLE cost (
row_id n... |
What is Designation, when Launch Date/Time ( GMT ) is 29 June 1972, 03:47? | CREATE TABLE table_name_73 (
designation VARCHAR,
launch_date_time___gmt__ VARCHAR
) | SELECT designation FROM table_name_73 WHERE launch_date_time___gmt__ = "29 june 1972, 03:47" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Designation, when Launch Date/Time ( GMT ) is 29 June 1972, 03:47? ### Input: CREATE TABLE table_name_73 (
desig... |
What is the name of the race held most recently? | CREATE TABLE races (
name VARCHAR,
date VARCHAR
) | SELECT name FROM races ORDER BY date DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the race held most recently? ### Input: CREATE TABLE races (
name VARCHAR,
date VARCHAR
) ### Re... |
What is the relationship between Team_ID and ACC_Percent , and group by attribute Team_Name? | 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_ID, ACC_Percent FROM basketball_match GROUP BY Team_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 is the relationship between Team_ID and ACC_Percent , and group by attribute Team_Name? ### Input: CREATE TABLE univers... |
Give me a bar chart for mean tonnage of each type, show by the bar in desc. | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY Type DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a bar chart for mean tonnage of each type, show by the bar in desc. ### Input: CREATE TABLE mission (
Mission_ID... |
what difference in weight was there in patient 006-118236 last measured on the last hospital visit compared to the second to last value measured on the last hospital visit? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquep... | SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-118236' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS N... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what difference in weight was there in patient 006-118236 last measured on the last hospital visit compared to the second to... |
For those employees who was hired before 2002-06-21, return a line chart about the change of salary over hire_date . | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varc... | SELECT HIRE_DATE, SALARY FROM employees WHERE HIRE_DATE < '2002-06-21' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, return a line chart about the change of salary over hire_date . ### Inp... |
when did patient 9294 last have minimum magnesium on their 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_icd_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9294 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'magne... | Below are sql tables 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 9294 last have minimum magnesium on their first hospital visit? ### Input: CREATE TABLE icustays (
row_... |
what medical procedure did patient 030-53416 last receive on the first hospital visit? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TAB... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53416' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | Below are sql tables 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 medical procedure did patient 030-53416 last receive on the first hospital visit? ### Input: CREATE TABLE lab (
lab... |
which was the last album to be produced ? | CREATE TABLE table_203_137 (
id number,
"title" text,
"album details" text,
"peak chart positions\nus" number,
"peak chart positions\nus r&b" number,
"certifications" text
) | SELECT "title" FROM table_203_137 ORDER BY id 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: which was the last album to be produced ? ### Input: CREATE TABLE table_203_137 (
id number,
"title" text,
"albu... |
Which Apogee was on 1959-02-20? | CREATE TABLE table_49020 (
"Date" text,
"Time ( GMT )" text,
"Serial" text,
"Apogee" text,
"Outcome" text
) | SELECT "Apogee" FROM table_49020 WHERE "Date" = '1959-02-20' | Below are sql tables 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 Apogee was on 1959-02-20? ### Input: CREATE TABLE table_49020 (
"Date" text,
"Time ( GMT )" text,
"Serial"... |
show me the CO flights with meals which depart SEATTLE on sunday for CHICAGO | CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment ... | 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, food_service WHERE (((date_day.day_number = 27 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight... | Below are sql tables 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 CO flights with meals which depart SEATTLE on sunday for CHICAGO ### Input: CREATE TABLE airline (
airline_c... |
For those products with a price between 60 and 120, return a bar chart about the distribution of name and price . | 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 Name, Price FROM Products WHERE Price BETWEEN 60 AND 120 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those products with a price between 60 and 120, return a bar chart about the distribution of name and price . ### Input:... |
Show me about the proportion of the sum of Height and the sum of Height in a pie chart. | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
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 re... | SELECT Sex, SUM(Height) 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: Show me about the proportion of the sum of Height and the sum of Height in a pie chart. ### Input: CREATE TABLE people (
... |
Where did a home team score 15.14 (104)? | CREATE TABLE table_56440 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_56440 WHERE "Home team score" = '15.14 (104)' | Below are sql tables 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 a home team score 15.14 (104)? ### Input: CREATE TABLE table_56440 (
"Home team" text,
"Home team score" t... |
Who has a Rank larger than 3 with a speed of 119.838mph? | CREATE TABLE table_name_12 (
rider VARCHAR,
rank VARCHAR,
speed VARCHAR
) | SELECT rider FROM table_name_12 WHERE rank > 3 AND speed = "119.838mph" | Below are sql tables 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 has a Rank larger than 3 with a speed of 119.838mph? ### Input: CREATE TABLE table_name_12 (
rider VARCHAR,
rank... |
For all employees who have the letters D or S in their first name, a line chart shows the trend of department_id over hire_date , I want to show in asc by the HIRE_DATE. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' 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 all employees who have the letters D or S in their first name, a line chart shows the trend of department_id over hire_d... |
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 sum of manager_id bin hire_date by weekday, and sort from high to low by the y-axis. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE T... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the s... |
Draw a bar chart for how many stores are headquarted in each city? | CREATE TABLE store (
Store_ID int,
Store_Name text,
Type text,
Area_size real,
Number_of_product_category real,
Ranking int
)
CREATE TABLE store_product (
Store_ID int,
Product_ID int
)
CREATE TABLE district (
District_ID int,
District_name text,
Headquartered_City text,
... | SELECT Headquartered_City, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.Store_ID = t2.Store_ID JOIN district AS t3 ON t2.District_ID = t3.District_ID GROUP BY t3.Headquartered_City | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart for how many stores are headquarted in each city? ### Input: CREATE TABLE store (
Store_ID int,
Sto... |
what is the seating capacity of the aircraft M80 | 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 airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
... | SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'M80' | Below are sql tables 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 seating capacity of the aircraft M80 ### Input: CREATE TABLE flight_leg (
flight_id int,
leg_number int,... |
What is the grid total for bruce mclaren with over 73 laps? | CREATE TABLE table_56764 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT SUM("Grid") FROM table_56764 WHERE "Laps" > '73' AND "Driver" = 'bruce mclaren' | Below are sql tables 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 grid total for bruce mclaren with over 73 laps? ### Input: CREATE TABLE table_56764 (
"Driver" text,
"Co... |
Name the result for friendly competition on 9 october 2010 | CREATE TABLE table_53754 (
"Goal" real,
"Date" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Result" FROM table_53754 WHERE "Competition" = 'friendly' AND "Date" = '9 october 2010' | Below are sql tables 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 result for friendly competition on 9 october 2010 ### Input: CREATE TABLE table_53754 (
"Goal" real,
"Date"... |
show me the number of patients with celo-vessicle fistula primary disease who are less than 74 years. | 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 = "CELO-VESSICLE FISTULA" AND demographic.age < "74" | Below are sql tables 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 patients with celo-vessicle fistula primary disease who are less than 74 years. ### Input: CREATE TABL... |
how many patients whose admission year is less than 2158 and lab test name is thyroxine (t4)? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2158" AND lab.label = "Thyroxine (T4)" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission year is less than 2158 and lab test name is thyroxine (t4)? ### Input: CREATE TABLE prescr... |
what is the number of patients whose language is russ and diagnoses short title is atrial fibrillation? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.language = "RUSS" AND diagnoses.short_title = "Atrial fibrillation" | Below are sql tables 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 language is russ and diagnoses short title is atrial fibrillation? ### Input: CREATE TA... |
Who has friends that are older than the average age? Print their friends and their ages as well | CREATE TABLE personfriend (
name text,
friend text,
year number
)
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
) | SELECT DISTINCT T2.name, T2.friend, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM person) | Below are sql tables 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 has friends that are older than the average age? Print their friends and their ages as well ### Input: CREATE TABLE pers... |
what is the number of patients whose year of birth is less than 2071? | 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 WHERE demographic.dob_year < "2071" | Below are sql tables 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 year of birth is less than 2071? ### Input: CREATE TABLE lab (
subject_id text,
... |
which drug is prescribed to patient with patient id 2560? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.subject_id = "2560" | Below are sql tables 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 drug is prescribed to patient with patient id 2560? ### Input: CREATE TABLE prescriptions (
subject_id text,
h... |
what is discharge location and discharge time of subject id 22999? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT demographic.discharge_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "22999" | Below are sql tables 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 discharge location and discharge time of subject id 22999? ### Input: CREATE TABLE prescriptions (
subject_id te... |
On what date was it announced that an asset was acquired for US$9 Million? | CREATE TABLE table_1373542_1 (
date_announced VARCHAR,
reported_cost VARCHAR
) | SELECT date_announced FROM table_1373542_1 WHERE reported_cost = "US$9 million" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date was it announced that an asset was acquired for US$9 Million? ### Input: CREATE TABLE table_1373542_1 (
dat... |
what FIRST class flights are available from DENVER to BALTIMORE on 7 25 1991 | CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturd... | 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, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((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: what FIRST class flights are available from DENVER to BALTIMORE on 7 25 1991 ### Input: CREATE TABLE fare_basis (
fare_b... |
A stacked bar chart shows the total number of ships with different nationalities and split by ship type, order by the Nationality from low to high. | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY Nationality | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A stacked bar chart shows the total number of ships with different nationalities and split by ship type, order by the Nation... |
What is the Set 1 with a Score of 3 0, and has a Set 3 of 15 12? | CREATE TABLE table_name_92 (
set_1 VARCHAR,
score VARCHAR,
set_3 VARCHAR
) | SELECT set_1 FROM table_name_92 WHERE score = "3–0" AND set_3 = "15–12" | Below are sql tables 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 Set 1 with a Score of 3 0, and has a Set 3 of 15 12? ### Input: CREATE TABLE table_name_92 (
set_1 VARCHAR,
... |
For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the job_id , and group by attribute job_id, could you order X from high to low order? | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the jo... |
What is the smallest number of episodes in a season? | CREATE TABLE table_2113721_7 (
episodes INTEGER
) | SELECT MIN(episodes) FROM table_2113721_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 is the smallest number of episodes in a season? ### Input: CREATE TABLE table_2113721_7 (
episodes INTEGER
) ### Re... |
How many musicals has each nominee been nominated for. Show a pie chart. | 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 | Below are sql tables 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 musicals has each nominee been nominated for. Show a pie chart. ### Input: CREATE TABLE actor (
Actor_ID int,
... |
What is the total number of medals when the Bronze, Silver, and Gold medals are smaller than 1? | CREATE TABLE table_53766 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Total") FROM table_53766 WHERE "Bronze" < '1' AND "Silver" < '1' AND "Gold" < '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 total number of medals when the Bronze, Silver, and Gold medals are smaller than 1? ### Input: CREATE TABLE tabl... |
provide the number of patients whose primary disease is bladder cancer/sda? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose primary disease is bladder cancer/sda? ### Input: CREATE TABLE procedures (
subject... |
what is the arrival time in SAN FRANCISCO for the 755 flight leaving WASHINGTON | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight... | SELECT DISTINCT flight.arrival_time 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 = 755 AND flight.to_airport = AIRPORT_SERVICE... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the arrival time in SAN FRANCISCO for the 755 flight leaving WASHINGTON ### Input: CREATE TABLE restriction (
re... |
what is the minimum age of patients whose gender is female and ethnicity is black/haitian? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "BLACK/HAITIAN" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the minimum age of patients whose gender is female and ethnicity is black/haitian? ### Input: CREATE TABLE prescript... |
On what date was it announced that an asset was acquired for US$9 Million? | CREATE TABLE table_18942 (
"Asset Acquired" text,
"Acquired From" text,
"Date Announced" text,
"Date Completed" text,
"Reported Cost" text
) | SELECT "Date Announced" FROM table_18942 WHERE "Reported Cost" = 'US$9 million' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date was it announced that an asset was acquired for US$9 Million? ### Input: CREATE TABLE table_18942 (
"Asset ... |
What golfer has 281 as their total? | CREATE TABLE table_59096 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | SELECT "Player" FROM table_59096 WHERE "Total" = '281' | Below are sql tables 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 golfer has 281 as their total? ### Input: CREATE TABLE table_59096 (
"Player" text,
"Country" text,
"Year(s... |
flights between TAMPA and ST. LOUIS | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name 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 = 'TAMPA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. LOUI... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights between TAMPA and ST. LOUIS ### Input: CREATE TABLE code_description (
code varchar,
description text
)
CRE... |
show me the round trip tickets from BALTIMORE to DALLAS | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufac... | 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 = 'DALLAS' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_id =... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the round trip tickets from BALTIMORE to DALLAS ### Input: CREATE TABLE restriction (
restriction_code text,
... |
Who did the Flames play against when Stephen Lee was the man of the match? | CREATE TABLE table_49589 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Competition" text,
"Man of the Match" text
) | SELECT "Opponent" FROM table_49589 WHERE "Man of the Match" = 'stephen lee' | Below are sql tables 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 Flames play against when Stephen Lee was the man of the match? ### Input: CREATE TABLE table_49589 (
"Date" ... |
how many hours have there been since patient 70267 was admitted to the hospital for? | CREATE TABLE diagnoses_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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id n... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 70267 AND admissions.dischtime IS NULL | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many hours have there been since patient 70267 was admitted to the hospital for? ### Input: CREATE TABLE diagnoses_icd (... |
What is the result foe October 12, 2005? | CREATE TABLE table_52316 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Result" FROM table_52316 WHERE "Date" = 'october 12, 2005' | Below are sql tables 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 result foe October 12, 2005? ### Input: CREATE TABLE table_52316 (
"Date" text,
"Venue" text,
"Score... |
What is Rank, when Event is 'LAPT4 S o Paulo'? | CREATE TABLE table_43939 (
"Rank" text,
"Event" text,
"Place" text,
"Name" text,
"Prize" text
) | SELECT "Rank" FROM table_43939 WHERE "Event" = 'lapt4 são paulo' | Below are sql tables 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 Rank, when Event is 'LAPT4 S o Paulo'? ### Input: CREATE TABLE table_43939 (
"Rank" text,
"Event" text,
... |
tell me patient 010-12376's weight change last measured on the last hospital visit compared to the value first measured on the last hospital visit? | 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 (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-12376' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS 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: tell me patient 010-12376's weight change last measured on the last hospital visit compared to the value first measured on t... |
what is age and drug type of subject id 2560? | 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 demographic.age, prescriptions.drug_type FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "2560" | Below are sql tables 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 drug type of subject id 2560? ### Input: CREATE TABLE procedures (
subject_id text,
hadm_id text,
... |
What player had a pick higher than 53, and a position of defensive tackle? | CREATE TABLE table_62828 (
"Pick" real,
"Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Player" FROM table_62828 WHERE "Pick" > '53' AND "Position" = 'defensive tackle' | Below are sql tables 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 player had a pick higher than 53, and a position of defensive tackle? ### Input: CREATE TABLE table_62828 (
"Pick" ... |
For all employees who have the letters D or S in their first name, find hire_date and the sum of employee_id bin hire_date by time, and visualize them by a bar chart, and could you order in descending by the Y? | 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(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, find hire_date and the sum of employee_id bin hire_date b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.