instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
how many patients whose marital status is widowed and drug route is neb? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "WIDOWED" AND prescriptions.route = "NEB" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose marital status is widowed and drug route is neb? ### Input: CREATE TABLE lab (
subject_id text,
... |
What was the score of the game played when the team was 16-17? | CREATE TABLE table_21319 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
) | SELECT "Score" FROM table_21319 WHERE "Record" = '16-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 was the score of the game played when the team was 16-17? ### Input: CREATE TABLE table_21319 (
"Game" real,
"D... |
Is it possible for me to take 529 on Mondays and Wednesday ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND cour... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is it possible for me to take 529 on Mondays and Wednesday ? ### Input: CREATE TABLE semester (
semester_id int,
sem... |
Name the opponent for april 24 | CREATE TABLE table_name_5 (
opponent VARCHAR,
date VARCHAR
) | SELECT opponent FROM table_name_5 WHERE date = "april 24" | Below are sql tables 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 opponent for april 24 ### Input: CREATE TABLE table_name_5 (
opponent VARCHAR,
date VARCHAR
) ### Response:... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of email and commission_pct , show y-axis in ascending order. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 departments (
DEPARTME... | SELECT EMAIL, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT | Below are sql tables 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, return a bar chart about... |
Tell me the result for week of 4 | CREATE TABLE table_31891 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Result" FROM table_31891 WHERE "Week" = '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: Tell me the result for week of 4 ### Input: CREATE TABLE table_31891 (
"Week" real,
"Date" text,
"Opponent" text... |
Name the 2013 profit for assets being 11.2 | CREATE TABLE table_26741 (
"April 2013 Cum. Rank" real,
"Name" text,
"Rank 2012" real,
"Rank 2013" real,
"Base" text,
"2013 rev (bil. USD )" text,
"2013 Profit (mil. USD )" text,
"Assets 2013 (bil.$)" text,
"Market cap March 15 (mil.$)" real
) | SELECT "2013 Profit (mil. USD )" FROM table_26741 WHERE "Assets 2013 (bil.$)" = '11.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: Name the 2013 profit for assets being 11.2 ### Input: CREATE TABLE table_26741 (
"April 2013 Cum. Rank" real,
"Name"... |
575 offered when ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABL... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 575 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: 575 offered when ? ### Input: CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requ... |
question about my sendings - dynamic allocation. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, LastAccessDate FROM Users WHERE LOWER(Location) LIKE LOWER('%Bangladesh%') ORDER BY Reputation 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: question about my sendings - dynamic allocation. ### Input: CREATE TABLE PostLinks (
Id number,
CreationDate time,
... |
What are the comments when the vendor and type is alcatel-lucent routers? | CREATE TABLE table_17403 (
"Vendor and type" text,
"Models" text,
"NetFlow Version" text,
"Implementation" text,
"Comments" text
) | SELECT "Comments" FROM table_17403 WHERE "Vendor and type" = 'Alcatel-Lucent routers' | Below are sql tables 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 comments when the vendor and type is alcatel-lucent routers? ### Input: CREATE TABLE table_17403 (
"Vendor ... |
retrieve the patients' ids who are diagnosed with acc poisn-sympatholytics until 4 years ago. | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_i... | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'acc poisn-sympatholytics') AND DATETIME(diagnoses_icd.charttime) <= DATETI... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: retrieve the patients' ids who are diagnosed with acc poisn-sympatholytics until 4 years ago. ### Input: CREATE TABLE output... |
provide the number of patients whose diagnoses icd9 code is 3970 and lab test fluid is pleural? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "3970" AND lab.fluid = "Pleural" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses icd9 code is 3970 and lab test fluid is pleural? ### Input: CREATE TABLE proc... |
Find times of trains that run through stations for the local authority Chiltern, compare the total number of different times, and I want to order in asc by the Y-axis. | CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
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,
win... | SELECT time, COUNT(time) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY time ORDER BY COUNT(time) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find times of trains that run through stations for the local authority Chiltern, compare the total number of different times... |
number of patients who had a viral culture:r/o herpes simplex virus microbiology test in 2104. | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title 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
)
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'viral culture:r/o herpes simplex virus' AND STRFTIME('%y', microbiologyevents.charttime) = '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: number of patients who had a viral culture:r/o herpes simplex virus microbiology test in 2104. ### Input: CREATE TABLE d_icd... |
what is the maximum cost of a hospital that involves a drug named nafcillin in 2105? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'nafcillin')) AND STRFTIME('%y', cost.chargetim... | Below are sql tables 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 maximum cost of a hospital that involves a drug named nafcillin in 2105? ### Input: CREATE TABLE medication (
... |
I want to see trend of the number of season by season | CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
CREATE TABLE game (
... | SELECT Season, COUNT(Season) FROM game GROUP BY Season | Below are sql tables 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 to see trend of the number of season by season ### Input: CREATE TABLE injury_accident (
game_id int,
id int,... |
List all the candidates for the seat where the incumbent is Sam Gibbons? | CREATE TABLE table_18167 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Candidates" FROM table_18167 WHERE "Incumbent" = 'Sam Gibbons' | Below are sql tables 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 all the candidates for the seat where the incumbent is Sam Gibbons? ### Input: CREATE TABLE table_18167 (
"District... |
How many weeks have an attendance of 64,116? | CREATE TABLE table_name_40 (
week VARCHAR,
attendance VARCHAR
) | SELECT COUNT(week) FROM table_name_40 WHERE attendance = "64,116" | Below are sql tables 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 weeks have an attendance of 64,116? ### Input: CREATE TABLE table_name_40 (
week VARCHAR,
attendance VARCHA... |
leave flight from BOSTON to ATLANTA leave BOSTON approximately 1pm | CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time <= 1330 AND flight.departure_time >= 1230) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: leave flight from BOSTON to ATLANTA leave BOSTON approximately 1pm ### Input: CREATE TABLE aircraft (
aircraft_code varc... |
Name the transit passengers for 171078 | CREATE TABLE table_19019 (
"Rank" real,
"Airport" text,
"Total Passengers" real,
"% Change 2006/2007" text,
"International Passengers" real,
"Domestic Passengers" real,
"Transit Passengers" real,
"Aircraft Movements" real,
"Freight (Metric Tonnes)" real
) | SELECT MAX("Transit Passengers") FROM table_19019 WHERE "Freight (Metric Tonnes)" = '171078' | Below are sql tables 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 transit passengers for 171078 ### Input: CREATE TABLE table_19019 (
"Rank" real,
"Airport" text,
"Total... |
What player was drafted to the Detroit Red Wings? | CREATE TABLE table_2098 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "Player" FROM table_2098 WHERE "NHL team" = 'Detroit Red Wings' | Below are sql tables 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 drafted to the Detroit Red Wings? ### Input: CREATE TABLE table_2098 (
"Pick #" real,
"Player" text,... |
Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold? | CREATE TABLE table_38353 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Total") FROM table_38353 WHERE "Gold" < '4' AND "Silver" > '0' AND "Rank" = '3' AND "Bronze" < '6' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold? #... |
Tell me the average spectators for 2006-06-21 and time more than 21 | CREATE TABLE table_4414 (
"Date" text,
"Time(CET)" real,
"Team #1" text,
"Res." text,
"Team #2" text,
"Round" text,
"Spectators" real
) | SELECT AVG("Spectators") FROM table_4414 WHERE "Date" = '2006-06-21' AND "Time(CET)" > '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: Tell me the average spectators for 2006-06-21 and time more than 21 ### Input: CREATE TABLE table_4414 (
"Date" text,
... |
indicate the daily minimum sao2 of patient 14054 last month. | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_co... | SELECT MIN(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 = 14054)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sao2... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: indicate the daily minimum sao2 of patient 14054 last month. ### Input: CREATE TABLE microbiologyevents (
row_id number,... |
had patient 004-28929 had the urine output until 11/01/2103? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid num... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-28929')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu... | Below are sql tables 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 004-28929 had the urine output until 11/01/2103? ### Input: CREATE TABLE allergy (
allergyid number,
pat... |
Name the number air date for 14.20 us viewers | CREATE TABLE table_16617011_1 (
original_air_date VARCHAR,
us_viewers__millions_ VARCHAR
) | SELECT COUNT(original_air_date) FROM table_16617011_1 WHERE us_viewers__millions_ = "14.20" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the number air date for 14.20 us viewers ### Input: CREATE TABLE table_16617011_1 (
original_air_date VARCHAR,
... |
Are upper-level classes all 12 credits ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varch... | SELECT COUNT(*) = 0 FROM course, program_course WHERE course.credits <> 12 AND course.department = 'EECS' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are upper-level classes all 12 credits ? ### Input: CREATE TABLE ta (
campus_job_id int,
student_id int,
locatio... |
What are the names for all aircrafts with at least 2 flights? | CREATE TABLE aircraft (
aid number,
name text,
distance number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
de... | SELECT T2.name FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 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 are the names for all aircrafts with at least 2 flights? ### Input: CREATE TABLE aircraft (
aid number,
name te... |
What was the margin of the match on 19 Jan 2002? | CREATE TABLE table_22384475_1 (
margin VARCHAR,
match_date VARCHAR
) | SELECT margin FROM table_22384475_1 WHERE match_date = "19 Jan 2002" | Below are sql tables 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 margin of the match on 19 Jan 2002? ### Input: CREATE TABLE table_22384475_1 (
margin VARCHAR,
match_da... |
give me the number of patients whose language is russ and discharge location is long term care hospital? | 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 lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "RUSS" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose language is russ and discharge location is long term care hospital? ### Input: CREATE T... |
For those employees whose first name is ending with the letter m, sum their salary for visualizing a bar chart, and could you order in descending by the total number? | 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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0... | SELECT FIRST_NAME, SUM(SALARY) FROM employees WHERE FIRST_NAME LIKE '%m' GROUP BY FIRST_NAME ORDER BY SUM(SALARY) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose first name is ending with the letter m, sum their salary for visualizing a bar chart, and could yo... |
What is the game associated with a score of 4 - 2, and a record of 25-39-9? | CREATE TABLE table_name_81 (
game INTEGER,
score VARCHAR,
record VARCHAR
) | SELECT MAX(game) FROM table_name_81 WHERE score = "4 - 2" AND record = "25-39-9" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the game associated with a score of 4 - 2, and a record of 25-39-9? ### Input: CREATE TABLE table_name_81 (
game... |
how many number of teams played altogether ? | CREATE TABLE table_203_200 (
id number,
"region" text,
"seed" number,
"team" text,
"coach" text,
"finished" text,
"final opponent" text,
"score" text
) | SELECT COUNT("team") FROM table_203_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: how many number of teams played altogether ? ### Input: CREATE TABLE table_203_200 (
id number,
"region" text,
"... |
What are the movie titles and average rating of the movies with the lowest average rating? | CREATE TABLE Movie (
title VARCHAR,
mID VARCHAR
)
CREATE TABLE Rating (
stars INTEGER,
mID VARCHAR
) | SELECT T2.title, AVG(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY AVG(T1.stars) LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the movie titles and average rating of the movies with the lowest average rating? ### Input: CREATE TABLE Movie (
... |
until 2104 what are the five most frequently ordered medications for patients who have also been prescribed skelaxin at the same time? | CREATE TABLE procedures_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 chart... | 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 = 'skelaxin' AND STRFTIME('%y', prescriptions.startdate) <= '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: until 2104 what are the five most frequently ordered medications for patients who have also been prescribed skelaxin at the ... |
how many patients born before the year 2089 were given the drug metaformin (glucophage)? | 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.dob_year < "2089" AND prescriptions.drug = "MetFORMIN (Glucophage)" | Below are sql tables 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 born before the year 2089 were given the drug metaformin (glucophage)? ### Input: CREATE TABLE demographic... |
what are the five most common microbiology tests for patients that received lt heart angiocardiogram previously within 2 months? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inpute... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the five most common microbiology tests for patients that received lt heart angiocardiogram previously within 2 mon... |
what was patient 006-172277's last output on the current intensive care unit visit? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
d... | 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 = '006-172277') AND patient.unitdischargetime IS NULL) AND inta... | Below are sql tables 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 006-172277's last output on the current intensive care unit visit? ### Input: CREATE TABLE cost (
costi... |
What was the Score on February 18, 2008? | CREATE TABLE table_38112 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponent in the Final" text,
"Score" text
) | SELECT "Score" FROM table_38112 WHERE "Date" = 'february 18, 2008' | Below are sql tables 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 on February 18, 2008? ### Input: CREATE TABLE table_38112 (
"Outcome" text,
"Date" text,
"Sur... |
What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents? Show a bar graph, order x-axis in ascending order. | CREATE TABLE store (
Store_ID int,
Store_Name text,
Type text,
Area_size real,
Number_of_product_category real,
Ranking int
)
CREATE TABLE store_product (
Store_ID int,
Product_ID int
)
CREATE TABLE store_district (
Store_ID int,
District_ID int
)
CREATE TABLE district (
D... | SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 ORDER BY District_name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents? Show a bar ... |
What is the largest crowd when essendon is the home team? | CREATE TABLE table_16388506_1 (
crowd INTEGER,
home_team VARCHAR
) | SELECT MAX(crowd) FROM table_16388506_1 WHERE home_team = "Essendon" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the largest crowd when essendon is the home team? ### Input: CREATE TABLE table_16388506_1 (
crowd INTEGER,
... |
provide the number of patients whose ethnicity is white and diagnoses long title is personal history of hodgkin's disease? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.long_title = "Personal history of hodgkin's disease" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose ethnicity is white and diagnoses long title is personal history of hodgkin's disease? #... |
how many patients were prescribed cosyntropin during the same hospital encounter after venous cath nec? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_... | Below are sql tables 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 were prescribed cosyntropin during the same hospital encounter after venous cath nec? ### Input: CREATE TA... |
What candidate is associated with the Georgia 4 district? | CREATE TABLE table_1342233_11 (
candidates VARCHAR,
district VARCHAR
) | SELECT candidates FROM table_1342233_11 WHERE district = "Georgia 4" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What candidate is associated with the Georgia 4 district? ### Input: CREATE TABLE table_1342233_11 (
candidates VARCHAR,... |
in this month, how much did patient 8116 weigh for the last time? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type t... | SELECT 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 = 8116)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt' ... | Below are sql tables 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 month, how much did patient 8116 weigh for the last time? ### Input: CREATE TABLE outputevents (
row_id number,
... |
how many drugs were prescribed to patient 5828 in this month? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptio... | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5828) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') | Below are sql tables 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 drugs were prescribed to patient 5828 in this month? ### Input: CREATE TABLE microbiologyevents (
row_id number... |
what are the five most commonly ordered tests during this year for patients aged 30s? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TA... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(lab.labresulttime, '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: what are the five most commonly ordered tests during this year for patients aged 30s? ### Input: CREATE TABLE intakeoutput (... |
When the Away team was essendon, what was the Venue they played at? | CREATE TABLE table_10096 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_10096 WHERE "Away team" = 'essendon' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When the Away team was essendon, what was the Venue they played at? ### Input: CREATE TABLE table_10096 (
"Home team" te... |
what is the gender of patient with subject id 3343? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT demographic.gender FROM demographic WHERE demographic.subject_id = "3343" | Below are sql tables 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 of patient with subject id 3343? ### Input: CREATE TABLE procedures (
subject_id text,
hadm_id te... |
give me the number of patients whose age is less than 67 and drug name is diphenhydramine hcl? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "67" AND prescriptions.drug = "DiphenhydrAMINE HCl" | Below are sql tables 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 age is less than 67 and drug name is diphenhydramine hcl? ### Input: CREATE TABLE presc... |
What are the ids and names of all start stations that were the beginning of at least 200 trips. Show bar chart. | CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE weather (
date TEX... | SELECT start_station_name, start_station_id FROM trip | Below are sql tables 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 ids and names of all start stations that were the beginning of at least 200 trips. Show bar chart. ### Input: C... |
Which competition has a Goal of deacon 8/8 and a Score of 32-14? | CREATE TABLE table_name_3 (
competition VARCHAR,
goals VARCHAR,
score VARCHAR
) | SELECT competition FROM table_name_3 WHERE goals = "deacon 8/8" AND score = "32-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: Which competition has a Goal of deacon 8/8 and a Score of 32-14? ### Input: CREATE TABLE table_name_3 (
competition VARC... |
Which Poles has a Wins larger than 0, and a Podiums smaller than 17? | CREATE TABLE table_name_94 (
poles VARCHAR,
fastest_laps VARCHAR,
wins VARCHAR,
podiums VARCHAR
) | SELECT poles FROM table_name_94 WHERE wins > 0 AND podiums < 17 AND fastest_laps = 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: Which Poles has a Wins larger than 0, and a Podiums smaller than 17? ### Input: CREATE TABLE table_name_94 (
poles VARCH... |
What was the attendance in the game against the Detroit Lions? | CREATE TABLE table_33442 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_33442 WHERE "Opponent" = 'detroit lions' | Below are sql tables 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 in the game against the Detroit Lions? ### Input: CREATE TABLE table_33442 (
"Week" real,
"D... |
How many patients diagnosed with crn ath atlg vn bps grft had abnormal/delta lab test results. | 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 = "Crn ath atlg vn bps grft" 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: How many patients diagnosed with crn ath atlg vn bps grft had abnormal/delta lab test results. ### Input: CREATE TABLE presc... |
give the discharge time and duration of hospital stay for mary davis. | 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 demographic.days_stay, demographic.dischtime FROM demographic WHERE demographic.name = "Mary Davis" | Below are sql tables 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 discharge time and duration of hospital stay for mary davis. ### Input: CREATE TABLE prescriptions (
subject_id... |
What is the 1st leg when club is a.c. libertas? | CREATE TABLE table_1233026_4 (
club VARCHAR
) | SELECT 1 AS st_leg FROM table_1233026_4 WHERE club = "A.C. Libertas" | Below are sql tables 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 1st leg when club is a.c. libertas? ### Input: CREATE TABLE table_1233026_4 (
club VARCHAR
) ### Response: S... |
How many papers does Graham Neubig have in TACL | CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numci... | SELECT DISTINCT COUNT(paper.paperid) FROM author, paper, venue, writes WHERE author.authorname = 'Graham Neubig' AND venue.venueid = paper.venueid AND venue.venuename = 'TACL' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | Below are sql tables 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 papers does Graham Neubig have in TACL ### Input: CREATE TABLE dataset (
datasetid int,
datasetname varchar... |
How many golds have a Total of 11, and a Bronze smaller than 3? | CREATE TABLE table_name_81 (
gold INTEGER,
total VARCHAR,
bronze VARCHAR
) | SELECT SUM(gold) FROM table_name_81 WHERE total = 11 AND bronze < 3 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many golds have a Total of 11, and a Bronze smaller than 3? ### Input: CREATE TABLE table_name_81 (
gold INTEGER,
... |
Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , and I want to rank x axis in asc order. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY ACC_Regular_Season | Below are sql tables 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 ACC_Regular_Season and Team_ID , and I want to rank x axis in asc order. ###... |
Show the number of courses for each course description in a bar chart, and order by the total number in ascending. | CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varch... | 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 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: Show the number of courses for each course description in a bar chart, and order by the total number in ascending. ### Input... |
what is the earliest flight in the morning to arrive in BALTIMORE from BOSTON | CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIM... | Below are sql tables 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 earliest flight in the morning to arrive in BALTIMORE from BOSTON ### Input: CREATE TABLE food_service (
mea... |
what's the location attendance where record is 14 39 | CREATE TABLE table_11964154_9 (
location_attendance VARCHAR,
record VARCHAR
) | SELECT location_attendance FROM table_11964154_9 WHERE record = "14–39" | Below are sql tables 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 location attendance where record is 14 39 ### Input: CREATE TABLE table_11964154_9 (
location_attendance VARC... |
i want to travel from PHILADELPHIA to BOSTON on wednesday afternoon | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 23 AND date_day.month_number = 4 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: i want to travel from PHILADELPHIA to BOSTON on wednesday afternoon ### Input: CREATE TABLE date_day (
month_number int,... |
What is Record, when Location is 'Boston Garden', and when Date is 'Fri. Nov. 9'? | CREATE TABLE table_48836 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
) | SELECT "Record" FROM table_48836 WHERE "Location" = 'boston garden' AND "Date" = 'fri. nov. 9' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Record, when Location is 'Boston Garden', and when Date is 'Fri. Nov. 9'? ### Input: CREATE TABLE table_48836 (
... |
what is the minimum pick # where position is defensive tackle | CREATE TABLE table_16236 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT MIN("Pick #") FROM table_16236 WHERE "Position" = 'Defensive Tackle' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the minimum pick # where position is defensive tackle ### Input: CREATE TABLE table_16236 (
"Pick #" real,
"... |
when was the first time that patient 22648 during this month was given a hematocrit lab test? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title 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
... | SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hematocrit') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22648) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CUR... | Below are sql tables 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 first time that patient 22648 during this month was given a hematocrit lab test? ### Input: CREATE TABLE d_icd_... |
What was the Attendance before Week 17 with a Record of Bye? | CREATE TABLE table_44429 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Kickoff Time" text,
"Attendance" text
) | SELECT "Attendance" FROM table_44429 WHERE "Week" < '17' AND "Record" = 'bye' | Below are sql tables 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 before Week 17 with a Record of Bye? ### Input: CREATE TABLE table_44429 (
"Week" real,
"Dat... |
What is the location code with the most documents? | CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE all_documents (
document_id number,
date_stored time,
document_type_code text,
document_name text,
document_description ... | SELECT location_code FROM document_locations GROUP BY location_code 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 location code with the most documents? ### Input: CREATE TABLE ref_calendar (
calendar_date time,
day_nu... |
What year has a Top 25 of 0, and a Earnings ($) larger than 0? | CREATE TABLE table_56528 (
"Year" text,
"Starts" real,
"Cuts made" real,
"Wins" real,
"Top 10" real,
"Top 25" real,
"Earnings ($)" real,
"Money list rank" text
) | SELECT "Year" FROM table_56528 WHERE "Top 25" = '0' AND "Earnings ($)" > '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 year has a Top 25 of 0, and a Earnings ($) larger than 0? ### Input: CREATE TABLE table_56528 (
"Year" text,
"S... |
What is the highest round that had a pick lower than 8? | CREATE TABLE table_6681 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT MAX("Round") FROM table_6681 WHERE "Pick #" < '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: What is the highest round that had a pick lower than 8? ### Input: CREATE TABLE table_6681 (
"Round" real,
"Pick #" ... |
whom is listed first on the chart ? | CREATE TABLE table_204_978 (
id number,
"position" number,
"nation" number,
"number" number,
"name" text,
"soproni liga" number,
"uefa cup" number,
"hungarian cup" number,
"league cup" number,
"total" number
) | SELECT "name" FROM table_204_978 WHERE id = 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: whom is listed first on the chart ? ### Input: CREATE TABLE table_204_978 (
id number,
"position" number,
"natio... |
What is the horizontal bar score with a pommel horse of n/a, and the position is less than 27, and the parallel bars score is 15.800? | CREATE TABLE table_name_18 (
horizontal_bar VARCHAR,
parallel_bars VARCHAR,
pommel_horse VARCHAR,
position VARCHAR
) | SELECT horizontal_bar FROM table_name_18 WHERE pommel_horse = "n/a" AND position < 27 AND parallel_bars = "15.800" | Below are sql tables 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 horizontal bar score with a pommel horse of n/a, and the position is less than 27, and the parallel bars score i... |
hemoglobin a1c between 7 % and 9 % ( inclusive ) | CREATE TABLE table_train_278 (
"id" int,
"gender" string,
"supine" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"estimated_glomerular_filtration_rate_egfr" int,
"diastolic_blood_pressure_dbp" int,
"serum_creatinine" float,
"bilirubin" float,
"NOUSE" floa... | SELECT * FROM table_train_278 WHERE hemoglobin_a1c_hba1c >= 7 AND hemoglobin_a1c_hba1c <= 9 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: hemoglobin a1c between 7 % and 9 % ( inclusive ) ### Input: CREATE TABLE table_train_278 (
"id" int,
"gender" string... |
What conditions had both prolonged bleeding times and prolonged partial thromboplastin times | CREATE TABLE table_1099080_1 (
condition VARCHAR,
partial_thromboplastin_time VARCHAR,
bleeding_time VARCHAR
) | SELECT condition FROM table_1099080_1 WHERE partial_thromboplastin_time = "Prolonged" AND bleeding_time = "Prolonged" | Below are sql tables 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 conditions had both prolonged bleeding times and prolonged partial thromboplastin times ### Input: CREATE TABLE table_1... |
list the patient ids of those patients who in this year had been diagnosed with seizures. | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'seizures' AND DATETIME(diagnosis.diagnosistime, '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: list the patient ids of those patients who in this year had been diagnosed with seizures. ### Input: CREATE TABLE diagnosis ... |
What was the score of the other team that played Geelong? | CREATE TABLE table_10333 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_10333 WHERE "Home team" = 'geelong' | Below are sql tables 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 other team that played Geelong? ### Input: CREATE TABLE table_10333 (
"Home team" text,
"H... |
how many patients on neb route of drug administration have been diagnosed with seroma complicating a procedure? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Seroma complicting proc" AND prescriptions.route = "NEB" | Below are sql tables 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 on neb route of drug administration have been diagnosed with seroma complicating a procedure? ### Input: C... |
Who was the away team at MCG? | CREATE TABLE table_name_12 (
away_team VARCHAR,
venue VARCHAR
) | SELECT away_team FROM table_name_12 WHERE venue = "mcg" | Below are sql tables 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 at MCG? ### Input: CREATE TABLE table_name_12 (
away_team VARCHAR,
venue VARCHAR
) ### Respons... |
when was last the heartrate of patient 030-52327 measured today? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52327')) AND NOT vitalperiodic.heartrate IS NUL... | Below are sql tables 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 last the heartrate of patient 030-52327 measured today? ### Input: CREATE TABLE diagnosis (
diagnosisid number,... |
For those records from the products and each product's manufacturer, return a scatter chart about the correlation between price and code , and group by attribute founder. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | Below are sql tables 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 scatter chart about the correlation between pr... |
What is the earliest year the new york jets won at harvard stadium? | CREATE TABLE table_36642 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
) | SELECT MIN("Year") FROM table_36642 WHERE "Winner" = 'new york jets' AND "Location" = 'harvard stadium' | Below are sql tables 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 earliest year the new york jets won at harvard stadium? ### Input: CREATE TABLE table_36642 (
"Year" real,
... |
what were the first outputs of patient 12885 on 06/28/last year? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid 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 = 12885)) AND DATETIME(outputevents.charttim... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the first outputs of patient 12885 on 06/28/last year? ### Input: CREATE TABLE labevents (
row_id number,
... |
For those records from the products and each product's manufacturer, give me the comparison about the average of manufacturer over the name , and group by attribute name by a bar chart, and order by the y axis in desc. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, give me the comparison about the average of manufacture... |
specify type of admission and discharge time of patient id 42820 | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT demographic.admission_type, demographic.dischtime FROM demographic WHERE demographic.subject_id = "42820" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: specify type of admission and discharge time of patient id 42820 ### Input: CREATE TABLE procedures (
subject_id text,
... |
Show all branch names with the number of members in each branch registered after 2015 with a bar chart, and list in descending by the total number. | CREATE TABLE member (
Member_ID int,
Card_Number text,
Name text,
Hometown text,
Level int
)
CREATE TABLE branch (
Branch_ID int,
Name text,
Open_year text,
Address_road text,
City text,
membership_amount text
)
CREATE TABLE membership_register_branch (
Member_ID int,
... | SELECT Name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.Branch_ID = T2.Branch_ID WHERE T1.Register_Year > 2015 GROUP BY T2.Branch_ID ORDER BY COUNT(*) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show all branch names with the number of members in each branch registered after 2015 with a bar chart, and list in descendi... |
provide the number of patients whose diagnoses icd9 code is 25050 and lab test category is hematology. | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "25050" AND lab."CATEGORY" = "Hematology" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses icd9 code is 25050 and lab test category is hematology. ### Input: CREATE TAB... |
What is the sum of bronze when silver is greater than 3? | CREATE TABLE table_name_45 (
bronze INTEGER,
silver INTEGER
) | SELECT SUM(bronze) FROM table_name_45 WHERE silver > 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: What is the sum of bronze when silver is greater than 3? ### Input: CREATE TABLE table_name_45 (
bronze INTEGER,
sil... |
tell me the procedure that patient 15760 last had during the previous year? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15760) AND DATETIME(procedures_icd.charttime, 'start of year') = DAT... | Below are sql tables 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 procedure that patient 15760 last had during the previous year? ### Input: CREATE TABLE d_icd_diagnoses (
ro... |
What team was 2 when Tatung was team 1 at National Pei Men Senior High School? | CREATE TABLE table_name_32 (
team_2 VARCHAR,
team_1 VARCHAR,
ground VARCHAR
) | SELECT team_2 FROM table_name_32 WHERE team_1 = "tatung" AND ground = "national pei men senior high school" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What team was 2 when Tatung was team 1 at National Pei Men Senior High School? ### Input: CREATE TABLE table_name_32 (
t... |
Calculate the minimum age of the patients born after 2090 who were admitted in urgent care. | 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 MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.dob_year > "2090" | Below are sql tables 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 minimum age of the patients born after 2090 who were admitted in urgent care. ### Input: CREATE TABLE demograp... |
List the names of aircrafts and the number of times it won matches by a bar chart, could you list from low to high by the y-axis please? | CREATE TABLE match (
Round real,
Location text,
Country text,
Date text,
Fastest_Qualifying text,
Winning_Pilot text,
Winning_Aircraft text
)
CREATE TABLE aircraft (
Aircraft_ID int(11),
Aircraft varchar(50),
Description varchar(50),
Max_Gross_Weight varchar(50),
Total_d... | SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft 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: List the names of aircrafts and the number of times it won matches by a bar chart, could you list from low to high by the y-... |
how many patients are discharged to location snf and admitted before the year 2146? | 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 WHERE demographic.discharge_location = "SNF" AND demographic.admityear < "2146" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients are discharged to location snf and admitted before the year 2146? ### Input: CREATE TABLE lab (
subjec... |
what was the name of the drug, which patient 54281 had been prescribed two or more times until 8 months ago? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54281) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-8 month') GROUP BY prescriptions.drug... | Below are sql tables 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 name of the drug, which patient 54281 had been prescribed two or more times until 8 months ago? ### Input: CREA... |
List all the cities in a decreasing order of each city's stations' highest latitude. | CREATE TABLE station (
city VARCHAR,
lat INTEGER
) | SELECT city FROM station GROUP BY city ORDER BY MAX(lat) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List all the cities in a decreasing order of each city's stations' highest latitude. ### Input: CREATE TABLE station (
c... |
Find the name and building of the department with the highest budget. | CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
)
CREATE TABLE instructor (
id text,
name... | SELECT dept_name, building FROM department ORDER BY budget 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: Find the name and building of the department with the highest budget. ### Input: CREATE TABLE section (
course_id text,
... |
What builder has lot number 30702? | CREATE TABLE table_name_44 (
builder VARCHAR,
lot_no VARCHAR
) | SELECT builder FROM table_name_44 WHERE lot_no = 30702 | Below are sql tables 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 builder has lot number 30702? ### Input: CREATE TABLE table_name_44 (
builder VARCHAR,
lot_no VARCHAR
) ### Res... |
Who was the home team when there was a record of 20 13 3? | CREATE TABLE table_67694 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Home" FROM table_67694 WHERE "Record" = '20–13–3' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the home team when there was a record of 20 13 3? ### Input: CREATE TABLE table_67694 (
"Date" text,
"Visito... |
What Date performed has a Scores by each individual judge of 10 + 10 + 10 = 30, and a Main contestant of karanvir bohra? | CREATE TABLE table_name_19 (
date_performed VARCHAR,
main_contestant VARCHAR,
scores_by_each_individual_judge VARCHAR
) | SELECT date_performed FROM table_name_19 WHERE scores_by_each_individual_judge = 10 + 10 + 10 = 30 AND main_contestant = "karanvir bohra" | Below are sql tables 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 performed has a Scores by each individual judge of 10 + 10 + 10 = 30, and a Main contestant of karanvir bohra? ###... |
when was the first time patient 015-23047's heartrate was greater than 104.0 on the current icu visit. | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-23047') AND patient.unitdischargetime IS NULL) ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the first time patient 015-23047's heartrate was greater than 104.0 on the current icu visit. ### Input: CREATE TAB... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.