instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
What week did Cleveland Browns played? | CREATE TABLE table_59298 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT AVG("Week") FROM table_59298 WHERE "Opponent" = 'cleveland browns' | Below are sql tables 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 week did Cleveland Browns played? ### Input: CREATE TABLE table_59298 (
"Week" real,
"Date" text,
"Opponent... |
what airline is AS | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zo... | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'AS' | Below are sql tables 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 airline is AS ### Input: CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flig... |
Find the average credit score of the customers who have some loan. | CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
)
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
... | SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the average credit score of the customers who have some loan. ### Input: CREATE TABLE loan (
loan_id text,
loan... |
Find the the date of enrollment of the 'Spanish' course, and count them by a bar chart, I want to show Y-axis in asc order. | CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Courses... | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" ORDER BY COUNT(date_of_enrolment) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the the date of enrollment of the 'Spanish' course, and count them by a bar chart, I want to show Y-axis in asc order. ... |
please give grounds transportation at DALLAS airport | 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 text,
meal_description varchar
)
CREATE TABLE flight_fare (
flight_id int,
f... | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'DALLAS' AND ground_service.airport_code = airport.airport_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: please give grounds transportation at DALLAS airport ### Input: CREATE TABLE city (
city_code varchar,
city_name var... |
Give me a bar chart for the number of services of each services, and rank by the y-axis in descending please. | CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CR... | SELECT services, COUNT(services) FROM station GROUP BY services ORDER BY COUNT(services) 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 the number of services of each services, and rank by the y-axis in descending please. ### Input: CRE... |
Return the low and high estimates for all film markets in a scatter chart | CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID int,
Type text,
Market_ID int,
Year int
)
CREATE TABLE film (
Film_ID int,
Title text,
Studio text,
Director text,
Gross_in_dollar int
)
CREATE TABLE market (
Mar... | SELECT Low_Estimate, High_Estimate FROM film_market_estimation | Below are sql tables 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 the low and high estimates for all film markets in a scatter chart ### Input: CREATE TABLE film_market_estimation (
... |
count the number of patients whose admission year is less than 2123 and lab test category is chemistry? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2123" AND lab."CATEGORY" = "Chemistry" | Below are sql tables 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 admission year is less than 2123 and lab test category is chemistry? ### Input: CREATE TA... |
tell me the top five output events that happened since 2100? | 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents WHERE STRFTIME('%y', outputevents.charttime) >= '2100' GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 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: tell me the top five output events that happened since 2100? ### Input: CREATE TABLE chartevents (
row_id number,
su... |
What is the average pick for Princeton after round 3? | CREATE TABLE table_name_29 (
pick INTEGER,
round VARCHAR,
college VARCHAR
) | SELECT AVG(pick) FROM table_name_29 WHERE round > 3 AND college = "princeton" | Below are sql tables 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 pick for Princeton after round 3? ### Input: CREATE TABLE table_name_29 (
pick INTEGER,
round VA... |
had patient 74159 received a test of oxygen saturation in their first hospital visit? | 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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id... | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'oxygen saturation') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 74159 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 74159 received a test of oxygen saturation in their first hospital visit? ### Input: CREATE TABLE chartevents (
... |
provide the number of patients whose diagnoses short title is ben neo spinal meninges and drug route is ng? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Ben neo spinal meninges" AND prescriptions.route = "NG" | Below are sql tables 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 diagnoses short title is ben neo spinal meninges and drug route is ng? ### Input: CREAT... |
provide the number of patients whose age is less than 51 and admission year is less than 2177? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "51" AND demographic.admityear < "2177" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose age is less than 51 and admission year is less than 2177? ### Input: CREATE TABLE lab (... |
what number of hours has it been since patient 27172 received his first prescription of furosemide during their current 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 admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type t... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'furosemide' ORDER BY prescriptions.startdate... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of hours has it been since patient 27172 received his first prescription of furosemide during their current hosp... |
What is average age for different job title? | CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
CREATE TABLE personfriend (
name text,
friend text,
year number
) | SELECT AVG(age), job FROM person GROUP BY job | Below are sql tables 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 average age for different job title? ### Input: CREATE TABLE person (
name text,
age number,
city text,
... |
What is the overall FHT points for Denis Kornilov? | CREATE TABLE table_36687 (
"Rank" real,
"Name" text,
"Nationality" text,
"1st (m)" real,
"2nd (m)" real,
"Points" real,
"Overall FHT points" text,
"Overall WC points (Rank)" text
) | SELECT "Overall FHT points" FROM table_36687 WHERE "Name" = 'denis kornilov' | Below are sql tables 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 overall FHT points for Denis Kornilov? ### Input: CREATE TABLE table_36687 (
"Rank" real,
"Name" text,
... |
what 's the smallest plane that flies from PITTSBURGH to BALTIMORE on eight 16 | 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 aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, equipment_sequence, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = ... | Below are sql tables 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 smallest plane that flies from PITTSBURGH to BALTIMORE on eight 16 ### Input: CREATE TABLE airline (
airline... |
What is the sum of goals scored in regular league play by Mustoe where he scored 0 goals in the League Cup? | CREATE TABLE table_53428 (
"Name" text,
"League" real,
"FA Cup" real,
"League Cup" real,
"Total" real
) | SELECT SUM("League") FROM table_53428 WHERE "Name" = 'mustoe' AND "League Cup" < '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of goals scored in regular league play by Mustoe where he scored 0 goals in the League Cup? ### Input: CREAT... |
give the number of patients whose primary disease is gastrointestinal bleed and procedure icd9 code is 14 | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "GASTROINTESTINAL BLEED" AND procedures.icd9_code = "14" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the number of patients whose primary disease is gastrointestinal bleed and procedure icd9 code is 14 ### Input: CREATE ... |
What is the largest total for a team with 1 bronze, 0 gold medals and ranking of 7? | CREATE TABLE table_name_87 (
total INTEGER,
gold VARCHAR,
bronze VARCHAR,
rank VARCHAR
) | SELECT MAX(total) FROM table_name_87 WHERE bronze = 1 AND rank = "7" AND gold > 0 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the largest total for a team with 1 bronze, 0 gold medals and ranking of 7? ### Input: CREATE TABLE table_name_87 (
... |
Show the price of each product supplied by supplier id 3 in a bar chart, and show names in asc order. | CREATE TABLE Department_Store_Chain (
dept_store_chain_id INTEGER,
dept_store_chain_name VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(10),
customer_code VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCH... | SELECT product_name, product_price FROM Product_Suppliers AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3 ORDER BY product_name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the price of each product supplied by supplier id 3 in a bar chart, and show names in asc order. ### Input: CREATE TABL... |
what's the average hospital cost if there is opioid dependence-remiss since 2105? | 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 AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'opioid dependence-remiss')) AND STRFTIME('%y', cost.chargetime)... | Below are sql tables 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 average hospital cost if there is opioid dependence-remiss since 2105? ### Input: CREATE TABLE admissions (
r... |
What is the novelty of Tylocephale? | CREATE TABLE table_name_14 (
novelty VARCHAR,
name VARCHAR
) | SELECT novelty FROM table_name_14 WHERE name = "tylocephale" | Below are sql tables 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 novelty of Tylocephale? ### Input: CREATE TABLE table_name_14 (
novelty VARCHAR,
name VARCHAR
) ### Resp... |
Do you have a list of teachers for the human computer interaction courses ? | CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN area ON course_offering.course_id = area.course_id WHERE area.area LIKE '%... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Do you have a list of teachers for the human computer interaction courses ? ### Input: CREATE TABLE course_tags_count (
... |
What is the average number of silvers for nations with over 1 bronze medal? | CREATE TABLE table_name_62 (
silver INTEGER,
bronze INTEGER
) | SELECT AVG(silver) FROM table_name_62 WHERE bronze > 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 average number of silvers for nations with over 1 bronze medal? ### Input: CREATE TABLE table_name_62 (
silv... |
How many Total medals did the country with 16 Silver and less than 32 Bronze receive? | CREATE TABLE table_46365 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MIN("Total") FROM table_46365 WHERE "Silver" = '16' AND "Bronze" < '32' | Below are sql tables 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 Total medals did the country with 16 Silver and less than 32 Bronze receive? ### Input: CREATE TABLE table_46365 (
... |
Create a bar chart showing the number of city across city | 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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT CITY, COUNT(CITY) FROM locations 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: Create a bar chart showing the number of city across city ### Input: CREATE TABLE locations (
LOCATION_ID decimal(4,0),
... |
What was the attendance when Fitzroy played as the away team? | CREATE TABLE table_54512 (
"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_54512 WHERE "Away team" = 'fitzroy' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance when Fitzroy played as the away team? ### Input: CREATE TABLE table_54512 (
"Home team" text,
... |
What class fulfills the MDE requirement with the least effort ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What class fulfills the MDE requirement with the least effort ? ### Input: CREATE TABLE ta (
campus_job_id int,
stud... |
what was the first value of heart rate patient 28443 had on this month/29. | 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 chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rat... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the first value of heart rate patient 28443 had on this month/29. ### Input: CREATE TABLE labevents (
row_id nu... |
What was the result of the game with a score of 3-2? | CREATE TABLE table_40531 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Result" FROM table_40531 WHERE "Score" = '3-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 was the result of the game with a score of 3-2? ### Input: CREATE TABLE table_40531 (
"Date" text,
"Venue" text... |
what was the location for charlotte? | CREATE TABLE table_29836 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Location Attendance" FROM table_29836 WHERE "Team" = 'Charlotte' | Below are sql tables 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 location for charlotte? ### Input: CREATE TABLE table_29836 (
"Game" real,
"Date" text,
"Team" text... |
Give the number of patients that died with a drug named pneumococcal vac polyvalent. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "1" AND prescriptions.drug = "PNEUMOcoccal Vac Polyvalent" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give the number of patients that died with a drug named pneumococcal vac polyvalent. ### Input: CREATE TABLE diagnoses (
... |
What's the Qual listed with a Rank of 27? | CREATE TABLE table_69561 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | SELECT "Qual" FROM table_69561 WHERE "Rank" = '27' | Below are sql tables 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 Qual listed with a Rank of 27? ### Input: CREATE TABLE table_69561 (
"Year" text,
"Start" text,
"Qual... |
What is the transfer window of the player moving to Panionios? | CREATE TABLE table_name_97 (
transfer_window VARCHAR,
moving_to VARCHAR
) | SELECT transfer_window FROM table_name_97 WHERE moving_to = "panionios" | Below are sql tables 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 transfer window of the player moving to Panionios? ### Input: CREATE TABLE table_name_97 (
transfer_window V... |
Find the number of students in total. | CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number... | SELECT COUNT(*) FROM student | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of students in total. ### Input: CREATE TABLE student (
stuid number,
lname text,
fname text,
... |
How many different values if the number is high rebounds can be found for the game on March 13? | CREATE TABLE table_840 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("High rebounds") FROM table_840 WHERE "Date" = 'March 13' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many different values if the number is high rebounds can be found for the game on March 13? ### Input: CREATE TABLE tabl... |
How many gold are a rank 1 and larger than 16? | CREATE TABLE table_name_56 (
gold VARCHAR,
rank VARCHAR,
total VARCHAR
) | SELECT COUNT(gold) FROM table_name_56 WHERE rank = "1" AND total > 16 | Below are sql tables 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 gold are a rank 1 and larger than 16? ### Input: CREATE TABLE table_name_56 (
gold VARCHAR,
rank VARCHAR,
... |
What finish qualified at 141.071? | CREATE TABLE table_80181 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" text
) | SELECT "Finish" FROM table_80181 WHERE "Qual" = '141.071' | Below are sql tables 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 finish qualified at 141.071? ### Input: CREATE TABLE table_80181 (
"Year" text,
"Start" text,
"Qual" text,
... |
Find the average capacity among rooms in each building with a bar chart, and rank by the bars in ascending. | CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE instructor (... | SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY building | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the average capacity among rooms in each building with a bar chart, and rank by the bars in ascending. ### Input: CREAT... |
what is the one year survival rate of a patient diagnosed with morbid obesity? | 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 SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) 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... | Below are sql tables 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 one year survival rate of a patient diagnosed with morbid obesity? ### Input: CREATE TABLE admissions (
row_... |
how many patients whose procedure icd9 code is 5361? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "5361" | Below are sql tables 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 procedure icd9 code is 5361? ### Input: CREATE TABLE prescriptions (
subject_id text,
hadm_i... |
could you please show me all flights from CHARLOTTE to MILWAUKEE | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE state (
state_code text,
state_name text,
country_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 = 'CHARLOTTE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILW... | Below are sql tables 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 you please show me all flights from CHARLOTTE to MILWAUKEE ### Input: CREATE TABLE month (
month_number int,
m... |
Find the number of matches in different competitions. | CREATE TABLE city (
city_id number,
city text,
hanzi text,
hanyu_pinyin text,
regional_population number,
gdp number
)
CREATE TABLE temperature (
city_id number,
jan number,
feb number,
mar number,
apr number,
jun number,
jul number,
aug number,
sep number,
... | SELECT COUNT(*), competition FROM match GROUP BY competition | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of matches in different competitions. ### Input: CREATE TABLE city (
city_id number,
city text,
... |
tell me the top three most common output events that were until 1 year ago? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 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: tell me the top three most common output events that were until 1 year ago? ### Input: CREATE TABLE medication (
medicat... |
please show me FIRST class flights from INDIANAPOLIS to MEMPHIS one way leaving before 1000 | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE c... | 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, fare_basis, flight, flight_fare WHERE (((fare.round_trip_required = 'NO') AND fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code AND ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: please show me FIRST class flights from INDIANAPOLIS to MEMPHIS one way leaving before 1000 ### Input: CREATE TABLE dual_car... |
how many patients whose religion is protestant quaker and lab test name is prot. electrophoresis, urine? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND lab.label = "Prot. Electrophoresis, Urine" | Below are sql tables 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 protestant quaker and lab test name is prot. electrophoresis, urine? ### Input: CREATE T... |
Find Team_Name and Team_ID , and visualize them by a bar 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 Team_Name, Team_ID FROM basketball_match | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find Team_Name and Team_ID , and visualize them by a bar chart. ### Input: CREATE TABLE basketball_match (
Team_ID int,
... |
What year was the international lower than 17,517 and domestic was less than 545? | CREATE TABLE table_61059 (
"Year" real,
"Domestic" real,
"International" real,
"Total" real,
"Change" text
) | SELECT AVG("Year") FROM table_61059 WHERE "International" < '17,517' AND "Domestic" < '545' | Below are sql tables 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 year was the international lower than 17,517 and domestic was less than 545? ### Input: CREATE TABLE table_61059 (
... |
count the number of patients whose admission year is less than 2187 and procedure long title is (aorto)coronary bypass of one coronary artery? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2187" AND procedures.long_title = "(Aorto)coronary bypass of one 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: count the number of patients whose admission year is less than 2187 and procedure long title is (aorto)coronary bypass of on... |
What is the result of the game with 67,715 fans attending? | CREATE TABLE table_name_54 (
result VARCHAR,
attendance VARCHAR
) | SELECT result FROM table_name_54 WHERE attendance = "67,715" | Below are sql tables 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 of the game with 67,715 fans attending? ### Input: CREATE TABLE table_name_54 (
result VARCHAR,
a... |
What is the lowest price of product, grouped by product type? Show a bar chart, sort Y-axis from high to low order. | CREATE TABLE Product_Suppliers (
product_id INTEGER,
supplier_id INTEGER,
date_supplied_from DATETIME,
date_supplied_to DATETIME,
total_amount_purchased VARCHAR(80),
total_value_purchased DECIMAL(19,4)
)
CREATE TABLE Department_Stores (
dept_store_id INTEGER,
dept_store_chain_id INTEGER... | SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY MIN(product_price) 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 lowest price of product, grouped by product type? Show a bar chart, sort Y-axis from high to low order. ### Inpu... |
Who was the home captain at Sydney Cricket Ground? | CREATE TABLE table_name_34 (
home_captain VARCHAR,
venue VARCHAR
) | SELECT home_captain FROM table_name_34 WHERE venue = "sydney cricket ground" | Below are sql tables 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 home captain at Sydney Cricket Ground? ### Input: CREATE TABLE table_name_34 (
home_captain VARCHAR,
ven... |
has patient 011-20295 been diagnosed with seizures - new onset in a year before. | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
c... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-20295')) AND diagnosis.diagnosisname = 'seizures - new onset' AND DATETI... | Below are sql tables 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 011-20295 been diagnosed with seizures - new onset in a year before. ### Input: CREATE TABLE microlab (
micr... |
Can 500 -level classes be taken in the Fall or Winter term ? | CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'EECS' 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: Can 500 -level classes be taken in the Fall or Winter term ? ### Input: CREATE TABLE course_tags_count (
course_id int,
... |
Count the number of candidates. | CREATE TABLE candidate (
candidate_id number,
people_id number,
poll_source text,
date text,
support_rate number,
consider_rate number,
oppose_rate number,
unsure_rate number
)
CREATE TABLE people (
people_id number,
sex text,
name text,
date_of_birth text,
height nu... | SELECT COUNT(*) FROM candidate | Below are sql tables 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 candidates. ### Input: CREATE TABLE candidate (
candidate_id number,
people_id number,
poll_... |
Please tell me the average star ratings of each movie title using a bar chart. | CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
) | SELECT title, AVG(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title | Below are sql tables 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 tell me the average star ratings of each movie title using a bar chart. ### Input: CREATE TABLE Reviewer (
rID in... |
How many professors whose office is located in DRE 102 are hired in each month? Return a bar chart, and show y-axis in desc order. | CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NU... | SELECT EMP_HIREDATE, COUNT(EMP_HIREDATE) FROM EMPLOYEE AS T1 JOIN PROFESSOR AS T2 ON T1.EMP_NUM = T2.EMP_NUM WHERE T2.PROF_OFFICE = 'DRE 102' ORDER BY COUNT(EMP_HIREDATE) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many professors whose office is located in DRE 102 are hired in each month? Return a bar chart, and show y-axis in desc ... |
What was the minimum population in 2011? | CREATE TABLE table_2328113_1 (
population__2011_ INTEGER
) | SELECT MIN(population__2011_) FROM table_2328113_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 minimum population in 2011? ### Input: CREATE TABLE table_2328113_1 (
population__2011_ INTEGER
) ### Respo... |
Which teachers teach in classroom 109? Give me their last names. | CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
) | SELECT lastname FROM teachers WHERE classroom = 109 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which teachers teach in classroom 109? Give me their last names. ### Input: CREATE TABLE teachers (
lastname text,
f... |
provide the number of patients whose diagnoses short title is human immuno virus dis and drug route is iv? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Human immuno virus dis" 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: provide the number of patients whose diagnoses short title is human immuno virus dis and drug route is iv? ### Input: CREATE... |
What was the attendance at Moorabbin Oval? | CREATE TABLE table_51767 (
"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_51767 WHERE "Venue" = 'moorabbin oval' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance at Moorabbin Oval? ### Input: CREATE TABLE table_51767 (
"Home team" text,
"Home team score"... |
For each type, how many ships are there Plot them as bar chart, list y-axis in asc order. | CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) | SELECT Type, COUNT(*) FROM ship GROUP BY Type 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: For each type, how many ships are there Plot them as bar chart, list y-axis in asc order. ### Input: CREATE TABLE ship (
... |
Draw a bar chart about the distribution of meter_200 and the sum of ID , and group by attribute meter_200. | 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_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | SELECT meter_200, SUM(ID) FROM swimmer GROUP BY meter_200 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart about the distribution of meter_200 and the sum of ID , and group by attribute meter_200. ### Input: CREATE... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the average of salary , and group by attribute job_id in a bar chart, and show y axis from high to low order. | 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(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(SALARY) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, could you show in descending by the Y-axis? | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(EMPLOYEE_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average ... |
What kind of animal corresponds to the accession number xp_852505.1? | CREATE TABLE table_15417439_1 (
common_name VARCHAR,
accession_number VARCHAR
) | SELECT common_name FROM table_15417439_1 WHERE accession_number = "XP_852505.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 kind of animal corresponds to the accession number xp_852505.1? ### Input: CREATE TABLE table_15417439_1 (
common_n... |
Which Goals for has a Position smaller than 16, and Wins smaller than 19, and Goals against smaller than 32? | CREATE TABLE table_name_17 (
goals_for INTEGER,
goals_against VARCHAR,
position VARCHAR,
wins VARCHAR
) | SELECT MIN(goals_for) FROM table_name_17 WHERE position < 16 AND wins < 19 AND goals_against < 32 | Below are sql tables 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 Goals for has a Position smaller than 16, and Wins smaller than 19, and Goals against smaller than 32? ### Input: CREA... |
How many courses each teacher taught? Show me a stacked bar chart The x-axis is the instructor's first name and group by course code, could you sort the number of emp fname in descending order please? | CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
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... | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY CRS_CODE, EMP_FNAME ORDER BY COUNT(EMP_FNAME) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many courses each teacher taught? Show me a stacked bar chart The x-axis is the instructor's first name and group by cou... |
What is the second leg that Valencia was on? | CREATE TABLE table_68891 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | SELECT "2nd leg" FROM table_68891 WHERE "Team 2" = 'valencia' | Below are sql tables 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 second leg that Valencia was on? ### Input: CREATE TABLE table_68891 (
"Team 1" text,
"Agg." text,
"... |
give me the number of patients whose marital status is single and procedure icd9 code is 8960? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.icd9_code = "8960" | Below are sql tables 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 marital status is single and procedure icd9 code is 8960? ### Input: CREATE TABLE demog... |
what are the five most common lab tests for patients of age 60 or above? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeri... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 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 are the five most common lab tests for patients of age 60 or above? ### Input: CREATE TABLE cost (
costid number,
... |
For the Core course , who is the easiest teacher ? | CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_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: For the Core course , who is the easiest teacher ? ### Input: CREATE TABLE course (
course_id int,
name varchar,
... |
What ULCS classes are required for EECS majors ? | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%EECS%' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What ULCS classes are required for EECS majors ? ### Input: CREATE TABLE program_course (
program_id int,
course_id ... |
Who left a seat open for the district of connecticut at-large | CREATE TABLE table_224844_4 (
vacator VARCHAR,
district VARCHAR
) | SELECT vacator FROM table_224844_4 WHERE district = "Connecticut At-large" | Below are sql tables 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 left a seat open for the district of connecticut at-large ### Input: CREATE TABLE table_224844_4 (
vacator VARCHAR,
... |
is any medicine prescribed to patient 032-24135 on the current hospital visit? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-24135' AND patient.hospitaldischargetime 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: is any medicine prescribed to patient 032-24135 on the current hospital visit? ### Input: CREATE TABLE treatment (
treat... |
Which Film and Cinema Studies courses do n't have prerequisites ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additio... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Film and Cinema Studies%' OR course.description LIKE '%Film and Cinema Studies%' OR course.name LIKE '%Film and Cinema Studies%') AND course.enforced_requirement = '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: Which Film and Cinema Studies courses do n't have prerequisites ? ### Input: CREATE TABLE requirement (
requirement_id i... |
the last time the previous month, when was patient 19175 prescribed d5w and pantoprazole at the same 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,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
... | SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'd5w' AND admissions.subject_id = 19175 AND DATETIME(prescriptions.startdate, 'start of month') = 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: the last time the previous month, when was patient 19175 prescribed d5w and pantoprazole at the same time? ### Input: CREATE... |
Who visited on April 29? | CREATE TABLE table_75528 (
"Date" text,
"Home" text,
"Score" text,
"Visitor" text,
"Record" text
) | SELECT "Visitor" FROM table_75528 WHERE "Date" = 'april 29' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who visited on April 29? ### Input: CREATE TABLE table_75528 (
"Date" text,
"Home" text,
"Score" text,
"Visi... |
Show all artist names and the number of exhibitions for each artist in a bar chart, I want to order in descending by the total number. | CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
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... | SELECT Name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.Artist_ID = T2.Artist_ID GROUP BY T1.Artist_ID 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 all artist names and the number of exhibitions for each artist in a bar chart, I want to order in descending by the tot... |
Which Team 2 faced Team 1 from Barcelona? | CREATE TABLE table_56852 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | SELECT "Team 2" FROM table_56852 WHERE "Team 1" = 'barcelona' | Below are sql tables 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 2 faced Team 1 from Barcelona? ### Input: CREATE TABLE table_56852 (
"Team 1" text,
"Agg." text,
"Tea... |
how many patients whose primary disease is pneumonia and age is less than 49? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA" AND demographic.age < "49" | Below are sql tables 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 primary disease is pneumonia and age is less than 49? ### Input: CREATE TABLE diagnoses (
subjec... |
Show me the total number by outcome code in a histogram | CREATE TABLE Order_Items (
item_id INTEGER,
order_item_status_code VARCHAR(15),
order_id INTEGER,
product_id INTEGER,
item_status_code VARCHAR(15),
item_delivered_datetime DATETIME,
item_order_quantity VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method VARCHA... | SELECT outcome_code, COUNT(*) FROM Mailshot_Customers GROUP BY outcome_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: Show me the total number by outcome code in a histogram ### Input: CREATE TABLE Order_Items (
item_id INTEGER,
order... |
What date did episode 4 in the season originally air? | CREATE TABLE table_24425976_7 (
original_air_date VARCHAR,
season VARCHAR
) | SELECT original_air_date FROM table_24425976_7 WHERE season = 4 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date did episode 4 in the season originally air? ### Input: CREATE TABLE table_24425976_7 (
original_air_date VARCH... |
what is the number of patients whose primary disease is stemi and admission year is less than 2155? | 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.diagnosis = "STEMI" AND demographic.admityear < "2155" | Below are sql tables 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 primary disease is stemi and admission year is less than 2155? ### Input: CREATE TABLE ... |
Which date has a region of united kingdom? | CREATE TABLE table_47198 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Date" FROM table_47198 WHERE "Region" = 'united kingdom' | Below are sql tables 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 a region of united kingdom? ### Input: CREATE TABLE table_47198 (
"Region" text,
"Date" text,
"La... |
how many asian patients have ventricular tachycardia primary disease? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.diagnosis = "VENTRICULAR TACHYCARDIA" | Below are sql tables 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 asian patients have ventricular tachycardia primary disease? ### Input: CREATE TABLE prescriptions (
subject_id... |
what flights are available on DL from DALLAS to ATLANTA on monday morning | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREAT... | 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 (((date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.airline_code ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights are available on DL from DALLAS to ATLANTA on monday morning ### Input: CREATE TABLE state (
state_code tex... |
does YX serve BALTIMORE | CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airport_service (... | 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.to_airport = AIRPORT_SERVICE_0.airport_code AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE') OR (flight.from_airpo... | Below are sql tables 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 YX serve BALTIMORE ### Input: CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_descri... |
count the number of patients whose diagnoses icd9 code is 25002 and lab test abnormal status is delta? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "25002" AND lab.flag = "delta" | Below are sql tables 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 diagnoses icd9 code is 25002 and lab test abnormal status is delta? ### Input: CREATE TAB... |
what number of patients whose diagnosis title is other specified perinatal disorders of digestive systems had government insurance? | 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.insurance = "Government" AND diagnoses.long_title = "Other specified perinatal disorders of digestive system" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of patients whose diagnosis title is other specified perinatal disorders of digestive systems had government ins... |
when was patient 67005's first discharge from the hospital the last year? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9... | SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 67005 AND DATETIME(admissions.dischtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.dischtime LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was patient 67005's first discharge from the hospital the last year? ### Input: CREATE TABLE cost (
row_id number,
... |
what is average age of patients whose admission type is emergency and days of hospital stay is 4? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.days_stay = "4" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is average age of patients whose admission type is emergency and days of hospital stay is 4? ### Input: CREATE TABLE di... |
what were the top three most common diagnoses that followed within 2 months for the patients who were diagnosed with septic shock in this year? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
... | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'septic shock' AND DATETIME(diagnosis.dia... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the top three most common diagnoses that followed within 2 months for the patients who were diagnosed with septic ... |
How many of the patients with abdominal pain remained in the hospital for more than 3 days? | 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.diagnosis = "ABDOMINAL PAIN" AND demographic.days_stay > "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: How many of the patients with abdominal pain remained in the hospital for more than 3 days? ### Input: CREATE TABLE demograp... |
Give me a histogram for what are the names of projects that require more than 300 hours, and how many scientists are assigned to each?, and display in asc by the x axis. | CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
) | SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.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: Give me a histogram for what are the names of projects that require more than 300 hours, and how many scientists are assigne... |
What is the total number of capitals that have an area of exactly 1104 square km? | CREATE TABLE table_23090 (
"Country" text,
"Area km\u00b2" real,
"Population" real,
"Population density per km\u00b2" real,
"HDI (2011)" text,
"Capital" text
) | SELECT COUNT("Capital") FROM table_23090 WHERE "Area km\u00b2" = '1104' | Below are sql tables 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 capitals that have an area of exactly 1104 square km? ### Input: CREATE TABLE table_23090 (
... |
What is the Total number of medals for the Nation with 7 or less Bronze medals and 1 Silver medal with a Rank of 9 or larger? | CREATE TABLE table_name_90 (
total INTEGER,
rank VARCHAR,
bronze VARCHAR,
silver VARCHAR
) | SELECT MIN(total) FROM table_name_90 WHERE bronze < 7 AND silver = 1 AND rank > 9 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Total number of medals for the Nation with 7 or less Bronze medals and 1 Silver medal with a Rank of 9 or larger... |
Where was the game on May 15 and how many were in attendance? | CREATE TABLE table_17327 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | SELECT "Location Attendance" FROM table_17327 WHERE "Date" = 'May 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: Where was the game on May 15 and how many were in attendance? ### Input: CREATE TABLE table_17327 (
"Game" real,
"Da... |
How many documents are created in each day? Bin the document date by year interval and group by document type with a group line chart, and order from high to low by the Document_Date please. | CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
... | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Name ORDER BY Document_Date DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many documents are created in each day? Bin the document date by year interval and group by document type with a group l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.