instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
Create a bar chart showing total number of number of platforms across location | CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE t... | SELECT Location, SUM(Number_of_Platforms) FROM station GROUP 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 total number of number of platforms across location ### Input: CREATE TABLE station (
Station... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and code , and group by attribute name. | 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 T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, 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: For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name an... |
Who was the winner of Stage 9 when then general classification was Danilo Di Luca? | CREATE TABLE table_13639 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text
) | SELECT "Winner" FROM table_13639 WHERE "General classification" = 'danilo di luca' AND "Stage" = '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: Who was the winner of Stage 9 when then general classification was Danilo Di Luca? ### Input: CREATE TABLE table_13639 (
... |
what is admission type and diagnoses icd9 code of subject name alice nixon? | 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.admission_type, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Alice Nixon" | Below are sql tables 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 admission type and diagnoses icd9 code of subject name alice nixon? ### Input: CREATE TABLE prescriptions (
subj... |
Visualize a bar chart about the distribution of Time and meter_100 , and list by the X in ascending please. | 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 swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_20... | SELECT Time, meter_100 FROM swimmer ORDER BY Time | Below are sql tables 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 Time and meter_100 , and list by the X in ascending please. ### Input: CREAT... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the average of manager_id bin hire_date by time in a bar chart, and order by the y axis in ascending. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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... | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(MANAGER_ID) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri... |
Which class would be the easiest class for me to take to meet the ULCS requirement ? | CREATE TABLE area (
course_id int,
area varchar
)
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 (
course_id int,
name varchar,
dep... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which class would be the easiest class for me to take to meet the ULCS requirement ? ### Input: CREATE TABLE area (
cour... |
What is the highest number of tourism receipts in 2011 US $ per capita with 19.4 % of GDP in 2003 tourism receipts and less than 655 US $ per arrival in 2011 tourism receipts? | CREATE TABLE table_name_99 (
tourism_receipts__2011___us INTEGER,
tourism_receipts__2003___as__percentage_of_gdp_ VARCHAR,
tourism_receipts__2011___us$_per_arrival_ VARCHAR
) | SELECT MAX(tourism_receipts__2011___us) AS $_per_capita_ FROM table_name_99 WHERE tourism_receipts__2003___as__percentage_of_gdp_ = "19.4" AND tourism_receipts__2011___us$_per_arrival_ < 655 | Below are sql tables 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 tourism receipts in 2011 US $ per capita with 19.4 % of GDP in 2003 tourism receipts and less ... |
give me the number of patients whose admission type is newborn? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose admission type is newborn? ### Input: CREATE TABLE demographic (
subject_id text,
... |
What constructor has less than 3 laps and grid 15? | CREATE TABLE table_name_22 (
constructor VARCHAR,
laps VARCHAR,
grid VARCHAR
) | SELECT constructor FROM table_name_22 WHERE laps < 3 AND grid = 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 constructor has less than 3 laps and grid 15? ### Input: CREATE TABLE table_name_22 (
constructor VARCHAR,
laps... |
A bar chart showing the first name of all the faculty members who participated in some activity, together with the number of activities they participated in. | CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
c... | SELECT Fname, COUNT(*) FROM Faculty AS T1 JOIN Faculty_Participates_in AS T2 ON T1.FacID = T2.FacID GROUP BY T1.FacID | Below are sql tables 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 the first name of all the faculty members who participated in some activity, together with the number of... |
Visualize a bar chart about the distribution of password and author_id . | CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARC... | SELECT password, author_id FROM Course_Authors_and_Tutors ORDER BY personal_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: Visualize a bar chart about the distribution of password and author_id . ### Input: CREATE TABLE Student_Course_Enrolment (
... |
Could I take 503 Mondays and Wednesdays ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE semester (
semester_id int,
... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND cour... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Could I take 503 Mondays and Wednesdays ? ### Input: CREATE TABLE instructor (
instructor_id int,
name varchar,
... |
What is the episode number of the episode with a production code of 4aky14? | CREATE TABLE table_29043 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT "No. in season" FROM table_29043 WHERE "Production code" = '4AKY14' | Below are sql tables 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 episode number of the episode with a production code of 4aky14? ### Input: CREATE TABLE table_29043 (
"No. i... |
Who was the opponent on week 3? | CREATE TABLE table_58037 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Opponent" FROM table_58037 WHERE "Week" = '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: Who was the opponent on week 3? ### Input: CREATE TABLE table_58037 (
"Week" real,
"Date" text,
"Opponent" text,... |
Name the most draws when wins is 3 | CREATE TABLE table_14876228_1 (
draws INTEGER,
wins VARCHAR
) | SELECT MAX(draws) FROM table_14876228_1 WHERE wins = 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: Name the most draws when wins is 3 ### Input: CREATE TABLE table_14876228_1 (
draws INTEGER,
wins VARCHAR
) ### Resp... |
How many games did they play on january 11? | CREATE TABLE table_30065 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("Location Attendance") FROM table_30065 WHERE "Date" = 'January 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: How many games did they play on january 11? ### Input: CREATE TABLE table_30065 (
"Game" real,
"Date" text,
"Tea... |
What score has 3-7 as the record? | CREATE TABLE table_name_46 (
score VARCHAR,
record VARCHAR
) | SELECT score FROM table_name_46 WHERE record = "3-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 score has 3-7 as the record? ### Input: CREATE TABLE table_name_46 (
score VARCHAR,
record VARCHAR
) ### Respon... |
Where was the fight that lasted 5:00 when Yundt's record was 8-4? | CREATE TABLE table_9866 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Location" FROM table_9866 WHERE "Time" = '5:00' AND "Record" = '8-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: Where was the fight that lasted 5:00 when Yundt's record was 8-4? ### Input: CREATE TABLE table_9866 (
"Res." text,
... |
List the number of completion students in each day and group by date of completion in a line chart, and show from high to low by the X-axis please. | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Students (
stud... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment GROUP BY date_of_completion ORDER BY date_of_completion DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the number of completion students in each day and group by date of completion in a line chart, and show from high to lo... |
for the last time during this month, when did patient 021-80293 get a lab test? | 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 = '021-80293')) AND DATETIME(lab.labresulttime, 'start of month') = 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: for the last time during this month, when did patient 021-80293 get a lab test? ### Input: CREATE TABLE diagnosis (
diag... |
please list the prices for a RENTAL CAR in PITTSBURGH | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
... | SELECT DISTINCT ground_service.ground_fare FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: please list the prices for a RENTAL CAR in PITTSBURGH ### Input: CREATE TABLE date_day (
month_number int,
day_numbe... |
Which team has a home team score of 17.12 (114)? | CREATE TABLE table_54550 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_54550 WHERE "Home team score" = '17.12 (114)' | Below are sql tables 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 team has a home team score of 17.12 (114)? ### Input: CREATE TABLE table_54550 (
"Home team" text,
"Home team ... |
Who is the player from La Costa Canyon High School? | CREATE TABLE table_name_79 (
player VARCHAR,
school VARCHAR
) | SELECT player FROM table_name_79 WHERE school = "la costa canyon high school" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the player from La Costa Canyon High School? ### Input: CREATE TABLE table_name_79 (
player VARCHAR,
school V... |
Does Prof. Justin Schon teach 503 classes on Fridays ? | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
ins... | SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.number = 503 AND c... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Does Prof. Justin Schon teach 503 classes on Fridays ? ### Input: CREATE TABLE program_course (
program_id int,
cour... |
how many patients whose gender is f and discharge location is left against medical advi? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" | Below are sql tables 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 gender is f and discharge location is left against medical advi? ### Input: CREATE TABLE demographic... |
Which Opponents has a Score of 6 3, 6 4, 6 1? | CREATE TABLE table_6971 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Opponents" FROM table_6971 WHERE "Score" = '6–3, 6–4, 6–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 Opponents has a Score of 6 3, 6 4, 6 1? ### Input: CREATE TABLE table_6971 (
"Outcome" text,
"Date" text,
... |
what is primary disease and procedure short title of subject name orville ford? | 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.diagnosis, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Orville Ford" | Below are sql tables 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 primary disease and procedure short title of subject name orville ford? ### Input: CREATE TABLE prescriptions (
... |
Which Player has a Score of 72-69-73=214? | CREATE TABLE table_48295 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Player" FROM table_48295 WHERE "Score" = '72-69-73=214' | Below are sql tables 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 Player has a Score of 72-69-73=214? ### Input: CREATE TABLE table_48295 (
"Place" text,
"Player" text,
"Co... |
calculate the number of inputs patient 18757 had. | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icust... | SELECT SUM(inputevents_cv.amount) 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 = 18757)) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the number of inputs patient 18757 had. ### Input: CREATE TABLE labevents (
row_id number,
subject_id numb... |
i would like a flight between DENVER and SAN FRANCISCO leaving from DENVER in the afternoon and arriving at 1700 it must be a nonstop flight | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE ground_service (
city_code text,
airport_co... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.arrival_time = 1700 AND flight.to_airport = AIRPORT_SERVICE_1... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i would like a flight between DENVER and SAN FRANCISCO leaving from DENVER in the afternoon and arriving at 1700 it must be ... |
Round 1 is in what circuit? | CREATE TABLE table_28545 (
"Round" text,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
) | SELECT "Circuit" FROM table_28545 WHERE "Round" = '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: Round 1 is in what circuit? ### Input: CREATE TABLE table_28545 (
"Round" text,
"Circuit" text,
"Date" text,
... |
list AA flights from NEWARK to NASHVILLE | 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 state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airline (
airline_code varc... | 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 = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEW... | Below are sql tables 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 AA flights from NEWARK to NASHVILLE ### Input: CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREAT... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of revenue , and group by attribute name. | 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, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.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: For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and t... |
What is the 2012 population of Indonesia? | CREATE TABLE table_4095 (
"Country" text,
"Area (km 2 )" real,
"Population(2012)" real,
"Density (/km 2 )" real,
"GDP (nominal), USD (2012)" text,
"GDP (nominal) per capita, USD (2012)" text,
"HDI (2012)" text,
"Capital" text
) | SELECT "Population(2012)" FROM table_4095 WHERE "Country" = 'Indonesia' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the 2012 population of Indonesia? ### Input: CREATE TABLE table_4095 (
"Country" text,
"Area (km 2 )" real,
... |
Who had the high point total when the team was 24-17? | CREATE TABLE table_13762472_5 (
high_points VARCHAR,
record VARCHAR
) | SELECT high_points FROM table_13762472_5 WHERE record = "24-17" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who had the high point total when the team was 24-17? ### Input: CREATE TABLE table_13762472_5 (
high_points VARCHAR,
... |
What is the to par when the score is 73-69-67-74=283? | CREATE TABLE table_name_40 (
to_par VARCHAR,
score VARCHAR
) | SELECT to_par FROM table_name_40 WHERE score = 73 - 69 - 67 - 74 = 283 | Below are sql tables 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 when the score is 73-69-67-74=283? ### Input: CREATE TABLE table_name_40 (
to_par VARCHAR,
score ... |
what are the specimen tests top four most frequently ordered in the last year? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE 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: what are the specimen tests top four most frequently ordered in the last year? ### Input: CREATE TABLE admissions (
row_... |
For the attribute All_Road and All_Games_Percent, show their proportion by a pie chart. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Road, All_Games_Percent 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: For the attribute All_Road and All_Games_Percent, show their proportion by a pie chart. ### Input: CREATE TABLE basketball_m... |
i am interested in booking an early morning flight from DALLAS into HOUSTON and returning in the late evening | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (((flight.departure_time <= 2200 AND flight.departure_time >= 2000) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON' AND fligh... | Below are sql tables 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 am interested in booking an early morning flight from DALLAS into HOUSTON and returning in the late evening ### Input: CRE... |
Will Prof. Anthony Collings be teaching 590 for next Winter ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,... | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 590 AND instructor.name LIKE '%Anthony Collings%' AND offering_instructor.instructor_id = instructor.instructor_id AND offerin... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Will Prof. Anthony Collings be teaching 590 for next Winter ? ### Input: CREATE TABLE requirement (
requirement_id int,
... |
what is diagnoses short title of diagnoses icd9 code 3671? | 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 diagnoses.short_title FROM diagnoses WHERE diagnoses.icd9_code = "3671" | Below are sql tables 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 diagnoses short title of diagnoses icd9 code 3671? ### Input: CREATE TABLE demographic (
subject_id text,
ha... |
What is the chassis for Augusto Scalbi on Team RP Motorsport? | CREATE TABLE table_44020 (
"Team" text,
"Driver" text,
"Class" text,
"Chassis" text,
"Rounds" text
) | SELECT "Chassis" FROM table_44020 WHERE "Team" = 'rp motorsport' AND "Driver" = 'augusto scalbi' | Below are sql tables 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 chassis for Augusto Scalbi on Team RP Motorsport? ### Input: CREATE TABLE table_44020 (
"Team" text,
"Dr... |
what tournament happened on march 27, 2006? | CREATE TABLE table_name_34 (
tournament VARCHAR,
date VARCHAR
) | SELECT tournament FROM table_name_34 WHERE date = "march 27, 2006" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what tournament happened on march 27, 2006? ### Input: CREATE TABLE table_name_34 (
tournament VARCHAR,
date VARCHAR... |
Show all artist names and the number of exhibitions for each artist. Show bar chart. | CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int... | SELECT Name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.Artist_ID = T2.Artist_ID GROUP BY T1.Artist_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 all artist names and the number of exhibitions for each artist. Show bar chart. ### Input: CREATE TABLE exhibition (
... |
how much is patient 006-168146 obligated to pay for the hospitalization during the last hospital encounter? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-168146' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime 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: how much is patient 006-168146 obligated to pay for the hospitalization during the last hospital encounter? ### Input: CREAT... |
What is the Tie number for the match where Dartford was the hone team? | CREATE TABLE table_name_31 (
tie_no VARCHAR,
home_team VARCHAR
) | SELECT tie_no FROM table_name_31 WHERE home_team = "dartford" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Tie number for the match where Dartford was the hone team? ### Input: CREATE TABLE table_name_31 (
tie_no VA... |
what was patient 22973's change in platelet count last measured on the first hospital visit compared to the value first measured on the first hospital visit? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime tim... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22973 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 ... | Below are sql tables 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 22973's change in platelet count last measured on the first hospital visit compared to the value first meas... |
Draw a bar chart for what is the average number of stars that each reviewer awards for a movie?, could you display in ascending by the X-axis? | CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart for what is the average number of stars that each reviewer awards for a movie?, could you display in ascend... |
Which player was picked for the Chicago Sky? | CREATE TABLE table_name_47 (
player VARCHAR,
wnba_team VARCHAR
) | SELECT player FROM table_name_47 WHERE wnba_team = "chicago sky" | Below are sql tables 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 player was picked for the Chicago Sky? ### Input: CREATE TABLE table_name_47 (
player VARCHAR,
wnba_team VARCH... |
Show me easy 300 -level courses . | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
... | SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND program_course.course_id = course.course_id AND program_course.workload < 3 ORDER BY program_course.workload | Below are sql tables 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 easy 300 -level courses . ### Input: CREATE TABLE program (
program_id int,
name varchar,
college varcha... |
what is the price for the oxybutynin? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
row_id number,
... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'oxybutynin') | Below are sql tables 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 price for the oxybutynin? ### Input: CREATE TABLE d_items (
row_id number,
itemid number,
label text... |
What are the speeds of the longest roller coaster? | CREATE TABLE roller_coaster (
Speed VARCHAR,
LENGTH VARCHAR
) | SELECT Speed FROM roller_coaster ORDER BY LENGTH 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 are the speeds of the longest roller coaster? ### Input: CREATE TABLE roller_coaster (
Speed VARCHAR,
LENGTH VA... |
Which To par has a Score of 78-74-71-75=298? | CREATE TABLE table_61700 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" real
) | SELECT AVG("To par") FROM table_61700 WHERE "Score" = '78-74-71-75=298' | Below are sql tables 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 To par has a Score of 78-74-71-75=298? ### Input: CREATE TABLE table_61700 (
"Place" text,
"Player" text,
... |
Name the high assists for may 21 | CREATE TABLE table_21829 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | SELECT "High assists" FROM table_21829 WHERE "Date" = 'May 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: Name the high assists for may 21 ### Input: CREATE TABLE table_21829 (
"Game" real,
"Date" text,
"Team" text,
... |
how many of the asian patients were diagnosed with panic disorder without agoraphobia? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "ASIAN" AND diagnoses.long_title = "Panic disorder without agoraphobia" | Below are sql tables 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 asian patients were diagnosed with panic disorder without agoraphobia? ### Input: CREATE TABLE demographic (... |
Tag wikis with internal http:// links. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean... | SELECT DISTINCT Tags.Id, Tags.Count, Tags.TagName, 'site://tags/' + Tags.TagName + '/info|Url' AS Url FROM Tags LEFT JOIN Posts ON Posts.Id = Tags.WikiPostId OR Posts.Id = Tags.ExcerptPostId WHERE (LOWER(Posts.Body) LIKE '%http://%.stackexchange.com%' OR LOWER(Posts.Body) LIKE '%http://stackexchange.com%' OR LOWER(Post... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tag wikis with internal http:// links. ### Input: CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name... |
give me the number of patients whose language is engl and diagnoses long title is chronic total occlusion of coronary artery? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.language = "ENGL" AND diagnoses.long_title = "Chronic total occlusion of coronary artery" | Below are sql tables 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 language is engl and diagnoses long title is chronic total occlusion of coronary artery... |
what is the even when the location is tokyo, japan and the record is 6-1? | CREATE TABLE table_name_7 (
event VARCHAR,
location VARCHAR,
record VARCHAR
) | SELECT event FROM table_name_7 WHERE location = "tokyo, japan" AND record = "6-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 even when the location is tokyo, japan and the record is 6-1? ### Input: CREATE TABLE table_name_7 (
event V... |
Which classes has Dr. Frederick Conrad taught previously ? | CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which classes has Dr. Frederick Conrad taught previously ? ### Input: CREATE TABLE program_requirement (
program_id int,... |
how much ipratropium bromide neb is prescribed to patient 78076 in total in 10/2101? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 78076) AND prescriptions.drug = 'ipratropium bromide neb' AND STRFTIME('%y-%m', prescriptions.startdate) = '2101-10' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much ipratropium bromide neb is prescribed to patient 78076 in total in 10/2101? ### Input: CREATE TABLE d_items (
r... |
has patient 41014 been admitted to a hospital er the last year? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 41014 AND admissions.admission_location = 'emergency room admit' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has patient 41014 been admitted to a hospital er the last year? ### Input: CREATE TABLE microbiologyevents (
row_id numb... |
Find the id of the order which is shipped most recently. | CREATE TABLE shipments (
order_id VARCHAR,
shipment_date INTEGER
) | SELECT order_id FROM shipments WHERE shipment_date = (SELECT MAX(shipment_date) FROM shipments) | Below are sql tables 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 id of the order which is shipped most recently. ### Input: CREATE TABLE shipments (
order_id VARCHAR,
shipm... |
What was the team score when Tim Duncan (12) got the high rebounds? | CREATE TABLE table_29788 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Score" FROM table_29788 WHERE "High rebounds" = 'Tim Duncan (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 was the team score when Tim Duncan (12) got the high rebounds? ### Input: CREATE TABLE table_29788 (
"Game" real,
... |
What is the smallest crowd to see the away team score 10.7 (67)? | CREATE TABLE table_74718 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_74718 WHERE "Away team score" = '10.7 (67)' | Below are sql tables 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 crowd to see the away team score 10.7 (67)? ### Input: CREATE TABLE table_74718 (
"Home team" text,... |
since 82 months ago, is patient 1912's respiratory rate ever greater than 11.0? | 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_procedures (
row_id number,
icd9_code text,
s... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1912)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'respiratory rate' ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 82 months ago, is patient 1912's respiratory rate ever greater than 11.0? ### Input: CREATE TABLE icustays (
row_i... |
What is the relationship between ID and meter_100 ? | 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 swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_20... | SELECT ID, meter_100 FROM swimmer | Below are sql tables 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 ID and meter_100 ? ### Input: CREATE TABLE stadium (
ID int,
name text,
Capacit... |
Count the number of patients whose diagnosis icd9 code is 27801. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "27801" | Below are sql tables 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 diagnosis icd9 code is 27801. ### Input: CREATE TABLE demographic (
subject_id text,
... |
If the RR Rate is less than 0.75 with a result of RR:08,09, what is the average appeared? | CREATE TABLE table_6289 (
"Player" text,
"Result" text,
"Appeared" real,
"RR W\u2013L" text,
"RR W Rate" real
) | SELECT AVG("Appeared") FROM table_6289 WHERE "RR W Rate" < '0.75' AND "Result" = 'rr:08,09' | Below are sql tables 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 RR Rate is less than 0.75 with a result of RR:08,09, what is the average appeared? ### Input: CREATE TABLE table_6289... |
when did patient 11688 get its last urine microbiology test in 11/last year? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11688) AND microbiologyevents.spec_type_desc = 'urine' AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start 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: when did patient 11688 get its last urine microbiology test in 11/last year? ### Input: CREATE TABLE inputevents_cv (
ro... |
What are the nationalities and their average ages of journalists Show me a bar chart, and order by the Y from low to high please. | CREATE TABLE journalist (
journalist_ID int,
Name text,
Nationality text,
Age text,
Years_working int
)
CREATE TABLE event (
Event_ID int,
Date text,
Venue text,
Name text,
Event_Attendance int
)
CREATE TABLE news_report (
journalist_ID int,
Event_ID int,
Work_Type ... | SELECT Nationality, AVG(Age) FROM journalist GROUP BY Nationality ORDER BY AVG(Age) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the nationalities and their average ages of journalists Show me a bar chart, and order by the Y from low to high pl... |
what does MCO stand for | 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 flight_stop (
flight_id int,
stop_number int,
stop_days text... | SELECT DISTINCT airport_code FROM airport WHERE airport_code = 'MCO' | Below are sql tables 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 does MCO stand for ### Input: CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
... |
Find the max, average, and minimum gpa of all students in each department. | CREATE TABLE student (
dept_code VARCHAR,
stu_gpa INTEGER
) | SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_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: Find the max, average, and minimum gpa of all students in each department. ### Input: CREATE TABLE student (
dept_code V... |
Compare the smallest enrollment of schools in each state using a bar chart, list total number in asc order. | CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) | SELECT cName, MIN(enr) FROM College GROUP BY state ORDER BY MIN(enr) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Compare the smallest enrollment of schools in each state using a bar chart, list total number in asc order. ### Input: CREAT... |
specify the admission time of patient id 42963 and name of drug he was treated with | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT demographic.admittime, prescriptions.drug FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "42963" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: specify the admission time of patient id 42963 and name of drug he was treated with ### Input: CREATE TABLE procedures (
... |
how many hours have elapsed since patient 12927 had chronic obst asthma nos diagnosed for the last time in this hospital encounter? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chronic obst asthma nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM adm... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many hours have elapsed since patient 12927 had chronic obst asthma nos diagnosed for the last time in this hospital enc... |
What is the average amount of spectators when Essendon played as the home team? | CREATE TABLE table_55440 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT AVG("Crowd") FROM table_55440 WHERE "Home team" = 'essendon' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average amount of spectators when Essendon played as the home team? ### Input: CREATE TABLE table_55440 (
"H... |
how many patients whose diagnoses short title is hypertension nos and drug route is iv? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hypertension NOS" AND prescriptions.route = "IV" | Below are sql tables 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 diagnoses short title is hypertension nos and drug route is iv? ### Input: CREATE TABLE lab (
su... |
What was the score when the loss was hideo nomo (3 5)? | CREATE TABLE table_name_57 (
score VARCHAR,
loss VARCHAR
) | SELECT score FROM table_name_57 WHERE loss = "hideo nomo (3–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 when the loss was hideo nomo (3 5)? ### Input: CREATE TABLE table_name_57 (
score VARCHAR,
loss V... |
What is the home team score for the team that has a home field of the Telstra Dome? | CREATE TABLE table_name_98 (
home_team VARCHAR,
ground VARCHAR
) | SELECT home_team AS score FROM table_name_98 WHERE ground = "telstra dome" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the home team score for the team that has a home field of the Telstra Dome? ### Input: CREATE TABLE table_name_98 (
... |
What is the Home team of the event on Thursday, December 11 with Visitor Modo Hockey? | CREATE TABLE table_65163 (
"Round" real,
"Date" text,
"Home" text,
"Result" text,
"Visitor" text,
"Venue" text,
"Attendance" real
) | SELECT "Home" FROM table_65163 WHERE "Visitor" = 'modo hockey' AND "Date" = 'thursday, december 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 is the Home team of the event on Thursday, December 11 with Visitor Modo Hockey? ### Input: CREATE TABLE table_65163 (
... |
the subject has a recent history ( within 2 years ) of alcohol or substance abuse / dependence. | CREATE TABLE table_train_137 (
"id" int,
"hbv" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"substance_dependence" bool,
"hcv" bool,
"schizophrenia" bool,
"neutrophil_count" int,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"platelet_count"... | SELECT * FROM table_train_137 WHERE alcohol_abuse = 1 OR substance_dependence = 1 OR substance_dependence = 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: the subject has a recent history ( within 2 years ) of alcohol or substance abuse / dependence. ### Input: CREATE TABLE tabl... |
Which player was from Fermanagh and had an average score of 22? | CREATE TABLE table_name_53 (
average INTEGER,
total VARCHAR,
county VARCHAR
) | SELECT AVG(average) FROM table_name_53 WHERE total = 22 AND county = "fermanagh" | Below are sql tables 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 player was from Fermanagh and had an average score of 22? ### Input: CREATE TABLE table_name_53 (
average INTEGER,... |
For each city, return the highest latitude among its stations. Show bar chart. | CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE station (
id INTEG... | SELECT city, MAX(lat) FROM station GROUP BY 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: For each city, return the highest latitude among its stations. Show bar chart. ### Input: CREATE TABLE trip (
id INTEGER... |
provide the number of patients whose diagnosis icd9 code is v1272 and lab test fluid is ascites. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "V1272" AND lab.fluid = "Ascites" | Below are sql tables 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 diagnosis icd9 code is v1272 and lab test fluid is ascites. ### Input: CREATE TABLE dem... |
what are the procedures that are the top four most common in 2100? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insuranc... | 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, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE STRFTIME('%y', procedures_icd.charttime) = '2100' GROUP BY procedures_icd.icd9_code) AS t1 ... | Below are sql tables 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 procedures that are the top four most common in 2100? ### Input: CREATE TABLE d_items (
row_id number,
... |
calculate how many times patient 56635 has received cont inv mec ven <96 hrs procedures. | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv mec ven <96 hrs') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 56635) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate how many times patient 56635 has received cont inv mec ven <96 hrs procedures. ### Input: CREATE TABLE diagnoses_i... |
has patient 99883 received meds in 12/this year? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_ty... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99883) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', prescriptions.startdate) = '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: has patient 99883 received meds in 12/this year? ### Input: CREATE TABLE chartevents (
row_id number,
subject_id num... |
What was the 2008 value when 2012 was Grand Slam Tournaments? | CREATE TABLE table_71527 (
"Tournament" text,
"2001" text,
"2002" text,
"2003" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2008" FROM table_71527 WHERE "2012" = 'grand slam tournaments' | Below are sql tables 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 2008 value when 2012 was Grand Slam Tournaments? ### Input: CREATE TABLE table_71527 (
"Tournament" text,
... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the sum of code , and group by attribute name, and display by the y axis in asc. | 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... |
Who is the person whose age is below 30? | CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
CREATE TABLE personfriend (
name text,
friend text,
year number
) | SELECT name FROM person WHERE age < 30 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the person whose age is below 30? ### Input: CREATE TABLE person (
name text,
age number,
city text,
... |
how many days have passed since the last time patient 017-16041 stayed in the ward 657 in the current hospital encounter? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '017-16041' AND patient.wardid = 657 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime 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: how many days have passed since the last time patient 017-16041 stayed in the ward 657 in the current hospital encounter? ##... |
When 1.67 is the height how many contestants are there? | CREATE TABLE table_18618707_1 (
contestant VARCHAR,
height VARCHAR
) | SELECT COUNT(contestant) FROM table_18618707_1 WHERE height = "1.67" | Below are sql tables 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 1.67 is the height how many contestants are there? ### Input: CREATE TABLE table_18618707_1 (
contestant VARCHAR,
... |
Stacked bar chart of the total number for with each Sex in each rank | CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Participates_in (
stuid IN... | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Sex, Rank | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Stacked bar chart of the total number for with each Sex in each rank ### Input: CREATE TABLE Faculty_Participates_in (
F... |
What was the venue when the score was 7-1? | CREATE TABLE table_65800 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Venue" FROM table_65800 WHERE "Score" = '7-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 venue when the score was 7-1? ### Input: CREATE TABLE table_65800 (
"Date" text,
"Venue" text,
"Sco... |
What is the 2011 value for the paris masters tournament with 1r in 2008? | CREATE TABLE table_12369 (
"Tournament" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2011" FROM table_12369 WHERE "2008" = '1r' AND "Tournament" = 'paris masters' | Below are sql tables 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 2011 value for the paris masters tournament with 1r in 2008? ### Input: CREATE TABLE table_12369 (
"Tourname... |
Which Player has Goals larger than 10, and a Debut year smaller than 1993, and Years at club of 1990 1993? | CREATE TABLE table_name_71 (
player VARCHAR,
years_at_club VARCHAR,
goals VARCHAR,
debut_year VARCHAR
) | SELECT player FROM table_name_71 WHERE goals > 10 AND debut_year < 1993 AND years_at_club = "1990–1993" | Below are sql tables 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 Player has Goals larger than 10, and a Debut year smaller than 1993, and Years at club of 1990 1993? ### Input: CREATE... |
List the council tax ids and their related cmi cross references of all the parking fines. | CREATE TABLE parking_fines (
council_tax_id VARCHAR,
cmi_cross_ref_id VARCHAR
) | SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines | Below are sql tables 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 council tax ids and their related cmi cross references of all the parking fines. ### Input: CREATE TABLE parking_fi... |
who was the top pick of the 1989 major league baseball draft ? | CREATE TABLE table_203_149 (
id number,
"pick" number,
"player" text,
"team" text,
"position" text,
"school" text
) | SELECT "player" FROM table_203_149 ORDER BY "pick" 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 top pick of the 1989 major league baseball draft ? ### Input: CREATE TABLE table_203_149 (
id number,
"p... |
Show a bar chart about how many employees does each role have?, I want to order by the the total number in descending. | CREATE TABLE Documents (
document_id INTEGER,
document_status_code CHAR(15),
document_type_code CHAR(15),
shipping_agent_code CHAR(15),
receipt_date DATETIME,
receipt_number VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Shipping_Agents (
shipping_agent_code CHAR(15),
s... | SELECT role_description, COUNT(*) FROM Roles AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code ORDER BY COUNT(*) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show a bar chart about how many employees does each role have?, I want to order by the the total number in descending. ### I... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.