instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
What's the average interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842? | CREATE TABLE table_69211 (
"State" text,
"Preliminaries" real,
"Interview" real,
"Swimsuit" real,
"Evening Gown" real,
"Average" real
) | SELECT AVG("Interview") FROM table_69211 WHERE "Preliminaries" > '8.27' AND "Evening Gown" = '8.85' AND "Average" < '8.842' | Below are sql tables 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 interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842... |
A bar chart about what is minimum hours of the students playing in different position? | CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
) | SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos | Below are sql tables 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 about what is minimum hours of the students playing in different position? ### Input: CREATE TABLE College (
... |
When Efrain Valdez was pitching, what was the highest home run? | CREATE TABLE table_name_82 (
home_run INTEGER,
opposing_pitcher VARCHAR
) | SELECT MAX(home_run) FROM table_name_82 WHERE opposing_pitcher = "efrain valdez" | Below are sql tables 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 Efrain Valdez was pitching, what was the highest home run? ### Input: CREATE TABLE table_name_82 (
home_run INTEGER... |
Show all origins and the number of flights from each origin Show bar chart, display in desc by the y axis please. | CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREAT... | SELECT origin, COUNT(*) FROM flight GROUP BY origin 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 origins and the number of flights from each origin Show bar chart, display in desc by the y axis please. ### Input:... |
What is the biggest crowd when carlton is the away squad? | CREATE TABLE table_name_48 (
crowd INTEGER,
away_team VARCHAR
) | SELECT MAX(crowd) FROM table_name_48 WHERE away_team = "carlton" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the biggest crowd when carlton is the away squad? ### Input: CREATE TABLE table_name_48 (
crowd INTEGER,
awa... |
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the average of manager_id , and group by attribute job_id, and sort x axis from low to high order. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the ave... |
show me flights from PHILADELPHIA to SAN FRANCISCO on WEDNESDAY | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND days.day_name = 'WEDNESDAY' AND flight.flight_days = days.days_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: show me flights from PHILADELPHIA to SAN FRANCISCO on WEDNESDAY ### Input: CREATE TABLE equipment_sequence (
aircraft_co... |
What is the away team that plays at Punt Road Oval? | CREATE TABLE table_name_43 (
away_team VARCHAR,
venue VARCHAR
) | SELECT away_team AS score FROM table_name_43 WHERE venue = "punt road 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 is the away team that plays at Punt Road Oval? ### Input: CREATE TABLE table_name_43 (
away_team VARCHAR,
venue... |
What rank has 1 silver, more than 2 gold, and a total larger than 3? | CREATE TABLE table_40900 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Rank") FROM table_40900 WHERE "Silver" = '1' AND "Total" > '3' AND "Gold" > '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 rank has 1 silver, more than 2 gold, and a total larger than 3? ### Input: CREATE TABLE table_40900 (
"Rank" real,
... |
Give me a pie to show the total number from different category. | CREATE TABLE volume (
Volume_ID int,
Volume_Issue text,
Issue_Date text,
Weeks_on_Top real,
Song text,
Artist_ID int
)
CREATE TABLE artist (
Artist_ID int,
Artist text,
Age int,
Famous_Title text,
Famous_Release_date text
)
CREATE TABLE music_festival (
ID int,
Musi... | SELECT Category, COUNT(*) FROM music_festival GROUP BY Category | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a pie to show the total number from different category. ### Input: CREATE TABLE volume (
Volume_ID int,
Volu... |
When was the most recent game that he partnered with nicklas kulti and they scored 3 6, 7 6, 6 4? | CREATE TABLE table_name_19 (
date INTEGER,
partner VARCHAR,
score VARCHAR
) | SELECT MAX(date) FROM table_name_19 WHERE partner = "nicklas kulti" AND score = "3–6, 7–6, 6–4" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the most recent game that he partnered with nicklas kulti and they scored 3 6, 7 6, 6 4? ### Input: CREATE TABLE ta... |
For those employees who do not work in departments with managers that have ids between 100 and 200, find email and department_id , and visualize them by a bar chart, and order from low to high by the y-axis please. | 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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25... | SELECT EMAIL, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY DEPARTMENT_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, find email and departmen... |
A bar chart about the number of first name for all female students whose sex is F, and display y-axis in desc order. | CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGE... | SELECT Fname, COUNT(Fname) FROM Student WHERE Sex = 'F' GROUP BY Fname ORDER BY COUNT(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: A bar chart about the number of first name for all female students whose sex is F, and display y-axis in desc order. ### Inp... |
Which title placed in rank 7? | CREATE TABLE table_name_7 (
title VARCHAR,
rank VARCHAR
) | SELECT title FROM table_name_7 WHERE rank = 7 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which title placed in rank 7? ### Input: CREATE TABLE table_name_7 (
title VARCHAR,
rank VARCHAR
) ### Response: SEL... |
Wat episode number had 5.46 million viewers? | CREATE TABLE table_27846651_1 (
episode__number VARCHAR,
viewers__millions_ VARCHAR
) | SELECT episode__number FROM table_27846651_1 WHERE viewers__millions_ = "5.46" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Wat episode number had 5.46 million viewers? ### Input: CREATE TABLE table_27846651_1 (
episode__number VARCHAR,
vie... |
What player was picked for Buffalo Sabres? | CREATE TABLE table_30820 (
"Pick" text,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "Player" FROM table_30820 WHERE "NHL team" = 'Buffalo Sabres' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What player was picked for Buffalo Sabres? ### Input: CREATE TABLE table_30820 (
"Pick" text,
"Player" text,
"Po... |
for the last time during this year, when did patient 31306 get admitted via emergency room admit to the hospital? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE diagnoses_icd (
... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 31306 AND admissions.admission_location = 'emergency room admit' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime 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: for the last time during this year, when did patient 31306 get admitted via emergency room admit to the hospital? ### Input:... |
tell me patient 65467's hospital admission time until 2104? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid ... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 65467 AND STRFTIME('%y', admissions.admittime) <= '2104' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me patient 65467's hospital admission time until 2104? ### Input: CREATE TABLE procedures_icd (
row_id number,
... |
had patient 028-40370 been admitted since 2104 in hospital? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '028-40370' AND STRFTIME('%y', patient.hospitaladmittime) >= '2104' | Below are sql tables 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 028-40370 been admitted since 2104 in hospital? ### Input: CREATE TABLE vitalperiodic (
vitalperiodicid numb... |
Which Record has a Score of 4 4, and Points of 17? | CREATE TABLE table_name_91 (
record VARCHAR,
score VARCHAR,
points VARCHAR
) | SELECT record FROM table_name_91 WHERE score = "4–4" AND points = 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: Which Record has a Score of 4 4, and Points of 17? ### Input: CREATE TABLE table_name_91 (
record VARCHAR,
score VAR... |
Visualize the general trend of the number of date of completion over the date of completion, and display x axis from low to high order. | CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subje... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment GROUP BY date_of_completion ORDER BY date_of_completion | Below are sql tables 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 the general trend of the number of date of completion over the date of completion, and display x axis from low to ... |
Show different parties of people along with the number of people in each party with a bar chart, and could you display by the y-axis in ascending? | CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
)
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
... | SELECT Party, COUNT(*) FROM people GROUP BY Party 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: Show different parties of people along with the number of people in each party with a bar chart, and could you display by th... |
What are the different transaction types, and how many transactions of each have taken place. Plot them as pie chart. | CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the different transaction types, and how many transactions of each have taken place. Plot them as pie chart. ### In... |
how many patients whose admission year is less than 2166 and diagnoses long title is pneumococcal pneumonia [streptococcus pneumoniae pneumonia]? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2166" AND diagnoses.long_title = "Pneumococcal pneumonia [Streptococcus pneumoniae pneumonia]" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission year is less than 2166 and diagnoses long title is pneumococcal pneumonia [streptococcus p... |
For class RCIDIV 390 , how often does it meet ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city var... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For class RCIDIV 390 , how often does it meet ? ### Input: CREATE TABLE comment_instructor (
instructor_id int,
stud... |
What is the number of party in the arkansas 1 district | CREATE TABLE table_1341930_5 (
party VARCHAR,
district VARCHAR
) | SELECT COUNT(party) FROM table_1341930_5 WHERE district = "Arkansas 1" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of party in the arkansas 1 district ### Input: CREATE TABLE table_1341930_5 (
party VARCHAR,
dist... |
how many patients whose admission location is emergency room admit and diagnoses long title is acute diastolic heart failure? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.long_title = "Acute diastolic heart failure" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission location is emergency room admit and diagnoses long title is acute diastolic heart failure... |
What is the series number for Season #18? | CREATE TABLE table_532 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) | SELECT MIN("Series #") FROM table_532 WHERE "Season #" = '18' | Below are sql tables 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 series number for Season #18? ### Input: CREATE TABLE table_532 (
"Series #" real,
"Season #" real,
... |
What happened on 2009-03-14? | CREATE TABLE table_name_25 (
circumstances VARCHAR,
date VARCHAR
) | SELECT circumstances FROM table_name_25 WHERE date = "2009-03-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: What happened on 2009-03-14? ### Input: CREATE TABLE table_name_25 (
circumstances VARCHAR,
date VARCHAR
) ### Respo... |
Give me line charts of worldwide gross how many date account opened over year date account opened by major genres other_account_details, list in descending by the x axis please. | CREATE TABLE Orders (
order_id INTEGER,
customer_id INTEGER,
date_order_placed DATETIME,
order_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(50),
customer_middle_initial VARCHAR(1),
customer_last_name VARCHAR(50),
gender VARCHAR(1),... | SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts GROUP BY other_account_details ORDER BY date_account_opened 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 line charts of worldwide gross how many date account opened over year date account opened by major genres other_acco... |
Can I take PATH 585 over the Spring ? | CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE area (
course_id int,
area varchar
)
... | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can I take PATH 585 over the Spring ? ### Input: CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int... |
what was patient 5364's daily average value of body weight in 01/this year? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE proced... | SELECT AVG(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 = 5364)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit... | Below are sql tables 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 5364's daily average value of body weight in 01/this year? ### Input: CREATE TABLE diagnoses_icd (
row_... |
how many patients with greek orthodox belief were diagnosed with drug-induced delirium | 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.religion = "GREEK ORTHODOX" AND diagnoses.long_title = "Drug-induced delirium" | Below are sql tables 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 with greek orthodox belief were diagnosed with drug-induced delirium ### Input: CREATE TABLE demographic (... |
Name the date for hard surface and tournament of fort walton beach | CREATE TABLE table_name_84 (
date VARCHAR,
surface VARCHAR,
tournament VARCHAR
) | SELECT date FROM table_name_84 WHERE surface = "hard" AND tournament = "fort walton beach" | Below are sql tables 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 date for hard surface and tournament of fort walton beach ### Input: CREATE TABLE table_name_84 (
date VARCHAR,... |
Show the total number from each flag, could you display bar from low to high order? | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY Flag | Below are sql tables 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 total number from each flag, could you display bar from low to high order? ### Input: CREATE TABLE captain (
Ca... |
What is the attendance for the t7-7 result? | CREATE TABLE table_45706 (
"Date" text,
"Opponent" text,
"Site" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_45706 WHERE "Result" = 't7-7' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the attendance for the t7-7 result? ### Input: CREATE TABLE table_45706 (
"Date" text,
"Opponent" text,
... |
i would like a connecting flight from DALLAS to SAN FRANCISCO leaving after 400 o'clock | CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,... | SELECT DISTINCT flight_id FROM flight WHERE (((departure_time > 400 AND to_airport IN (SELECT AIRPORT_SERVICEalias1.airport_code FROM airport_service AS AIRPORT_SERVICEalias1 WHERE AIRPORT_SERVICEalias1.city_code IN (SELECT CITYalias1.city_code FROM city AS CITYalias1 WHERE CITYalias1.city_name = 'SAN FRANCISCO'))) 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: i would like a connecting flight from DALLAS to SAN FRANCISCO leaving after 400 o'clock ### Input: CREATE TABLE fare_basis (... |
What is the 2nd leg of the Internacional Team 1? | CREATE TABLE table_name_48 (
team_1 VARCHAR
) | SELECT 2 AS nd_leg FROM table_name_48 WHERE team_1 = "internacional" | Below are sql tables 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 2nd leg of the Internacional Team 1? ### Input: CREATE TABLE table_name_48 (
team_1 VARCHAR
) ### Response: ... |
Who was the High Assist when the High Rebounds was andre iguodala (8)? | CREATE TABLE table_17323042_11 (
high_assists VARCHAR,
high_rebounds VARCHAR
) | SELECT high_assists FROM table_17323042_11 WHERE high_rebounds = "Andre Iguodala (8)" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the High Assist when the High Rebounds was andre iguodala (8)? ### Input: CREATE TABLE table_17323042_11 (
high_... |
What's the 2009 of the Australian Open having a 1R in 2011? | CREATE TABLE table_name_56 (
tournament VARCHAR
) | SELECT 2009 FROM table_name_56 WHERE 2011 = "1r" AND tournament = "australian open" | Below are sql tables 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 2009 of the Australian Open having a 1R in 2011? ### Input: CREATE TABLE table_name_56 (
tournament VARCHAR
)... |
A bar chart shows the distribution of All_Home and the amount of All_Home , and group by attribute All_Home, and order x-axis in asc order. | 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_Home, COUNT(All_Home) FROM basketball_match GROUP BY All_Home ORDER BY All_Home | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart shows the distribution of All_Home and the amount of All_Home , and group by attribute All_Home, and order x-axi... |
show me the flights from ST. PETERSBURG to TORONTO that arrive before 1200 | CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TORONTO' AND flight.arrival_time <= 1200 AND flight.to_airport = AIRPORT_SERVICE_1.airpor... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the flights from ST. PETERSBURG to TORONTO that arrive before 1200 ### Input: CREATE TABLE flight (
aircraft_cod... |
what are the evening flights from ATLANTA to BALTIMORE | CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_... | 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTI... | Below are sql tables 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 evening flights from ATLANTA to BALTIMORE ### Input: CREATE TABLE fare (
fare_id int,
from_airport varc... |
What is the number of platforms for each location? Show the comparison with a bar chart, and show from low to high by the X. | CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
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 t... | SELECT Location, SUM(Number_of_Platforms) FROM station GROUP BY Location ORDER BY Location | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of platforms for each location? Show the comparison with a bar chart, and show from low to high by the X.... |
how many games did the team win while not at home ? | CREATE TABLE table_204_38 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text
) | SELECT COUNT(*) FROM table_204_38 WHERE "result" = 'w' AND "opponent#" <> 'home' | Below are sql tables 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 the team win while not at home ? ### Input: CREATE TABLE table_204_38 (
id number,
"date" text,
... |
How many people attended the game with a result of w 16-13 and a week earlier than 12? | CREATE TABLE table_74544 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
) | SELECT MAX("Attendance") FROM table_74544 WHERE "Result" = 'w 16-13' AND "Week" < '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: How many people attended the game with a result of w 16-13 and a week earlier than 12? ### Input: CREATE TABLE table_74544 (... |
What is the Competition with a Score of 1 0, and a Result with 3 0? | CREATE TABLE table_11127 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Competition" FROM table_11127 WHERE "Score" = '1–0' AND "Result" = '3–0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Competition with a Score of 1 0, and a Result with 3 0? ### Input: CREATE TABLE table_11127 (
"Date" text,
... |
Create a bar chart showing how many team across team | CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
) | SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Create a bar chart showing how many team across team ### Input: CREATE TABLE Elimination (
Elimination_ID text,
Wres... |
calculate the difference between patient 28048's total input and the total output until 01/30/2104. | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
... | SELECT (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 = 28048)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2104-01-30') - (SEL... | Below are sql tables 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 difference between patient 28048's total input and the total output until 01/30/2104. ### Input: CREATE TABLE ... |
what was the top three of the most frequent procedures during this 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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
v... | 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 DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of ye... | Below are sql tables 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 top three of the most frequent procedures during this year? ### Input: CREATE TABLE cost (
row_id number,
... |
in this hospital encounter, when did patient 031-3355 receive the first blood, venipuncture microbiology 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 microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND patient.hospitaldischargetime IS NULL)) AND microla... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: in this hospital encounter, when did patient 031-3355 receive the first blood, venipuncture microbiology test? ### Input: CR... |
Can you tell me the High points that has the Date of january 31? | CREATE TABLE table_8635 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High points" FROM table_8635 WHERE "Date" = 'january 31' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the High points that has the Date of january 31? ### Input: CREATE TABLE table_8635 (
"Game" real,
"... |
give me the number of patients whose diagnoses short title is fever in other diseases and lab test fluid is cerebrospinal fluid (csf)? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Fever in other diseases" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | Below are sql tables 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 diagnoses short title is fever in other diseases and lab test fluid is cerebrospinal fl... |
Compute the number of services by services and then split by local authorities Show the result with a stacked bar graph, sort the number of local authority in ascending order. | CREATE TABLE route (
train_id int,
station_id int
)
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 station (
id int,
network_name text,
services text,
local... | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY services, local_authority ORDER BY COUNT(local_authority) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Compute the number of services by services and then split by local authorities Show the result with a stacked bar graph, sor... |
i want a flight on TW from BOSTON to SAN FRANCISCO | CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturd... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_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: i want a flight on TW from BOSTON to SAN FRANCISCO ### Input: CREATE TABLE fare_basis (
fare_basis_code text,
bookin... |
how much patient 32755's ph changes/differs second measured on the first hospital visit compared to the first value measured on the first hospital visit? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE cost (
row_id nu... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 32755 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: how much patient 32755's ph changes/differs second measured on the first hospital visit compared to the first value measured... |
find the diagnostic decription of diagnoses icd9 code v202. | 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 diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "V202" | Below are sql tables 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 diagnostic decription of diagnoses icd9 code v202. ### Input: CREATE TABLE prescriptions (
subject_id text,
... |
Questions with highest amount of bounties. | CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDe... | SELECT SUM(v.BountyAmount), p.Id AS "post_link", p.ViewCount FROM Posts AS p JOIN Votes AS v ON v.PostId = p.Id WHERE v.VoteTypeId = 8 GROUP BY p.Id, p.ViewCount ORDER BY SUM(v.BountyAmount) DESC LIMIT 500 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions with highest amount of bounties. ### Input: CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE... |
Top 500 answerers on the site. A list of the top 500 users with the highest average answer score excluding
community wiki / closed posts or users with less than 10 answers | CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTasks (
Id num... | SELECT Users.Id AS "user_link", COUNT(Posts.Id) AS Answers, CAST(AVG(CAST(Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_answer_score" FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 2 AND CommunityOwnedDate IS NULL AND ClosedDate IS NULL GROUP BY Users.Id, DisplayName HAVING COUNT(Posts.Id) > 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: Top 500 answerers on the site. A list of the top 500 users with the highest average answer score excluding
community wiki / ... |
How many workshops did each author submit to? Return the author name and the number of workshops Plot them as bar chart, and list X-axis in asc order. | CREATE TABLE Acceptance (
Submission_ID int,
Workshop_ID int,
Result text
)
CREATE TABLE submission (
Submission_ID int,
Scores real,
Author text,
College text
)
CREATE TABLE workshop (
Workshop_ID int,
Date text,
Venue text,
Name text
) | SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY Author | Below are sql tables 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 workshops did each author submit to? Return the author name and the number of workshops Plot them as bar chart, and... |
Which Total has a Set 3 of 13 25? | CREATE TABLE table_37961 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
) | SELECT "Total" FROM table_37961 WHERE "Set 3" = '13–25' | Below are sql tables 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 Total has a Set 3 of 13 25? ### Input: CREATE TABLE table_37961 (
"Date" text,
"Time" text,
"Score" text,
... |
what is diagnoses short title and diagnoses long title of subject id 23733? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "23733" | Below are sql tables 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 and diagnoses long title of subject id 23733? ### Input: CREATE TABLE prescriptions (
subj... |
which attendance has a Loss of drese (0-2)? | CREATE TABLE table_name_24 (
attendance VARCHAR,
loss VARCHAR
) | SELECT attendance FROM table_name_24 WHERE loss = "drese (0-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: which attendance has a Loss of drese (0-2)? ### Input: CREATE TABLE table_name_24 (
attendance VARCHAR,
loss VARCHAR... |
What is the 2nd leg score for the match with a team 2 of Werder Bremen? | CREATE TABLE table_48623 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | SELECT "2nd leg" FROM table_48623 WHERE "Team 2" = 'werder bremen' | Below are sql tables 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 2nd leg score for the match with a team 2 of Werder Bremen? ### Input: CREATE TABLE table_48623 (
"Team 1" t... |
What was the average crowd attendance for the Junction Oval venue? | CREATE TABLE table_57795 (
"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_57795 WHERE "Venue" = 'junction 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 average crowd attendance for the Junction Oval venue? ### Input: CREATE TABLE table_57795 (
"Home team" tex... |
What date was the week 17 game played on? | CREATE TABLE table_name_62 (
date VARCHAR,
week VARCHAR
) | SELECT date FROM table_name_62 WHERE week = "17" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date was the week 17 game played on? ### Input: CREATE TABLE table_name_62 (
date VARCHAR,
week VARCHAR
) ### R... |
Name the marriage of the person who is married for christian viii | CREATE TABLE table_name_74 (
marriage VARCHAR,
spouse VARCHAR
) | SELECT marriage FROM table_name_74 WHERE spouse = "christian viii" | Below are sql tables 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 marriage of the person who is married for christian viii ### Input: CREATE TABLE table_name_74 (
marriage VARCH... |
how many patients below 24 years of age followed the procedure endoscopic removal of stone(s) from biliary tract? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "24" AND procedures.long_title = "Endoscopic removal of stone(s) from biliary tract" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients below 24 years of age followed the procedure endoscopic removal of stone(s) from biliary tract? ### Input:... |
what are the five most commonly prescribed medications for patients that have been previously prescribed neomycin-polymyxin-bacitracin during the same hospital encounter, until 4 years ago? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'neomycin-polymyxin-bacitracin' AND DATETIME(p... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the five most commonly prescribed medications for patients that have been previously prescribed neomycin-polymyxin-... |
what are the names of the allergy that patient 011-31229 has in 08/this year? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
... | SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-31229')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIM... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the names of the allergy that patient 011-31229 has in 08/this year? ### Input: CREATE TABLE lab (
labid number... |
Who is the away side at glenferrie oval? | CREATE TABLE table_name_90 (
away_team VARCHAR,
venue VARCHAR
) | SELECT away_team FROM table_name_90 WHERE venue = "glenferrie 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: Who is the away side at glenferrie oval? ### Input: CREATE TABLE table_name_90 (
away_team VARCHAR,
venue VARCHAR
) ... |
last time patient 16572 was prescribed a drug on the last hospital visit? | 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_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures ... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16572 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) ORDER BY prescriptions.startdate 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: last time patient 16572 was prescribed a drug on the last hospital visit? ### Input: CREATE TABLE inputevents_cv (
row_i... |
show me all flights from SAN FRANCISCO to LGA nonstop | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zo... | SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE (airport.airport_code = 'LGA' AND city.city_code = airport_service.city_code AND city.city_name = 'SAN FRANCISCO' AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.airport_code) AND flight.stops = 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: show me all flights from SAN FRANCISCO to LGA nonstop ### Input: CREATE TABLE dual_carrier (
main_airline varchar,
l... |
did the value of mcv of patient 002-41152 last measured on the last hospital visit be greater than first measured on the last hospital visit? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treat... | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-41152' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: did the value of mcv of patient 002-41152 last measured on the last hospital visit be greater than first measured on the las... |
What is the highest rank with less than 2 bronze, more than 1 gold, and less than 1 silver? | CREATE TABLE table_name_35 (
rank INTEGER,
silver VARCHAR,
bronze VARCHAR,
gold VARCHAR
) | SELECT MAX(rank) FROM table_name_35 WHERE bronze < 2 AND gold > 1 AND silver < 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 highest rank with less than 2 bronze, more than 1 gold, and less than 1 silver? ### Input: CREATE TABLE table_na... |
when was the last time patient 015-7988 was prescribed a drug through mucous membrane route until 42 months ago? | 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 medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-7988')) AND medication.routeadmin = 'mucous membrane' 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: when was the last time patient 015-7988 was prescribed a drug through mucous membrane route until 42 months ago? ### Input: ... |
what is the gender and death status of subject id 32418? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT demographic.gender, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "32418" | Below are sql tables 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 gender and death status of subject id 32418? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_i... |
What tournament what held in Cincinnati in 2009? | CREATE TABLE table_name_53 (
tournament VARCHAR
) | SELECT 2009 FROM table_name_53 WHERE tournament = "cincinnati" | Below are sql tables 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 what held in Cincinnati in 2009? ### Input: CREATE TABLE table_name_53 (
tournament VARCHAR
) ### Respon... |
can i have a morning flight from BALTIMORE to NEWARK please | CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE aircraft (
... | SELECT DISTINCT flight_id FROM flight WHERE ((from_airport IN (SELECT AIRPORT_SERVICEalias0.airport_code FROM airport_service AS AIRPORT_SERVICEalias0 WHERE AIRPORT_SERVICEalias0.city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'BALTIMORE')) AND to_airport IN (SELECT AIRPOR... | Below are sql tables 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 i have a morning flight from BALTIMORE to NEWARK please ### Input: CREATE TABLE flight_stop (
flight_id int,
sto... |
What mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1? | CREATE TABLE table_38128 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | SELECT AVG("Extra points") FROM table_38128 WHERE "Player" = 'james lawrence' AND "Touchdowns" < '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 mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1? ### In... |
count the number of patients who had a coronar arteriogr-2 cath procedure performed within 2 months after being diagnosed with pericardial disease nos. | 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_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'pericardial diseas... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients who had a coronar arteriogr-2 cath procedure performed within 2 months after being diagnosed wi... |
What is the number of gold medals for Lithuania (ltu), when the total is more than 1? | CREATE TABLE table_79456 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Gold") FROM table_79456 WHERE "Nation" = 'lithuania (ltu)' AND "Total" > '1' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of gold medals for Lithuania (ltu), when the total is more than 1? ### Input: CREATE TABLE table_79456 (
... |
Who was the (M) Best & Fairest when ray kaduck was president and richard keane was coach? | CREATE TABLE table_47972 (
"Year" real,
"President" text,
"(M) Finishing position" text,
"(M) Coach" text,
"(M) Best & Fairest" text,
"(M) Leading Goalkicker" text
) | SELECT "(M) Best & Fairest" FROM table_47972 WHERE "President" = 'ray kaduck' AND "(M) Coach" = 'richard keane' | Below are sql tables 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 (M) Best & Fairest when ray kaduck was president and richard keane was coach? ### Input: CREATE TABLE table_4797... |
How many courses for each course description? Show me a stacked bar chart The x-axis is course description and group by instructor's name, and order from low to high by the y axis. | 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 PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION v... | SELECT CRS_DESCRIPTION, COUNT(CRS_DESCRIPTION) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE GROUP BY EMP_FNAME, CRS_DESCRIPTION ORDER BY COUNT(CRS_DESCRIPTION) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many courses for each course description? Show me a stacked bar chart The x-axis is course description and group by inst... |
Can you tell me some useful courses to take before taking RCHUMS 381 ? | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'RCHUMS' AND number = 381 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me some useful courses to take before taking RCHUMS 381 ? ### Input: CREATE TABLE program_course (
program_... |
What is Played, when Points Against is '374'? | CREATE TABLE table_61870 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Played" FROM table_61870 WHERE "Points against" = '374' | Below are sql tables 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 Played, when Points Against is '374'? ### Input: CREATE TABLE table_61870 (
"Club" text,
"Played" text,
... |
has patient 7533 excreted any urine out foley until 05/2104. | 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 admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,... | SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7533)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'urine out foley... | Below are sql tables 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 7533 excreted any urine out foley until 05/2104. ### Input: CREATE TABLE chartevents (
row_id number,
su... |
what was the five most commonly performed procedure for patients with age 30s until 2 years ago? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-2 yea... | Below are sql tables 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 five most commonly performed procedure for patients with age 30s until 2 years ago? ### Input: CREATE TABLE cos... |
what is the number of patients whose diagnosis is poisoning by penicillins and have lab test abnormal status delta? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Poisoning by penicillins" 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: what is the number of patients whose diagnosis is poisoning by penicillins and have lab test abnormal status delta? ### Inpu... |
what is the number of newborn admitted patients who have lab test item id 51274? | 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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "NEWBORN" AND lab.itemid = "51274" | Below are sql tables 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 newborn admitted patients who have lab test item id 51274? ### Input: CREATE TABLE lab (
subject_i... |
For those employees who did not have any job in the past, a line chart shows the trend of manager_id over hire_date , and I want to display by the X-axis from high to low. | 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTME... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_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: For those employees who did not have any job in the past, a line chart shows the trend of manager_id over hire_date , and I ... |
since 5 years ago, had patient 035-10830 been in an er? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '035-10830' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-5 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: since 5 years ago, had patient 035-10830 been in an er? ### Input: CREATE TABLE diagnosis (
diagnosisid number,
pati... |
What is the largest year with an Entrant of ron harris / team lotus? | CREATE TABLE table_name_79 (
year INTEGER,
entrant VARCHAR
) | SELECT MAX(year) FROM table_name_79 WHERE entrant = "ron harris / team lotus" | Below are sql tables 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 year with an Entrant of ron harris / team lotus? ### Input: CREATE TABLE table_name_79 (
year INTEGE... |
is yesterday patient 5828's arterial bp [systolic] normal? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE... | 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 = 5828)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systo... | Below are sql tables 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 yesterday patient 5828's arterial bp [systolic] normal? ### Input: CREATE TABLE diagnoses_icd (
row_id number,
su... |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the trend about commission_pct over hire_date . | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 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: For those employees who do not work in departments with managers that have ids between 100 and 200, give me the trend about ... |
list flights from DENVER to PHILADELPHIA | CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREA... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: list flights from DENVER to PHILADELPHIA ### Input: CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREAT... |
Which opponent has a date 21 jul 2007? | CREATE TABLE table_name_3 (
opponent VARCHAR,
date VARCHAR
) | SELECT opponent FROM table_name_3 WHERE date = "21 jul 2007" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which opponent has a date 21 jul 2007? ### Input: CREATE TABLE table_name_3 (
opponent VARCHAR,
date VARCHAR
) ### R... |
show me any show me what the FIRST class fares are of the flights from PITTSBURGH to SAN FRANCISCO on monday | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CR... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((CITY_1.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: show me any show me what the FIRST class fares are of the flights from PITTSBURGH to SAN FRANCISCO on monday ### Input: CREA... |
among patients who were prescribed dakins 1/2 strength, what were the four most commonly prescribed drugs at the same time, in this year? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_i... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'dakins 1/2 strength' AND DATETIME(prescriptions.startdate, 'start... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: among patients who were prescribed dakins 1/2 strength, what were the four most commonly prescribed drugs at the same time, ... |
What is the most common major among female (sex is F) students? | CREATE TABLE STUDENT (
Major VARCHAR,
major VARCHAR,
Sex VARCHAR
) | SELECT major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the most common major among female (sex is F) students? ### Input: CREATE TABLE STUDENT (
Major VARCHAR,
maj... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.