instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
What country scored 71-66-66-71=274? | CREATE TABLE table_name_32 (
country VARCHAR,
score VARCHAR
) | SELECT country FROM table_name_32 WHERE score = 71 - 66 - 66 - 71 = 274 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What country scored 71-66-66-71=274? ### Input: CREATE TABLE table_name_32 (
country VARCHAR,
score VARCHAR
) ### Re... |
give me the number of patients whose primary disease is abdominal abscess and year of death is less than or equal to 2132? | 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 WHERE demographic.diagnosis = "ABDOMINAL ABSCESS" AND demographic.dod_year <= "2132.0" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose primary disease is abdominal abscess and year of death is less than or equal to 2132? #... |
Please display the employee number, and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name in a scatter plot. | 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 EMPLOYEE_ID, SALARY FROM employees WHERE SALARY > (SELECT AVG(SALARY) FROM employees) AND DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%J%') | Below are sql tables 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 display the employee number, and salary for all employees who earn more than the average salary and who work in a dep... |
does patient 51497 come to the hospital during this year? | 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 d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 51497 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 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: does patient 51497 come to the hospital during this year? ### Input: CREATE TABLE prescriptions (
row_id number,
sub... |
Visualize the average experience working length of journalists working on different role type using a bar chart, and sort X from high to low order. | CREATE TABLE journalist (
journalist_ID int,
Name text,
Nationality text,
Age text,
Years_working int
)
CREATE TABLE news_report (
journalist_ID int,
Event_ID int,
Work_Type text
)
CREATE TABLE event (
Event_ID int,
Date text,
Venue text,
Name text,
Event_Attendance... | SELECT Work_Type, AVG(Years_working) FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_ID = t2.journalist_ID GROUP BY t2.Work_Type ORDER BY Work_Type DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize the average experience working length of journalists working on different role type using a bar chart, and sort X ... |
What is To Par, when Country is United States, and when Score is 71-68-73=212? | CREATE TABLE table_48861 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "To par" FROM table_48861 WHERE "Country" = 'united states' AND "Score" = '71-68-73=212' | Below are sql tables 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 To Par, when Country is United States, and when Score is 71-68-73=212? ### Input: CREATE TABLE table_48861 (
"Pl... |
What are the prerequisites that I have met for SOCADMIN 570 ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, student_record WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'SOCADMIN' AND COURSE_1.numbe... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the prerequisites that I have met for SOCADMIN 570 ? ### Input: CREATE TABLE comment_instructor (
instructor_id... |
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, give me the comparison about the average of department_id over the job_id , and group by attribute job_id by a bar chart, sort by the X-axis from low to high. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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)... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
for patients that were prescribed with lithium carbonate sr (lithobid), what are the four most commonly ordered drugs at the same time, until 1 year ago? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 c... | 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 = 'lithium carbonate sr (lithobid)' AND DATETIME(prescriptions.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: for patients that were prescribed with lithium carbonate sr (lithobid), what are the four most commonly ordered drugs at the... |
what is the record when the game is 13? | CREATE TABLE table_name_17 (
record VARCHAR,
game VARCHAR
) | SELECT record FROM table_name_17 WHERE game = 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: what is the record when the game is 13? ### Input: CREATE TABLE table_name_17 (
record VARCHAR,
game VARCHAR
) ### R... |
A bar chart shows the distribution of Sex and the sum of Height , and group by attribute Sex, could you list Y-axis in ascending order? | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY SUM(Height) | Below are sql tables 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 Sex and the sum of Height , and group by attribute Sex, could you list Y-axis in ascen... |
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID ... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the sum of d... |
how many products are there for each manufacturer?, and rank in ascending by the Y. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name 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: how many products are there for each manufacturer?, and rank in ascending by the Y. ### Input: CREATE TABLE Products (
C... |
For those products with a price between 60 and 120, draw a scatter chart about the correlation between price and manufacturer . | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Price, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those products with a price between 60 and 120, draw a scatter chart about the correlation between price and manufacture... |
Create a pie chart showing mean baseprice across bedtype. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType | Below are sql tables 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 pie chart showing mean baseprice across bedtype. ### Input: CREATE TABLE Reservations (
Code INTEGER,
Room ... |
What is the name of the venue where home team st kilda played? | CREATE TABLE table_57263 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_57263 WHERE "Home team" = 'st kilda' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the venue where home team st kilda played? ### Input: CREATE TABLE table_57263 (
"Home team" text,
... |
flights from PHOENIX to NEWARK | CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airport (
... | 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 = 'PHOENIX' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights from PHOENIX to NEWARK ### Input: CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hou... |
What was the other number with 63.98% bush? | CREATE TABLE table_5961 (
"County" text,
"Bush #" real,
"Bush %" text,
"Kerry #" real,
"Kerry %" text,
"Others #" real,
"Others %" text,
"Total" real
) | SELECT "Others #" FROM table_5961 WHERE "Bush %" = '63.98%' | Below are sql tables 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 other number with 63.98% bush? ### Input: CREATE TABLE table_5961 (
"County" text,
"Bush #" real,
"... |
When did the episodes first air that had a production code of 107? | CREATE TABLE table_18335117_2 (
original_air_date VARCHAR,
production_code VARCHAR
) | SELECT original_air_date FROM table_18335117_2 WHERE production_code = 107 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did the episodes first air that had a production code of 107? ### Input: CREATE TABLE table_18335117_2 (
original_a... |
What was the score for the home team St Kilda? | CREATE TABLE table_name_60 (
home_team VARCHAR
) | SELECT home_team AS score FROM table_name_60 WHERE home_team = "st kilda" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score for the home team St Kilda? ### Input: CREATE TABLE table_name_60 (
home_team VARCHAR
) ### Response:... |
Who is the candidate with 73,494 votes? | CREATE TABLE table_name_41 (
candidate VARCHAR,
number_of_votes VARCHAR
) | SELECT candidate FROM table_name_41 WHERE number_of_votes = "73,494" | Below are sql tables 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 candidate with 73,494 votes? ### Input: CREATE TABLE table_name_41 (
candidate VARCHAR,
number_of_votes V... |
did patient 40967 had a procedure in 2105? | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40967) AND STRFTIME('%y', procedures_icd.charttime) = '2105' | Below are sql tables 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 patient 40967 had a procedure in 2105? ### Input: CREATE TABLE transfers (
row_id number,
subject_id number,
... |
Name the party for virginia 12 | CREATE TABLE table_2668367_21 (
party VARCHAR,
district VARCHAR
) | SELECT party FROM table_2668367_21 WHERE district = "Virginia 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: Name the party for virginia 12 ### Input: CREATE TABLE table_2668367_21 (
party VARCHAR,
district VARCHAR
) ### Resp... |
participation to another interventional study. | CREATE TABLE table_train_61 (
"id" int,
"white_blood_cell_count_wbc" int,
"in_another_study" bool,
"systolic_blood_pressure_sbp" int,
"trauma" bool,
"temperature" float,
"anc" int,
"hypotension" bool,
"heart_rate" int,
"paco2" float,
"gastrointestinal_disease" bool,
"burn... | SELECT * FROM table_train_61 WHERE in_another_study = 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: participation to another interventional study. ### Input: CREATE TABLE table_train_61 (
"id" int,
"white_blood_cell_... |
What episode titles have 20.94 million U.S. viewers? | CREATE TABLE table_16617025_1 (
title VARCHAR,
us_viewers__millions_ VARCHAR
) | SELECT title FROM table_16617025_1 WHERE us_viewers__millions_ = "20.94" | Below are sql tables 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 episode titles have 20.94 million U.S. viewers? ### Input: CREATE TABLE table_16617025_1 (
title VARCHAR,
us_vi... |
Name the malayalam name for leo | CREATE TABLE table_23671 (
"Malayalam name" text,
"Transliteration" text,
"Concurrent Gregorian months" text,
"Sanskrit word and meaning" text,
"Zodiac sign" text
) | SELECT "Malayalam name" FROM table_23671 WHERE "Zodiac sign" = 'Leo' | Below are sql tables 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 malayalam name for leo ### Input: CREATE TABLE table_23671 (
"Malayalam name" text,
"Transliteration" text,... |
Overall of 62 is what average round? | CREATE TABLE table_68562 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT AVG("Round") FROM table_68562 WHERE "Overall" = '62' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Overall of 62 is what average round? ### Input: CREATE TABLE table_68562 (
"Round" real,
"Pick #" real,
"Overall... |
Which series occurred in which the semi-finalist was runner-up and the 7800.00 was 6420.00? | CREATE TABLE table_2544694_3 (
indonesia_super_series_2008 VARCHAR,
runner_up VARCHAR
) | SELECT indonesia_super_series_2008 FROM table_2544694_3 WHERE runner_up = "Semi-Finalist" AND 780000 = "6420.00" | Below are sql tables 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 series occurred in which the semi-finalist was runner-up and the 7800.00 was 6420.00? ### Input: CREATE TABLE table_25... |
What was the score of the game that was played on a grass surface? | CREATE TABLE table_6978 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partnering" text,
"Opponents in the final" text,
"Score" text
) | SELECT "Score" FROM table_6978 WHERE "Surface" = 'grass' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score of the game that was played on a grass surface? ### Input: CREATE TABLE table_6978 (
"Date" text,
... |
What is the name of the away team that has the home team score of 15.17 (107)? | CREATE TABLE table_33025 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_33025 WHERE "Home team score" = '15.17 (107)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the away team that has the home team score of 15.17 (107)? ### Input: CREATE TABLE table_33025 (
"Ho... |
Find the number of rooms for each bed type Visualize by bar chart, and show in ascending by the bars. | CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType ORDER BY bedType | Below are sql tables 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 rooms for each bed type Visualize by bar chart, and show in ascending by the bars. ### Input: CREATE TABL... |
please list afternoon flights between ST. PETERSBURG and CHARLOTTE | 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 flight_fare ... | 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 = 'ST. PETERSBURG')) AND to_airport IN (SELECT A... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: please list afternoon flights between ST. PETERSBURG and CHARLOTTE ### Input: CREATE TABLE flight_stop (
flight_id int,
... |
What was Richmond's highest attendance? | CREATE TABLE table_58572 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MAX("Crowd") FROM table_58572 WHERE "Home team" = 'richmond' | Below are sql tables 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 Richmond's highest attendance? ### Input: CREATE TABLE table_58572 (
"Home team" text,
"Home team score" te... |
Give me the comparison about author_tutor_ATB over the family_name by a bar chart. | 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 Student... | SELECT family_name, author_tutor_ATB FROM Course_Authors_and_Tutors ORDER BY personal_name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the comparison about author_tutor_ATB over the family_name by a bar chart. ### Input: CREATE TABLE Course_Authors_an... |
count the number of patients who received a cont inv mec ven 96+ hrs procedure in the same month following a diagnosis of crnry athrscl natve vssl in the last year. | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id numbe... | 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 = 'crnry athrscl natv... | Below are sql tables 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 received a cont inv mec ven 96+ hrs procedure in the same month following a diagnosis of cr... |
give the number of patients whose drug route is iv. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE 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: give the number of patients whose drug route is iv. ### Input: CREATE TABLE procedures (
subject_id text,
hadm_id te... |
Top 100 Highest reputation holder from India. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", DisplayName, Reputation FROM Users WHERE LOWER(Location) LIKE '%sri lanka%' OR UPPER(Location) LIKE '%LK' ORDER BY Reputation DESC LIMIT 100 | Below are sql tables 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 100 Highest reputation holder from India. ### Input: CREATE TABLE Votes (
Id number,
PostId number,
VoteType... |
Return the room and number of reservations made for each of the rooms to draw a bar chart, display X-axis in desc order. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT Room, COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY Room 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: Return the room and number of reservations made for each of the rooms to draw a bar chart, display X-axis in desc order. ###... |
what did patient 017-45919 have last as the output during the previous day? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-45919')) AND intakeoutput.cellpath LIKE '%output%' AND D... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what did patient 017-45919 have last as the output during the previous day? ### Input: CREATE TABLE intakeoutput (
intak... |
what is the number of patients whose days of hospital stay is greater than 6 and lab test name is asparate aminotransferase (ast)? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "6" AND lab.label = "Asparate Aminotransferase (AST)" | Below are sql tables 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 days of hospital stay is greater than 6 and lab test name is asparate aminotransferase ... |
How many users are in the database. | CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Na... | SELECT COUNT(*) AS number_of_userss FROM Users | Below are sql tables 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 users are in the database. ### Input: CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetT... |
Out of total number of patients treated with dexamethasone, how many of them died in or before 2112? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2112.0" AND prescriptions.drug = "Dexamethasone" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Out of total number of patients treated with dexamethasone, how many of them died in or before 2112? ### Input: CREATE TABLE... |
In which lane did the swimmer with a time of 1:58.44 swim? | CREATE TABLE table_13750 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | SELECT COUNT("Lane") FROM table_13750 WHERE "Time" = '1:58.44' | Below are sql tables 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 which lane did the swimmer with a time of 1:58.44 swim? ### Input: CREATE TABLE table_13750 (
"Rank" real,
"Lane"... |
patient 021-69410 was admitted to hospital since 5 years ago? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '021-69410' AND DATETIME(patient.hospitaladmittime) >= 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: patient 021-69410 was admitted to hospital since 5 years ago? ### Input: CREATE TABLE allergy (
allergyid number,
pa... |
What is the brigade when Al-Hamra ('arab al-hamra) shows for name? | CREATE TABLE table_46547 (
"Name" text,
"Date" text,
"Defending forces" text,
"Brigade" text,
"Population" text
) | SELECT "Brigade" FROM table_46547 WHERE "Name" = 'al-hamra (''arab al-hamra)' | Below are sql tables 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 brigade when Al-Hamra ('arab al-hamra) shows for name? ### Input: CREATE TABLE table_46547 (
"Name" text,
... |
what is the number of patients whose admission type is urgent and diagnoses long title is electrolyte and fluid disorders not elsewhere classified? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Electrolyte and fluid disorders not elsewhere classified" | Below are sql tables 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 admission type is urgent and diagnoses long title is electrolyte and fluid disorders no... |
what is the respiration change of patient 027-61708 from the value measured at 2105-12-23 00:00:00 compared to the value measured at 2105-12-22 23:55:00? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | SELECT (SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-61708')) AND NOT vitalperiodic.respiration ... | Below are sql tables 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 respiration change of patient 027-61708 from the value measured at 2105-12-23 00:00:00 compared to the value mea... |
provide the number of patients with procedure icd9 code 3606 who were admitted in hospital for more than 23 days. | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "23" AND procedures.icd9_code = "3606" | Below are sql tables 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 with procedure icd9 code 3606 who were admitted in hospital for more than 23 days. ### Input:... |
How many titles for the production code of NABF07? | CREATE TABLE table_2386 (
"\u2116" real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT COUNT("Title") FROM table_2386 WHERE "Production code" = 'NABF07' | Below are sql tables 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 titles for the production code of NABF07? ### Input: CREATE TABLE table_2386 (
"\u2116" real,
"#" real,
... |
give the number of patients who are born before the year 2023 and follow the religion protestant quaker. | 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.religion = "PROTESTANT QUAKER" AND demographic.dob_year < "2023" | Below are sql tables 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 who are born before the year 2023 and follow the religion protestant quaker. ### Input: CREATE T... |
What original air date has 5.85 u.s. viewers (million)? | CREATE TABLE table_29319 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | SELECT "Original air date" FROM table_29319 WHERE "U.S. viewers (million)" = '5.85' | Below are sql tables 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 original air date has 5.85 u.s. viewers (million)? ### Input: CREATE TABLE table_29319 (
"No. in series" real,
... |
how many patients whose admission type is emergency and diagnoses icd9 code is 7455? | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.icd9_code = "7455" | Below are sql tables 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 type is emergency and diagnoses icd9 code is 7455? ### Input: CREATE TABLE prescriptions (... |
Who was the away team for the Etobicoke Kangaroos home game? | CREATE TABLE table_name_81 (
away VARCHAR,
home VARCHAR
) | SELECT away FROM table_name_81 WHERE home = "etobicoke kangaroos" | Below are sql tables 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 away team for the Etobicoke Kangaroos home game? ### Input: CREATE TABLE table_name_81 (
away VARCHAR,
h... |
show me the number of elective hospital admission patients who were hospitalized for more than 14 days. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.days_stay > "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: show me the number of elective hospital admission patients who were hospitalized for more than 14 days. ### Input: CREATE TA... |
Which team had the attendance of 16,468 and lost? | CREATE TABLE table_69378 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text
) | SELECT "Loss" FROM table_69378 WHERE "Attendance" = '16,468' | Below are sql tables 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 had the attendance of 16,468 and lost? ### Input: CREATE TABLE table_69378 (
"Date" text,
"Opponent" text... |
give me the number of patients whose insurance is government and admission location is emergency room admit? | 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.insurance = "Government" AND demographic.admission_location = "EMERGENCY ROOM 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: give me the number of patients whose insurance is government and admission location is emergency room admit? ### Input: CREA... |
Show the headquarters that have both companies in banking industry and companies in oil and gas industry. | CREATE TABLE company (
Headquarters VARCHAR,
Industry VARCHAR
) | SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas" | Below are sql tables 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 headquarters that have both companies in banking industry and companies in oil and gas industry. ### Input: CREATE ... |
Which requirements do I need to meet for a CS-LSA degree ? | 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 program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which requirements do I need to meet for a CS-LSA degree ? ### Input: CREATE TABLE program_course (
program_id int,
... |
give me the difference between the total amount of input and the total output of patient 4401 on this month/30. | 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 (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 = 4401)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT... | Below are sql tables 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 difference between the total amount of input and the total output of patient 4401 on this month/30. ### Input: C... |
What year is listed that has points greater than 0 with a chassis labeled AGS JH22? | CREATE TABLE table_67847 (
"Year" real,
"Chassis" text,
"Engine" text,
"Tyres" text,
"Points" real
) | SELECT "Year" FROM table_67847 WHERE "Points" > '0' AND "Chassis" = 'ags jh22' | Below are sql tables 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 is listed that has points greater than 0 with a chassis labeled AGS JH22? ### Input: CREATE TABLE table_67847 (
... |
Who had the most poinst in game 72? | CREATE TABLE table_17288825_9 (
high_points VARCHAR,
game VARCHAR
) | SELECT high_points FROM table_17288825_9 WHERE game = 72 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who had the most poinst in game 72? ### Input: CREATE TABLE table_17288825_9 (
high_points VARCHAR,
game VARCHAR
) #... |
What are the first names and offices of history professors who don't have Ph.D.s? | CREATE TABLE enroll (
class_code text,
stu_num number,
enroll_grade text
)
CREATE TABLE student (
stu_num number,
stu_lname text,
stu_fname text,
stu_init text,
stu_dob time,
stu_hrs number,
stu_class text,
stu_gpa number,
stu_transfer number,
dept_code text,
stu... | SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the first names and offices of history professors who don't have Ph.D.s? ### Input: CREATE TABLE enroll (
class... |
what are the allergies that on their last hospital encounter patient 030-51920 had? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
... | 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 = '030-51920' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient... | Below are sql tables 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 allergies that on their last hospital encounter patient 030-51920 had? ### Input: CREATE TABLE allergy (
al... |
how many patients aged below 86 were diagnosed with icd9 code 11284? | 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.age < "86" AND diagnoses.icd9_code = "11284" | Below are sql tables 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 aged below 86 were diagnosed with icd9 code 11284? ### Input: CREATE TABLE demographic (
subject_id te... |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about employee_id over the first_name by a bar chart. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT FIRST_NAME, EMPLOYEE_ID 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 comparison a... |
calculate the difference between patient 010-1155's total output and the total input on the last icu visit. | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-1155') AND NOT patient.unitdischarge... | Below are sql tables 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 010-1155's total output and the total input on the last icu visit. ### Input: CREAT... |
How many accounts are opened in each day for all accounts by the customer with first name 'Meaghan' ? Bin the account open day by year interval in a bar chart, could you rank x-axis in ascending order? | CREATE TABLE Product_Categories (
production_type_code VARCHAR(15),
product_type_description VARCHAR(80),
vat_rating DECIMAL(19,4)
)
CREATE TABLE Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER... | SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' ORDER BY date_account_opened | Below are sql tables 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 accounts are opened in each day for all accounts by the customer with first name 'Meaghan' ? Bin the account open d... |
Will there be a 1 -credit upper level class for Fall 2016 ? | 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 course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 1 AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Fall' AND seme... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Will there be a 1 -credit upper level class for Fall 2016 ? ### Input: CREATE TABLE course (
course_id int,
name var... |
Is RACKHAM 571 easier than RACKHAM 575 ? | CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as ... | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, program_course AS PROGRAM_COURSE_0, program_course AS PROGRAM_COURSE_1 WHERE COURSE_0.department = 'RACKHAM' AND COURSE_0.number = 575 AND COURSE_1.department = 'RACKHAM' AND COURSE_1.number = 571 AND PROGRAM_COURSE_0.course_id = COURSE_0.course_id AND PR... | Below are sql tables 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 RACKHAM 571 easier than RACKHAM 575 ? ### Input: CREATE TABLE program_requirement (
program_id int,
category varc... |
what is drug type and drug code of drug name simethicone? | 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 prescriptions.drug_type, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Simethicone" | Below are sql tables 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 drug type and drug code of drug name simethicone? ### Input: CREATE TABLE prescriptions (
subject_id text,
h... |
For all storms with at least 1 death, compare the total number of deaths by dates_active attribute. | CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Number_Deaths int
)
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_city_affected real
)
CREATE TABLE region (
Region_id int,
Region_code text,
R... | SELECT Dates_active, Number_Deaths FROM storm WHERE Number_Deaths >= 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 all storms with at least 1 death, compare the total number of deaths by dates_active attribute. ### Input: CREATE TABLE ... |
What was the attendance at Corio Oval? | CREATE TABLE table_name_9 (
crowd VARCHAR,
venue VARCHAR
) | SELECT crowd FROM table_name_9 WHERE venue = "corio 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 Corio Oval? ### Input: CREATE TABLE table_name_9 (
crowd VARCHAR,
venue VARCHAR
) ### Res... |
what is the last date ? | CREATE TABLE table_204_130 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | SELECT "date" FROM table_204_130 ORDER BY "date" DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the last date ? ### Input: CREATE TABLE table_204_130 (
id number,
"#" number,
"date" text,
"venue" ... |
what was the last laboratory test that patient 012-85821 received during their last hospital visit? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-85821' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmitti... | Below are sql tables 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 last laboratory test that patient 012-85821 received during their last hospital visit? ### Input: CREATE TABLE ... |
What genre is Led Zeppelin? | CREATE TABLE table_69981 (
"Artist" text,
"Country of origin" text,
"Period active" text,
"Release-year of first charted record" real,
"Genre" text,
"Claimed sales" text
) | SELECT "Genre" FROM table_69981 WHERE "Artist" = 'led zeppelin' | Below are sql tables 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 genre is Led Zeppelin? ### Input: CREATE TABLE table_69981 (
"Artist" text,
"Country of origin" text,
"Peri... |
What is the name of the highest rated wine? | CREATE TABLE grapes (
id number,
grape text,
color text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,
year number,
price number,
score number,
cases number,
drink text
)
CREATE TABLE appellations (
no numbe... | SELECT name FROM wine ORDER BY score LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the highest rated wine? ### Input: CREATE TABLE grapes (
id number,
grape text,
color text
)... |
what are the average total costs of a hospital involving acute respiratory distress - etiology unknown the previous year? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE p... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute respiratory distress - etiology unknow... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the average total costs of a hospital involving acute respiratory distress - etiology unknown the previous year? ##... |
Visualize a bar chart about the distribution of All_Games and ACC_Percent , and rank by the Y in descending. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Games, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart about the distribution of All_Games and ACC_Percent , and rank by the Y in descending. ### Input: CREA... |
Draw a bar chart of type versus the total number, and order from low to high by the the total number . | CREATE TABLE building (
building_id text,
Name text,
Street_address text,
Years_as_tallest text,
Height_feet int,
Floors int
)
CREATE TABLE Institution (
Institution_id text,
Institution text,
Location text,
Founded real,
Type text,
Enrollment int,
Team text,
Pri... | SELECT Type, COUNT(*) FROM Institution 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: Draw a bar chart of type versus the total number, and order from low to high by the the total number . ### Input: CREATE TAB... |
What is every name origin with the name Ovda Fluctus? | CREATE TABLE table_16799784_12 (
name VARCHAR
) | SELECT name AS origin FROM table_16799784_12 WHERE name = "Ovda Fluctus" | Below are sql tables 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 every name origin with the name Ovda Fluctus? ### Input: CREATE TABLE table_16799784_12 (
name VARCHAR
) ### Res... |
show me all flights arriving at DAL from other airports | 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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE ... | SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'DAL' AND city.city_code = airport_service.city_code AND flight.from_airport = airport_service.airport_code AND flight.to_airport = 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: show me all flights arriving at DAL from other airports ### Input: CREATE TABLE fare_basis (
fare_basis_code text,
b... |
Does CMPLXSYS 391 have morning classes ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program_cours... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'CMPLXSYS' AND course.number = 391 AND semester.semester = 'WN' AND semester.semester_id = course... | Below are sql tables 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 CMPLXSYS 391 have morning classes ? ### Input: CREATE TABLE comment_instructor (
instructor_id int,
student_id ... |
what is the number of times that patient 021-80293 has had a enteral og flush intake since 10/21/2102? | 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 lab (
labid numbe... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-80293')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.ce... | Below are sql tables 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 times that patient 021-80293 has had a enteral og flush intake since 10/21/2102? ### Input: CREATE TAB... |
among patients who had a hospital stay for more than 14 days, how many of them were aged below 50? | 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 WHERE demographic.age < "50" AND demographic.days_stay > "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: among patients who had a hospital stay for more than 14 days, how many of them were aged below 50? ### Input: CREATE TABLE p... |
tell me the difference in the mchc value for patient 010-16572 second measured on the current hospital visit compared to the first value measured 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 (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 = '010-16572' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'mchc'... | Below are sql tables 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 difference in the mchc value for patient 010-16572 second measured on the current hospital visit compared to the... |
please list the flights for me that leave DALLAS on tuesday morning and arrive in ATLANTA | CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE restriction (
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 22 AND date_day.month_number = 3 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 list the flights for me that leave DALLAS on tuesday morning and arrive in ATLANTA ### Input: CREATE TABLE airport (
... |
what is days of hospital stay and discharge location of subject id 98220? | 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 demographic.days_stay, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "98220" | Below are sql tables 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 days of hospital stay and discharge location of subject id 98220? ### Input: CREATE TABLE prescriptions (
subjec... |
what are the flights from TACOMA to SAN JOSE also on tuesday the eighteenth of may | CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TA... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN JOSE' AND date_day.day_number = 22 AND date_day.month_number = 3 AND ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the flights from TACOMA to SAN JOSE also on tuesday the eighteenth of may ### Input: CREATE TABLE flight_leg (
... |
How many patients with hypertension (rule out coronary artery disease\cardiac cath) as their primary disease have an unspecified death status? | 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.expire_flag = "0" AND demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" | Below are sql tables 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 hypertension (rule out coronary artery disease\cardiac cath) as their primary disease have an unspeci... |
what are the four most frequently given microbiology tests for patients who have previously received therapeutic antibacterials - fourth generation cephalosporin within 2 months, in the previous year? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'therapeutic antibacterials - fourth generati... | Below are sql tables 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 four most frequently given microbiology tests for patients who have previously received therapeutic antibacteri... |
When North Melbourne is the Away team, what is the total number of the Crowd? | CREATE TABLE table_name_46 (
crowd VARCHAR,
away_team VARCHAR
) | SELECT COUNT(crowd) FROM table_name_46 WHERE away_team = "north melbourne" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When North Melbourne is the Away team, what is the total number of the Crowd? ### Input: CREATE TABLE table_name_46 (
cr... |
how many promotional releases were there ? | CREATE TABLE table_203_426 (
id number,
"year" number,
"title" text,
"peak chart positions\naus" number,
"peak chart positions\nnz" number,
"peak chart positions\nuk" number,
"album" text
) | SELECT COUNT(*) FROM table_203_426 WHERE "album" = 'promotional release' | Below are sql tables 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 promotional releases were there ? ### Input: CREATE TABLE table_203_426 (
id number,
"year" number,
"ti... |
give the number of married patients who were admitted before the year 2175. | 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 WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2175" | Below are sql tables 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 married patients who were admitted before the year 2175. ### Input: CREATE TABLE lab (
subject_id tex... |
how many times has patient 030-72509 ever visited the hospital the last year? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '030-72509' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times has patient 030-72509 ever visited the hospital the last year? ### Input: CREATE TABLE treatment (
treatm... |
give me the number of patients whose ethnicity is white and admission year is less than 2152? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.admityear < "2152" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose ethnicity is white and admission year is less than 2152? ### Input: CREATE TABLE proced... |
What is the name of the race in the Modena circuit? | CREATE TABLE table_16767 (
"Race Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Constructor" text,
"Report" text
) | SELECT "Race Name" FROM table_16767 WHERE "Circuit" = 'Modena' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the race in the Modena circuit? ### Input: CREATE TABLE table_16767 (
"Race Name" text,
"Circuit... |
what's the date of the birth of patient 7524? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid... | SELECT patients.dob FROM patients WHERE patients.subject_id = 7524 | Below are sql tables 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 date of the birth of patient 7524? ### Input: CREATE TABLE d_icd_procedures (
row_id number,
icd9_code te... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and revenue , and group by attribute headquarter, and could you show from high to low by the X-axis please? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and r... |
Which Video has a Channel of 25.3? | CREATE TABLE table_63156 (
"Channel" real,
"Video" text,
"Aspect" text,
"PSIP Short Name" text,
"Programming" text
) | SELECT "Video" FROM table_63156 WHERE "Channel" = '25.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: Which Video has a Channel of 25.3? ### Input: CREATE TABLE table_63156 (
"Channel" real,
"Video" text,
"Aspect" ... |
WHAT IS THE NUMBER OF Attendance WITH A RECORD 94 36 | CREATE TABLE table_name_70 (
attendance INTEGER,
save VARCHAR,
record VARCHAR
) | SELECT AVG(attendance) FROM table_name_70 WHERE save = "–" AND record = "94–36" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT IS THE NUMBER OF Attendance WITH A RECORD 94 36 ### Input: CREATE TABLE table_name_70 (
attendance INTEGER,
sav... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.