instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
give me the number of patients whose admission type is urgent and procedure icd9 code is 5771? | 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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.icd9_code = "5771" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose admission type is urgent and procedure icd9 code is 5771? ### Input: CREATE TABLE proce... |
what number of patients diagnosed under icd9 code 2984 died in or before the year 2174? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2174.0" AND diagnoses.icd9_code = "2984" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of patients diagnosed under icd9 code 2984 died in or before the year 2174? ### Input: CREATE TABLE diagnoses (
... |
Find the last names of teachers teaching in classroom 109. | CREATE TABLE teachers (
lastname VARCHAR,
classroom VARCHAR
) | SELECT lastname FROM teachers WHERE classroom = 109 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the last names of teachers teaching in classroom 109. ### Input: CREATE TABLE teachers (
lastname VARCHAR,
clas... |
i want a flight from MONTREAL QUEBEC to SAN DIEGO CALIFORNIA that leaves sunday | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE fare (
fare... | 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, state AS STATE_0, state AS STATE_1 WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN DIEGO' AND date_day.day_number = ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i want a flight from MONTREAL QUEBEC to SAN DIEGO CALIFORNIA that leaves sunday ### Input: CREATE TABLE dual_carrier (
m... |
Bring the list of patients less than 61 years old that were diagnosed with coronary atherosclerosis of native coronary artery. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "61" AND diagnoses.short_title = "Crnry athrscl natve vssl" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bring the list of patients less than 61 years old that were diagnosed with coronary atherosclerosis of native coronary arter... |
i need to find a flight from PHILADELPHIA to SAN FRANCISCO that has a stopover in DALLAS | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fl... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT... | Below are sql tables 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 need to find a flight from PHILADELPHIA to SAN FRANCISCO that has a stopover in DALLAS ### Input: CREATE TABLE ground_serv... |
Which opponent's march was 31? | CREATE TABLE table_name_19 (
opponent VARCHAR,
march VARCHAR
) | SELECT opponent FROM table_name_19 WHERE march = 31 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which opponent's march was 31? ### Input: CREATE TABLE table_name_19 (
opponent VARCHAR,
march VARCHAR
) ### Respons... |
Draw a bar chart about the distribution of meter_500 and ID , rank by the ID in asc. | CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
... | SELECT meter_500, ID FROM swimmer ORDER BY 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: Draw a bar chart about the distribution of meter_500 and ID , rank by the ID in asc. ### Input: CREATE TABLE swimmer (
I... |
What is the Country with a Launched that is april 3, 1990? | CREATE TABLE table_name_70 (
country VARCHAR,
launched VARCHAR
) | SELECT country FROM table_name_70 WHERE launched = "april 3, 1990" | Below are sql tables 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 Country with a Launched that is april 3, 1990? ### Input: CREATE TABLE table_name_70 (
country VARCHAR,
... |
Which Losses have Wins smaller than 6, and a South West DFL of sandford? | CREATE TABLE table_60865 (
"South West DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT MIN("Losses") FROM table_60865 WHERE "Wins" < '6' AND "South West DFL" = 'sandford' | Below are sql tables 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 Losses have Wins smaller than 6, and a South West DFL of sandford? ### Input: CREATE TABLE table_60865 (
"South We... |
What Player has a Place of 2? | CREATE TABLE table_12498 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Player" FROM table_12498 WHERE "Place" = '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 Player has a Place of 2? ### Input: CREATE TABLE table_12498 (
"Place" text,
"Player" text,
"Country" text,... |
Show the race class and number of races in each class, and could you sort total number in ascending order? | CREATE TABLE track (
Track_ID int,
Name text,
Location text,
Seating real,
Year_Opened real
)
CREATE TABLE race (
Race_ID int,
Name text,
Class text,
Date text,
Track_ID text
) | SELECT Class, COUNT(*) FROM race GROUP BY Class ORDER BY COUNT(*) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the race class and number of races in each class, and could you sort total number in ascending order? ### Input: CREATE... |
Return a histogram on what are the names and distances for all airplanes?, and display from low to high by the y axis. | CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREAT... | SELECT name, distance FROM aircraft ORDER BY distance | Below are sql tables 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 a histogram on what are the names and distances for all airplanes?, and display from low to high by the y axis. ### I... |
Next semester , what 300 -level classes are there ? | 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, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Next semester , what 300 -level classes are there ? ### Input: CREATE TABLE course (
course_id int,
name varchar,
... |
In which week was attendance at 50,814? | CREATE TABLE table_42912 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT COUNT("Week") FROM table_42912 WHERE "Attendance" = '50,814' | Below are sql tables 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 week was attendance at 50,814? ### Input: CREATE TABLE table_42912 (
"Week" real,
"Date" text,
"Opponen... |
Show all role codes with at least 3 employees. | CREATE TABLE Employees (
role_code VARCHAR
) | SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 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: Show all role codes with at least 3 employees. ### Input: CREATE TABLE Employees (
role_code VARCHAR
) ### Response: SEL... |
name the type of drug patient evelyn lawrence is on. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT prescriptions.drug_type FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Evelyn Lawrence" | Below are sql tables 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 type of drug patient evelyn lawrence is on. ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id te... |
Who was the opponent for the giants stadium game? | CREATE TABLE table_11903 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff [a ]" text,
"Game site" text,
"Attendance" text,
"Record" text
) | SELECT "Opponent" FROM table_11903 WHERE "Game site" = 'giants 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: Who was the opponent for the giants stadium game? ### Input: CREATE TABLE table_11903 (
"Week" text,
"Date" text,
... |
Draw a scatter chart about the correlation between Body_Builder_ID and Snatch . | CREATE TABLE body_builder (
Body_Builder_ID int,
People_ID int,
Snatch real,
Clean_Jerk real,
Total real
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Birth_Date text,
Birth_Place text
) | SELECT Body_Builder_ID, Snatch FROM body_builder | Below are sql tables 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 scatter chart about the correlation between Body_Builder_ID and Snatch . ### Input: CREATE TABLE body_builder (
B... |
how many male patients have private health insurance? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 WHERE demographic.gender = "M" AND demographic.insurance = "Private" | Below are sql tables 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 male patients have private health insurance? ### Input: CREATE TABLE lab (
subject_id text,
hadm_id text,
... |
how many patients born before 2076 have been discharged to short term hospital? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "2076" | Below are sql tables 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 2076 have been discharged to short term hospital? ### Input: CREATE TABLE procedures (
sub... |
which performance was last on this album ? | CREATE TABLE table_204_906 (
id number,
"#" number,
"title" text,
"songwriters" text,
"producer(s)" text,
"performer" text
) | SELECT "title" FROM table_204_906 ORDER BY "#" 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: which performance was last on this album ? ### Input: CREATE TABLE table_204_906 (
id number,
"#" number,
"title... |
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of hire_date and the average of department_id bin hire_date by weekday, and I want to sort Y in descending order. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(DEPARTMENT_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, a bar chart shows the distribution of hire_date and the average of depa... |
For those records from the products and each product's manufacturer, find headquarter and the average of code , and group by attribute headquarter, and visualize them by a bar chart, and list in desc 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.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code 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, find headquarter and the average of code , and group by... |
which flights leaving BALTIMORE to DALLAS on monday afternoon have economic class | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airp... | 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 AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE (((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: which flights leaving BALTIMORE to DALLAS on monday afternoon have economic class ### Input: CREATE TABLE equipment_sequence... |
How many weeks have an attendance less than 26,048? | CREATE TABLE table_61657 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | SELECT SUM("Week") FROM table_61657 WHERE "Attendance" < '26,048' | Below are sql tables 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 less than 26,048? ### Input: CREATE TABLE table_61657 (
"Week" real,
"Date" text,
... |
what was patient 025-44495's first sputum, tracheal specimen microbiology test time since 09/2105. | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
... | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND microlab.culturesite = 'sputum, tracheal specime... | Below are sql tables 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 025-44495's first sputum, tracheal specimen microbiology test time since 09/2105. ### Input: CREATE TABLE t... |
A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, sort bars in desc order. | CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id I... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY date_of_completion DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart for what are the number of the completion dates of all the tests that have result 'Fail'?, sort bars in desc ord... |
What was the surface of the score of 7 5, 3 6, 7 6? | CREATE TABLE table_name_58 (
surface VARCHAR,
score VARCHAR
) | SELECT surface FROM table_name_58 WHERE score = "7–5, 3–6, 7–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: What was the surface of the score of 7 5, 3 6, 7 6? ### Input: CREATE TABLE table_name_58 (
surface VARCHAR,
score V... |
how many patients whose insurance is private and procedure icd9 code is 311? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "311" | Below are sql tables 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 insurance is private and procedure icd9 code is 311? ### Input: CREATE TABLE procedures (
subjec... |
how many of the patients with item id 51213 had abnormal lab test result? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51213" AND lab.flag = "abnormal" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the patients with item id 51213 had abnormal lab test result? ### Input: CREATE TABLE procedures (
subject_i... |
What To par has a Score of 68-66=134? | CREATE TABLE table_60008 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "To par" FROM table_60008 WHERE "Score" = '68-66=134' | Below are sql tables 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 To par has a Score of 68-66=134? ### Input: CREATE TABLE table_60008 (
"Place" text,
"Player" text,
"Countr... |
What is the ERP W for the frequency of 91.3MHz? | CREATE TABLE table_70198 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
) | SELECT "ERP W" FROM table_70198 WHERE "Frequency MHz" = '91.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 ERP W for the frequency of 91.3MHz? ### Input: CREATE TABLE table_70198 (
"Call sign" text,
"Frequency M... |
Who had the most points in game 81? | CREATE TABLE table_47703 (
"Game" real,
"Date" text,
"Team" text,
"High points" text,
"High rebounds" text,
"Location Attendance" text,
"Record" text
) | SELECT "High points" FROM table_47703 WHERE "Game" = '81' | Below are sql tables 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 points in game 81? ### Input: CREATE TABLE table_47703 (
"Game" real,
"Date" text,
"Team" text,... |
During the Spring and Summer term , how many 100 -level classes are being offered ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE gsi (
course_... | SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 100 AND 100 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: During the Spring and Summer term , how many 100 -level classes are being offered ? ### Input: CREATE TABLE instructor (
... |
what is the best american restaurant in the bay area ? | CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_name varchar
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rati... | SELECT location.house_number, restaurant.name FROM geographic, location, restaurant WHERE geographic.region = 'bay area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'american' AND restaurant.id = location.restaurant_id AND restaurant.rating = (SELECT MAX(RESTAURANTalias1.rating) FROM geog... | Below are sql tables 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 best american restaurant in the bay area ? ### Input: CREATE TABLE location (
restaurant_id int,
house_n... |
show me all flights from BOSTON to ATLANTA which leave ATLANTA after 1200 tomorrow | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_dista... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_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: show me all flights from BOSTON to ATLANTA which leave ATLANTA after 1200 tomorrow ### Input: CREATE TABLE date_day (
mo... |
Who is the owner of the radio frequency of 0 101.5 fm? | CREATE TABLE table_name_90 (
owner VARCHAR,
frequency VARCHAR
) | SELECT owner FROM table_name_90 WHERE frequency = "0 101.5 fm" | Below are sql tables 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 owner of the radio frequency of 0 101.5 fm? ### Input: CREATE TABLE table_name_90 (
owner VARCHAR,
freque... |
give me the number of patients whose gender is m and insurance is medicare? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Medicare" | Below are sql tables 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 gender is m and insurance is medicare? ### Input: CREATE TABLE demographic (
subjec... |
Which city has spanish news on the website ultimahora.com ? | CREATE TABLE table_name_3 (
city VARCHAR,
language VARCHAR,
website VARCHAR
) | SELECT city FROM table_name_3 WHERE language = "spanish" AND website = "ultimahora.com" | Below are sql tables 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 city has spanish news on the website ultimahora.com ? ### Input: CREATE TABLE table_name_3 (
city VARCHAR,
lan... |
tell me the name of the medication that patient 022-127262 was first prescribed via the sub-q route since 9 months ago? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
la... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-127262')) AND medication.routeadmin = 'sub-q' AND DATETIME(medi... | Below are sql tables 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 name of the medication that patient 022-127262 was first prescribed via the sub-q route since 9 months ago? ### ... |
What's the report of the race won by Michael Andretti, with Nigel Mansell driving the fastest lap? | CREATE TABLE table_73161 (
"Rnd" real,
"Race Name" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | SELECT "Report" FROM table_73161 WHERE "Winning driver" = 'Michael Andretti' AND "Fastest lap" = 'Nigel Mansell' | Below are sql tables 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 report of the race won by Michael Andretti, with Nigel Mansell driving the fastest lap? ### Input: CREATE TABLE t... |
What is the number for rank when gold is less than 0? | CREATE TABLE table_name_91 (
rank INTEGER,
gold INTEGER
) | SELECT SUM(rank) FROM table_name_91 WHERE gold < 0 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number for rank when gold is less than 0? ### Input: CREATE TABLE table_name_91 (
rank INTEGER,
gold INT... |
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, a bar chart shows the distribution of job_id and the sum of department_id , and group by attribute job_id, I want to display in desc by the sum department id. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NA... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
what were the top four frequent microbiology tests that patients had in the same month after they had had a ven cath renal dialysis procedure until 3 years ago? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
row_id number,
subject_id num... | 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 were the top four frequent microbiology tests that patients had in the same month after they had had a ven cath renal d... |
age < 18 years | CREATE TABLE table_train_249 (
"id" int,
"gender" string,
"allergy_to_dapagliflozin" bool,
"body_weight" float,
"estimated_glomerular_filtration_rate_egfr" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_249 WHERE age < 18 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: age < 18 years ### Input: CREATE TABLE table_train_249 (
"id" int,
"gender" string,
"allergy_to_dapagliflozin" b... |
age 18 or older | CREATE TABLE table_train_269 (
"id" int,
"pregnancy_or_lactation" bool,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"hba1c" float,
"prisoners" bool,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_269 WHERE age >= 18 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: age 18 or older ### Input: CREATE TABLE table_train_269 (
"id" int,
"pregnancy_or_lactation" bool,
"hemoglobin_a... |
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of email and employee_id , display in asc by the y-axis. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | SELECT EMAIL, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about t... |
Name the number of numbers for howard clark | CREATE TABLE table_1569625_1 (
no VARCHAR,
runner_s__up VARCHAR
) | SELECT COUNT(no) FROM table_1569625_1 WHERE runner_s__up = "Howard Clark" | Below are sql tables 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 of numbers for howard clark ### Input: CREATE TABLE table_1569625_1 (
no VARCHAR,
runner_s__up VARCH... |
What was the nationality for the player with 33 goals? | CREATE TABLE table_name_65 (
nationality VARCHAR,
goals VARCHAR
) | SELECT nationality FROM table_name_65 WHERE goals = 33 | Below are sql tables 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 nationality for the player with 33 goals? ### Input: CREATE TABLE table_name_65 (
nationality VARCHAR,
... |
Show me a bar chart comparing the total number of captains of different classes, I want to order by the x axis from high to low. | CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | SELECT Class, COUNT(Class) FROM captain GROUP BY Class ORDER BY Class 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 me a bar chart comparing the total number of captains of different classes, I want to order by the x axis from high to ... |
Name the marriage of the person who is married for christian viii | CREATE TABLE table_69586 (
"Birth" text,
"Marriage" text,
"Became Consort" text,
"Ceased to be Consort" text,
"Death" text,
"Spouse" text
) | SELECT "Marriage" FROM table_69586 WHERE "Spouse" = 'christian viii' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the marriage of the person who is married for christian viii ### Input: CREATE TABLE table_69586 (
"Birth" text,
... |
How many silver medals for the nation with fewer than 1 golds and total less than 1? | CREATE TABLE table_78753 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Silver") FROM table_78753 WHERE "Gold" < '1' AND "Total" < '1' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many silver medals for the nation with fewer than 1 golds and total less than 1? ### Input: CREATE TABLE table_78753 (
... |
When the away team was geelong, what was the away team score? | CREATE TABLE table_name_7 (
away_team VARCHAR
) | SELECT away_team AS score FROM table_name_7 WHERE away_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: When the away team was geelong, what was the away team score? ### Input: CREATE TABLE table_name_7 (
away_team VARCHAR
)... |
What is the number of the sail with an overall length of 13.68? | CREATE TABLE table_25595107_2 (
sail_number VARCHAR,
loa__metres_ VARCHAR
) | SELECT sail_number FROM table_25595107_2 WHERE loa__metres_ = "13.68" | Below are sql tables 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 the sail with an overall length of 13.68? ### Input: CREATE TABLE table_25595107_2 (
sail_number V... |
Which person teaches the easiest course in regards to ULCS ? | 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,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
t... | SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which person teaches the easiest course in regards to ULCS ? ### Input: CREATE TABLE offering_instructor (
offering_inst... |
what is the three year survival rate for renal & ureteral dis nos patients who were prescribed nifedipine cr? | 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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE chart... | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... | Below are sql tables 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 three year survival rate for renal & ureteral dis nos patients who were prescribed nifedipine cr? ### Input: CRE... |
what were the three most common specimen tests carried out? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 3 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the three most common specimen tests carried out? ### Input: CREATE TABLE admissions (
row_id number,
subj... |
What is the lowest draw that has 5 losses and byes greater than 0? | CREATE TABLE table_11920 (
"Tallangatta DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT MIN("Draws") FROM table_11920 WHERE "Losses" = '5' AND "Byes" > '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest draw that has 5 losses and byes greater than 0? ### Input: CREATE TABLE table_11920 (
"Tallangatta DF... |
List all the customers in increasing order of IDs by a bar chart. | CREATE TABLE Services (
Service_ID INTEGER,
Service_name VARCHAR(40)
)
CREATE TABLE Customers_Policies (
Customer_ID INTEGER,
Policy_ID INTEGER,
Date_Opened DATE,
Date_Closed DATE
)
CREATE TABLE First_Notification_of_Loss (
FNOL_ID INTEGER,
Customer_ID INTEGER,
Policy_ID INTEGER,
... | SELECT Customer_name, Customer_ID FROM Customers ORDER BY Customer_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: List all the customers in increasing order of IDs by a bar chart. ### Input: CREATE TABLE Services (
Service_ID INTEGER,... |
how many of the patients from protestant quaker belief had a lab test for urine prot. electrophoresis? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND lab.label = "Prot. Electrophoresis, Urine" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the patients from protestant quaker belief had a lab test for urine prot. electrophoresis? ### Input: CREATE TAB... |
What was the date of the game against Norway with a 1:1 result? | CREATE TABLE table_name_31 (
date VARCHAR,
opponent VARCHAR,
results¹ VARCHAR
) | SELECT date FROM table_name_31 WHERE opponent = "norway" AND results¹ = "1:1" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the date of the game against Norway with a 1:1 result? ### Input: CREATE TABLE table_name_31 (
date VARCHAR,
... |
In which city is the station licensed whose frequency MHz is higher than 102.3 and whose call sign is K292EU? | CREATE TABLE table_name_28 (
city_of_license VARCHAR,
frequency_mhz VARCHAR,
call_sign VARCHAR
) | SELECT city_of_license FROM table_name_28 WHERE frequency_mhz > 102.3 AND call_sign = "k292eu" | Below are sql tables 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 city is the station licensed whose frequency MHz is higher than 102.3 and whose call sign is K292EU? ### Input: CRE... |
What was the score for set 3 when set 1 was 14 25? | CREATE TABLE table_name_1 (
set_3 VARCHAR,
set_1 VARCHAR
) | SELECT set_3 FROM table_name_1 WHERE set_1 = "14–25" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score for set 3 when set 1 was 14 25? ### Input: CREATE TABLE table_name_1 (
set_3 VARCHAR,
set_1 VARCH... |
Return a histogram on what are the types of competition and number of competitions for that type?, I want to display total number in desc order. | CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps rea... | SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type 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: Return a histogram on what are the types of competition and number of competitions for that type?, I want to display total n... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and code , and group by attribute name, could you order by the Name in ascending please? | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and cod... |
what is the number of patients whose ethnicity is white and days of hospital stay is greater than 7? | 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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.days_stay > "7" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose ethnicity is white and days of hospital stay is greater than 7? ### Input: CREATE TABLE... |
what was the first systemicdiastolic of patient 006-140729 since 09/11/2104. | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT vitalperiodic.systemicdiastolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-140729')) AND NOT vitalperiodic.systemicdiast... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the first systemicdiastolic of patient 006-140729 since 09/11/2104. ### Input: CREATE TABLE medication (
medica... |
How many clubs are involved when there are 4 winners from the previous rounds and more than 4 clubs remaining? | CREATE TABLE table_name_59 (
clubs_involved INTEGER,
winners_from_previous_round VARCHAR,
clubs_remaining VARCHAR
) | SELECT MIN(clubs_involved) FROM table_name_59 WHERE winners_from_previous_round = "4" AND clubs_remaining > 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: How many clubs are involved when there are 4 winners from the previous rounds and more than 4 clubs remaining? ### Input: CR... |
Show me the number of black /haitian patients who were diagnosed under the diagnoses cicd9 code 2948. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND diagnoses.icd9_code = "2948" | Below are sql tables 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 black /haitian patients who were diagnosed under the diagnoses cicd9 code 2948. ### Input: CREATE TABL... |
Who is the Opponent on January 7? | CREATE TABLE table_45623 (
"Date" text,
"H/A/N" text,
"Opponent" text,
"Score" text,
"Record" text
) | SELECT "Opponent" FROM table_45623 WHERE "Date" = 'january 7' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the Opponent on January 7? ### Input: CREATE TABLE table_45623 (
"Date" text,
"H/A/N" text,
"Opponent" te... |
For each film, show the price and group them by cinema name in a stacked bar chart, sort x axis from low to high order. | CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cine... | SELECT Name, Price FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Title, Name ORDER BY Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each film, show the price and group them by cinema name in a stacked bar chart, sort x axis from low to high order. ### ... |
what is the average number of daily diagnosed cases of resp obstr-inhal obj nec during a year before? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevent... | SELECT AVG(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'resp obstr-inhal obj nec') AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(CURRENT_T... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the average number of daily diagnosed cases of resp obstr-inhal obj nec during a year before? ### Input: CREATE TABL... |
Who rode a Honda CBR1000rr, had fewer than 22 laps, and a time of +2 laps? | CREATE TABLE table_name_43 (
rider VARCHAR,
time VARCHAR,
bike VARCHAR,
laps VARCHAR
) | SELECT rider FROM table_name_43 WHERE bike = "honda cbr1000rr" AND laps < 22 AND time = "+2 laps" | Below are sql tables 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 rode a Honda CBR1000rr, had fewer than 22 laps, and a time of +2 laps? ### Input: CREATE TABLE table_name_43 (
rider... |
For those records from the products and each product's manufacturer, return a scatter chart about the correlation between price and manufacturer , 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 Price, Manufacturer 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 minimum total cost to the hospital that includes a pressure control lab test until 2104? | 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 MIN(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 lab.patientunitstayid FROM lab WHERE lab.labname = 'pressure control')) AND STRFTIME('%y', cost.chargetime) <= '2104' GR... | Below are sql tables 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 total cost to the hospital that includes a pressure control lab test until 2104? ### Input: CREATE TABLE... |
What was the total when the set 3 score was 25 27? | CREATE TABLE table_name_12 (
total VARCHAR,
set_3 VARCHAR
) | SELECT total FROM table_name_12 WHERE set_3 = "25–27" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the total when the set 3 score was 25 27? ### Input: CREATE TABLE table_name_12 (
total VARCHAR,
set_3 VARC... |
Give me the comparison about the average of School_ID over the All_Home , and group by attribute All_Home by a bar chart, and list y axis from low to high order. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY AVG(School_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: Give me the comparison about the average of School_ID over the All_Home , and group by attribute All_Home by a bar chart, an... |
What is the lowest number of league cups with 4 championships? | CREATE TABLE table_67083 (
"Name" text,
"Championship" real,
"League Cup" real,
"FA Cup" real,
"Total" text
) | SELECT MIN("League Cup") FROM table_67083 WHERE "Championship" = '4' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest number of league cups with 4 championships? ### Input: CREATE TABLE table_67083 (
"Name" text,
"C... |
Show the number of brand from each brand, and list x-axis in desc order. | CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_len... | SELECT brand, COUNT(brand) FROM camera_lens GROUP BY brand ORDER BY brand 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 the number of brand from each brand, and list x-axis in desc order. ### Input: CREATE TABLE photos (
id int,
ca... |
What is the date when the away team is essendon? | CREATE TABLE table_52959 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_52959 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: What is the date when the away team is essendon? ### Input: CREATE TABLE table_52959 (
"Home team" text,
"Home team ... |
What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68? | CREATE TABLE table_61363 (
"Club" text,
"First season in top division" text,
"Number of seasons in top division" real,
"First season of current spell in top division" text,
"Number of seasons in Liga MX" real,
"Top division titles" real
) | SELECT MAX("Number of seasons in Liga MX") FROM table_61363 WHERE "Club" = 'cruz azul' AND "Number of seasons in top division" > '68' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68... |
For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by weekday, could you sort in asc by the total number? | 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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum o... |
on 08/04/last year', what was minimum arterial bp [systolic] of patient 29666? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | 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 = 29666)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: on 08/04/last year', what was minimum arterial bp [systolic] of patient 29666? ### Input: CREATE TABLE cost (
row_id num... |
List the authors who do not have submission to any workshop. | CREATE TABLE acceptance (
Author VARCHAR,
Submission_ID VARCHAR
)
CREATE TABLE submission (
Author VARCHAR,
Submission_ID VARCHAR
) | SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) | Below are sql tables 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 authors who do not have submission to any workshop. ### Input: CREATE TABLE acceptance (
Author VARCHAR,
Su... |
Show different types of ships and the average tonnage of ships of each type in a bar chart, could you list y axis in asc order? | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show different types of ships and the average tonnage of ships of each type in a bar chart, could you list y axis in asc ord... |
when was patient 027-203413's urinary catheter output: indwelling/continuous ure output for the last time on this month/19? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diag... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND intakeoutput.cellpath LIKE '%output... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was patient 027-203413's urinary catheter output: indwelling/continuous ure output for the last time on this month/19? ... |
Find the name and credit score of the customers who have some loans. Plot them as pie chart. | CREATE TABLE loan (
loan_ID varchar(3),
loan_type varchar(15),
cust_ID varchar(3),
branch_ID varchar(3),
amount int
)
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
s... | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_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: Find the name and credit score of the customers who have some loans. Plot them as pie chart. ### Input: CREATE TABLE loan (
... |
What is the Away team score with north melbourne as home team? | CREATE TABLE table_53010 (
"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_53010 WHERE "Home 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: What is the Away team score with north melbourne as home team? ### Input: CREATE TABLE table_53010 (
"Home team" text,
... |
What are the names of regions with two or more storms? | CREATE TABLE affected_region (
region_id number,
storm_id number,
number_city_affected number
)
CREATE TABLE region (
region_id number,
region_code text,
region_name text
)
CREATE TABLE storm (
storm_id number,
name text,
dates_active text,
max_speed number,
damage_millions... | SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id 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 of regions with two or more storms? ### Input: CREATE TABLE affected_region (
region_id number,
s... |
is the heart rate of patient 1902's body last measured on the current intensive care unit visit less than the value second to last measured on the current intensive care unit visit? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | SELECT (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 = 1902) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_it... | Below are sql tables 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 the heart rate of patient 1902's body last measured on the current intensive care unit visit less than the value second t... |
What is the circuit of round 5? | CREATE TABLE table_27084 (
"Round" real,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text
) | SELECT "Circuit" FROM table_27084 WHERE "Round" = '5' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the circuit of round 5? ### Input: CREATE TABLE table_27084 (
"Round" real,
"Circuit" text,
"Date" text,... |
For those records from the products and each product's manufacturer, find name and manufacturer , and group by attribute name, and visualize them by a bar chart, and sort in descending by the X. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, 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, find name and manufacturer , and group by attribute nam... |
Which professors have given PSYCH minors a B- in their class ? | CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id WHERE (student_rec... | Below are sql tables 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 professors have given PSYCH minors a B- in their class ? ### Input: CREATE TABLE course (
course_id int,
name ... |
What is all the customer information for customers in NY state? | CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE playlist (
playlistid number,
name text
)
CREATE TABLE customer (
customerid number,
firstname text,
lastname text,
company text,
address text,
city text,
state text,
country text,
postalc... | SELECT * FROM customer WHERE state = "NY" | Below are sql tables 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 all the customer information for customers in NY state? ### Input: CREATE TABLE playlisttrack (
playlistid numbe... |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a line chart about the change of salary over hire_date , and I want to order by the X in ascending. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TI... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE | Below are sql tables 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, visualize a line chart a... |
Show the names and ids of tourist attractions that are visited at least two times with a bar chart, and I want to show by the Name from low to high. | CREATE TABLE Shops (
Shop_ID INTEGER,
Shop_Details VARCHAR(255)
)
CREATE TABLE Features (
Feature_ID INTEGER,
Feature_Details VARCHAR(255)
)
CREATE TABLE Photos (
Photo_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(255),
Description VARCHAR(255),
Filename VARCHAR(255),
... | SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID ORDER BY T1.Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the names and ids of tourist attractions that are visited at least two times with a bar chart, and I want to show by th... |
For all employees who have the letters D or S in their first name, visualize a scatter chart about the correlation between manager_id and department_id . | 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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END... | SELECT MANAGER_ID, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | Below are sql tables 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 employees who have the letters D or S in their first name, visualize a scatter chart about the correlation between m... |
Count the lowest Year which has gas explosion, Colliery of tylorstown colliery, and a Death toll larger than 57? | CREATE TABLE table_61878 (
"Colliery" text,
"Location" text,
"Date" text,
"Year" real,
"Death toll" real,
"cause" text
) | SELECT MIN("Year") FROM table_61878 WHERE "cause" = 'gas explosion' AND "Colliery" = 'tylorstown colliery' AND "Death toll" > '57' | Below are sql tables 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 lowest Year which has gas explosion, Colliery of tylorstown colliery, and a Death toll larger than 57? ### Input: ... |
what is the total number o production code where us viewers is 2.76? | CREATE TABLE table_24583 (
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | SELECT COUNT("Production code") FROM table_24583 WHERE "U.S. viewers (million)" = '2.76' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the total number o production code where us viewers is 2.76? ### Input: CREATE TABLE table_24583 (
"No." real,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.