instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
the number of patients in ward 874 since 5 years ago? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 874 AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-5 year') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: the number of patients in ward 874 since 5 years ago? ### Input: CREATE TABLE cost (
costid number,
uniquepid text,
... |
What was the score for the game with FK Bratstvo as home team? | CREATE TABLE table_75081 (
"Venue" text,
"Home" text,
"Guest" text,
"Score" text,
"Attendance" real
) | SELECT "Score" FROM table_75081 WHERE "Home" = 'fk bratstvo' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score for the game with FK Bratstvo as home team? ### Input: CREATE TABLE table_75081 (
"Venue" text,
"... |
Find the dates of the tests taken with result 'Pass', and count them by a bar chart, and rank names in descending order. | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
per... | SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" GROUP BY date_test_taken ORDER BY date_test_taken 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: Find the dates of the tests taken with result 'Pass', and count them by a bar chart, and rank names in descending order. ###... |
How many to par in England? | CREATE TABLE table_name_93 (
to_par VARCHAR,
country VARCHAR
) | SELECT to_par FROM table_name_93 WHERE country = "england" | Below are sql tables 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 to par in England? ### Input: CREATE TABLE table_name_93 (
to_par VARCHAR,
country VARCHAR
) ### Response: ... |
Who did the team play on april 19? | CREATE TABLE table_name_2 (
opponent VARCHAR,
date VARCHAR
) | SELECT opponent FROM table_name_2 WHERE date = "april 19" | Below are sql tables 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 did the team play on april 19? ### Input: CREATE TABLE table_name_2 (
opponent VARCHAR,
date VARCHAR
) ### Respo... |
Name the young rider classification with laudelino cubino | CREATE TABLE table_17568 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text,
"Trofeo Fast Team" text
) | SELECT "Young rider classification" FROM table_17568 WHERE "Winner" = 'Laudelino Cubino' | Below are sql tables 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 young rider classification with laudelino cubino ### Input: CREATE TABLE table_17568 (
"Stage" text,
"Winne... |
find the number of patients admitted before 2151 who had ascitic fluid lab test. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2151" AND lab.fluid = "Ascites" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of patients admitted before 2151 who had ascitic fluid lab test. ### Input: CREATE TABLE diagnoses (
sub... |
how many hours have passed since the first time patient 004-79017 was given a #2: intake on the current icu 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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 ... | Below are sql tables 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 hours have passed since the first time patient 004-79017 was given a #2: intake on the current icu visit? ### Input... |
For all employees who have the letters D or S in their first name, find job_id and the average of manager_id , and group by attribute job_id, and visualize them by a bar chart. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, find job_id and the average of manager_id , and group by ... |
Bar chart of minimal salary from each dept name, and list in descending by the X-axis please. | CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE prereq (
... | SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY dept_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: Bar chart of minimal salary from each dept name, and list in descending by the X-axis please. ### Input: CREATE TABLE adviso... |
For those employees who was hired before 2002-06-21, draw a line chart about the change of commission_pct over hire_date , list X-axis in asc order. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 locations (
LOCATION_ID decimal(4,0... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21' 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 was hired before 2002-06-21, draw a line chart about the change of commission_pct over hire_date , l... |
For each cinema, show the price and group them by film title in a stacked bar chart, could you display by the Price in asc? | 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 Title, 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 Name, Title ORDER BY Price | Below are sql tables 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 cinema, show the price and group them by film title in a stacked bar chart, could you display by the Price in asc? ... |
how many inpatient hospital admission patients have clotrimazole medication prescription? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND prescriptions.drug = "Clotrimazole" | Below are sql tables 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 inpatient hospital admission patients have clotrimazole medication prescription? ### Input: CREATE TABLE prescripti... |
Visualize a pie chart with what is the name of every city that has at least 15 stations and how many stations does it have? | 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 station (
id INTEG... | SELECT city, COUNT(*) FROM station GROUP BY city | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a pie chart with what is the name of every city that has at least 15 stations and how many stations does it have? ... |
What is the highest crowd at windy hill? | CREATE TABLE table_name_51 (
crowd INTEGER,
venue VARCHAR
) | SELECT MAX(crowd) FROM table_name_51 WHERE venue = "windy hill" | Below are sql tables 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 crowd at windy hill? ### Input: CREATE TABLE table_name_51 (
crowd INTEGER,
venue VARCHAR
) ### ... |
What was the competition when the score was 3-0? | CREATE TABLE table_62179 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Competition" FROM table_62179 WHERE "Score" = '3-0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the competition when the score was 3-0? ### Input: CREATE TABLE table_62179 (
"Date" text,
"Venue" text,
... |
What is the height of the player from the Washington Capitals, who was born in Detroit, Michigan and has a jersey number under #11? | CREATE TABLE table_41432 (
"Position" text,
"Jersey #" real,
"Name" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthdate" text,
"Birthplace" text,
"1986\u20131987 Team" text
) | SELECT MIN("Height (cm)") FROM table_41432 WHERE "1986\u20131987 Team" = 'washington capitals' AND "Birthplace" = 'detroit, michigan' AND "Jersey #" < '11' | Below are sql tables 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 height of the player from the Washington Capitals, who was born in Detroit, Michigan and has a jersey number und... |
Return a bar chart on what are the apartment number and the room count of each apartment?, I want to rank from high to low by the bars please. | CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description... | SELECT apt_number, room_count FROM Apartments ORDER BY apt_number 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 bar chart on what are the apartment number and the room count of each apartment?, I want to rank from high to low b... |
Find the component amounts and names of all furnitures that have more than 10 components. | CREATE TABLE furniture (
Num_of_Component INTEGER,
name VARCHAR
) | SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the component amounts and names of all furnitures that have more than 10 components. ### Input: CREATE TABLE furniture ... |
for how many days was the patient with patient id 22999 hospitalized? | 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 demographic.days_stay FROM demographic WHERE demographic.subject_id = "22999" | Below are sql tables 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 how many days was the patient with patient id 22999 hospitalized? ### Input: CREATE TABLE procedures (
subject_id te... |
For those employees who did not have any job in the past, give me the comparison about the sum of employee_id over the job_id , and group by attribute job_id, could you list in desc by the x-axis please? | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATIO... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_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 did not have any job in the past, give me the comparison about the sum of employee_id over the job_i... |
count the number of patients whose age is less than 44 and diagnoses icd9 code is 27652? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "44" AND diagnoses.icd9_code = "27652" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose age is less than 44 and diagnoses icd9 code is 27652? ### Input: CREATE TABLE prescriptio... |
For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the average of employee_id bin hire_date by time. | 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(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the average of... |
what is the daily average value of patient 002-61035's bun? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT AVG(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-61035')) AND lab.labname = 'bun' GROUP BY STRFTIME('%y-%m-%d', lab.labresultti... | Below are sql tables 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 daily average value of patient 002-61035's bun? ### Input: CREATE TABLE lab (
labid number,
patientunits... |
how many days have passed since patient 8888 last stayed in this hospital encounter in the careunit tsicu? | 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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8888 AND admissions.dischtime IS NULL) AND transfers.careunit = 'tsicu' ORDER BY transfers.intime 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: how many days have passed since patient 8888 last stayed in this hospital encounter in the careunit tsicu? ### Input: CREATE... |
Please give me a bar chart showing institution types, along with the total enrollment for each type. | CREATE TABLE Institution (
Institution_id text,
Institution text,
Location text,
Founded real,
Type text,
Enrollment int,
Team text,
Primary_Conference text,
building_id text
)
CREATE TABLE building (
building_id text,
Name text,
Street_address text,
Years_as_tallest... | SELECT Type, SUM(Enrollment) FROM Institution GROUP BY Type | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Please give me a bar chart showing institution types, along with the total enrollment for each type. ### Input: CREATE TABLE... |
What are the top 3 artists with the largest number of songs in the language Bangla? | CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE artist (
artist_name text,
country text,
gender text,
preferred_genre text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating num... | SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY COUNT(*) DESC LIMIT 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 are the top 3 artists with the largest number of songs in the language Bangla? ### Input: CREATE TABLE genre (
g_na... |
calculate the maximum age of female patients who have hispanic or latino ethnic background. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "HISPANIC OR LATINO" | Below are sql tables 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 maximum age of female patients who have hispanic or latino ethnic background. ### Input: CREATE TABLE diagnose... |
What is Team when Qual 1 is 1:20.139? | CREATE TABLE table_49034 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
) | SELECT "Team" FROM table_49034 WHERE "Qual 1" = '1:20.139' | Below are sql tables 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 Team when Qual 1 is 1:20.139? ### Input: CREATE TABLE table_49034 (
"Name" text,
"Team" text,
"Qual 1" t... |
What team lost on May 1? | CREATE TABLE table_69874 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | SELECT "Loss" FROM table_69874 WHERE "Date" = 'may 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 team lost on May 1? ### Input: CREATE TABLE table_69874 (
"Date" text,
"Opponent" text,
"Score" text,
"... |
Draw a bar chart for what is the name of every city that has at least 15 stations and how many stations does it have?, and order by the x axis in desc. | CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pre... | SELECT city, COUNT(*) FROM station GROUP BY city ORDER BY city 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: Draw a bar chart for what is the name of every city that has at least 15 stations and how many stations does it have?, and o... |
What is the number of players who have points less than 30 for each position. Plot them as bar chart. | CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE club (
Club_ID int,
name tex... | SELECT Position, COUNT(*) FROM player WHERE Points < 30 GROUP BY Position | Below are sql tables 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 players who have points less than 30 for each position. Plot them as bar chart. ### Input: CREATE TABL... |
calculate the number of patients from hispanic or latino ethnic origin who were aged below 48 | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND demographic.age < "48" | Below are sql tables 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 number of patients from hispanic or latino ethnic origin who were aged below 48 ### Input: CREATE TABLE lab (
... |
Show sum team id from each all home | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Home, SUM(Team_ID) FROM basketball_match GROUP BY All_Home | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show sum team id from each all home ### Input: CREATE TABLE university (
School_ID int,
School text,
Location te... |
How many million U.S. viewers watched episode number 6 in the series? | CREATE TABLE table_25668962_1 (
us_viewers__million_ VARCHAR,
no_in_series VARCHAR
) | SELECT us_viewers__million_ FROM table_25668962_1 WHERE no_in_series = 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: How many million U.S. viewers watched episode number 6 in the series? ### Input: CREATE TABLE table_25668962_1 (
us_view... |
what's the permanence of the body where constancy is interestedness | CREATE TABLE table_72207 (
"Acquisition" text,
"knowledge" text,
"penance" text,
"permanence of the body" text,
"constancy" text,
"purity" text
) | SELECT "permanence of the body" FROM table_72207 WHERE "constancy" = 'interestedness' | Below are sql tables 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 permanence of the body where constancy is interestedness ### Input: CREATE TABLE table_72207 (
"Acquisition" ... |
Display the first name and department name for each employee. | CREATE TABLE jobs (
job_id text,
job_title text,
min_salary number,
max_salary number
)
CREATE TABLE countries (
country_id text,
country_name text,
region_id number
)
CREATE TABLE regions (
region_id number,
region_name text
)
CREATE TABLE locations (
location_id number,
... | SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Display the first name and department name for each employee. ### Input: CREATE TABLE jobs (
job_id text,
job_title ... |
What rank has a status of proposed, with 80 floors for Celestia Spaces 4? | CREATE TABLE table_64654 (
"Rank" real,
"Name" text,
"Status" text,
"City" text,
"Floors" real
) | SELECT AVG("Rank") FROM table_64654 WHERE "Status" = 'proposed' AND "Floors" = '80' AND "Name" = 'celestia spaces 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 rank has a status of proposed, with 80 floors for Celestia Spaces 4? ### Input: CREATE TABLE table_64654 (
"Rank" r... |
Where are the Alexandria enrollment locations? | CREATE TABLE table_2076608_3 (
enrollment VARCHAR,
location_s_ VARCHAR
) | SELECT enrollment FROM table_2076608_3 WHERE location_s_ = "Alexandria" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where are the Alexandria enrollment locations? ### Input: CREATE TABLE table_2076608_3 (
enrollment VARCHAR,
locatio... |
Name the most minutes for morgan jennings | CREATE TABLE table_23183195_5 (
minutes INTEGER,
player VARCHAR
) | SELECT MAX(minutes) FROM table_23183195_5 WHERE player = "Morgan Jennings" | Below are sql tables 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 most minutes for morgan jennings ### Input: CREATE TABLE table_23183195_5 (
minutes INTEGER,
player VARCHAR... |
Users by percent in 100's. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT COUNT(*) AS "Count", COUNT(*) * 100.0 / SUM(COUNT(*)) OVER () AS "Percentage", MIN(Reputation) AS "Rep" FROM Users GROUP BY 'reputation' / 100 ORDER BY MIN(Reputation) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Users by percent in 100's. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
... |
What is the highest Points with a Lost total of 8? | CREATE TABLE table_name_39 (
points INTEGER,
lost VARCHAR
) | SELECT MAX(points) FROM table_name_39 WHERE lost = 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 Points with a Lost total of 8? ### Input: CREATE TABLE table_name_39 (
points INTEGER,
lost VARC... |
count how many times patient 30976 has received a entral infus nutrit sub procedure in their first hospital encounter. | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE chartevents... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'entral infus nutrit sub') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30976 AND NOT admissions.di... | Below are sql tables 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 how many times patient 30976 has received a entral infus nutrit sub procedure in their first hospital encounter. ### I... |
count the number of patients whose age is less than 58 and procedure long title is hemodialysis? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "58" AND procedures.long_title = "Hemodialysis" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose age is less than 58 and procedure long title is hemodialysis? ### Input: CREATE TABLE dia... |
List the names of aircrafts and that won matches at least twice. | CREATE TABLE MATCH (
Winning_Aircraft VARCHAR
)
CREATE TABLE aircraft (
Aircraft VARCHAR,
Aircraft_ID VARCHAR
) | SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft 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: List the names of aircrafts and that won matches at least twice. ### Input: CREATE TABLE MATCH (
Winning_Aircraft VARCHA... |
What is the starting point of the north/south operating Palafox Street route? | CREATE TABLE table_name_66 (
starting_point VARCHAR,
operates VARCHAR,
name VARCHAR
) | SELECT starting_point FROM table_name_66 WHERE operates = "north/south" AND name = "palafox street" | Below are sql tables 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 starting point of the north/south operating Palafox Street route? ### Input: CREATE TABLE table_name_66 (
st... |
When did a Venue of Antigua Recreation Ground happen? | CREATE TABLE table_80200 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) | SELECT "Date" FROM table_80200 WHERE "Venue" = 'antigua recreation ground' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did a Venue of Antigua Recreation Ground happen? ### Input: CREATE TABLE table_80200 (
"Date" text,
"Home capta... |
Give me a histogram for what is the number of professors for different school?, could you order in asc by the x axis? | CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE PROFESSOR (
EMP_N... | SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE ORDER BY SCHOOL_CODE | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a histogram for what is the number of professors for different school?, could you order in asc by the x axis? ### In... |
What was the record for the October 16 game? | CREATE TABLE table_27537518_4 (
record VARCHAR,
date VARCHAR
) | SELECT record FROM table_27537518_4 WHERE date = "October 16" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the record for the October 16 game? ### Input: CREATE TABLE table_27537518_4 (
record VARCHAR,
date VARCHAR... |
How many Games have a Drawn smaller than 1, and a Lost larger than 4? | CREATE TABLE table_34107 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
) | SELECT COUNT("Games") FROM table_34107 WHERE "Drawn" < '1' AND "Lost" > '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 Games have a Drawn smaller than 1, and a Lost larger than 4? ### Input: CREATE TABLE table_34107 (
"Games" real... |
What is the highest grid that has 55 laps? | CREATE TABLE table_name_1 (
grid INTEGER,
laps VARCHAR
) | SELECT MAX(grid) FROM table_name_1 WHERE laps = 55 | Below are sql tables 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 grid that has 55 laps? ### Input: CREATE TABLE table_name_1 (
grid INTEGER,
laps VARCHAR
) ### R... |
what number of hours has passed since patient 018-20179 was admitted to the hospital? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '018-20179' AND patient.hospitaldischargetime IS NULL | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of hours has passed since patient 018-20179 was admitted to the hospital? ### Input: CREATE TABLE intakeoutput (... |
wednesday morning flights between BALTIMORE and NEWARK | CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE fare (
fare_id int,
from_airport 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 = 'NEWARK' 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: wednesday morning flights between BALTIMORE and NEWARK ### Input: CREATE TABLE airline (
airline_code varchar,
airli... |
What is the format for the label Mightier than Sword on January 12, 2010 in the United States? | CREATE TABLE table_name_50 (
format VARCHAR,
label VARCHAR,
region VARCHAR,
date VARCHAR
) | SELECT format FROM table_name_50 WHERE region = "united states" AND date = "january 12, 2010" AND label = "mightier than sword" | Below are sql tables 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 format for the label Mightier than Sword on January 12, 2010 in the United States? ### Input: CREATE TABLE table... |
how many hours have passed since patient 27172 last started to stay in careunit csru during their current hospital visit? | 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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172 AND admissions.dischtime IS NULL) AND transfers.careunit = 'csru' ORDER BY transfers.intime 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: how many hours have passed since patient 27172 last started to stay in careunit csru during their current hospital visit? ##... |
how many patients received a normal saline administration - fluid bolus (250-1000mls) within the same hospital visit after the diagnosis of copd - moderate, during this year? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'copd - moderate' AND DATETIME(diagnosis.diagnosistime, 'start of year') =... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients received a normal saline administration - fluid bolus (250-1000mls) within the same hospital visit after t... |
please list the RENTAL CAR information in PITTSBURGH | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purc... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: please list the RENTAL CAR information in PITTSBURGH ### Input: CREATE TABLE city (
city_code varchar,
city_name var... |
how much is the difference in weight of patient 14458 last measured on the first hospital visit compared to the first value measured on the first hospital visit? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | 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 = 14458 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartev... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much is the difference in weight of patient 14458 last measured on the first hospital visit compared to the first value ... |
When the attendance was 24,406 who lost? | CREATE TABLE table_name_8 (
loss VARCHAR,
attendance VARCHAR
) | SELECT loss FROM table_name_8 WHERE attendance = "24,406" | Below are sql tables 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 attendance was 24,406 who lost? ### Input: CREATE TABLE table_name_8 (
loss VARCHAR,
attendance VARCHAR
) #... |
What is the number of patients less than 79 years who had an other body fluid lab test done? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "79" AND lab.fluid = "Other Body Fluid" | Below are sql tables 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 less than 79 years who had an other body fluid lab test done? ### Input: CREATE TABLE prescri... |
has the human respiration of patient 030-53717 been normal since 07/2104? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53717')) AND vitalperiodic.respiration BETWEEN respiration_lower... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has the human respiration of patient 030-53717 been normal since 07/2104? ### Input: CREATE TABLE lab (
labid number,
... |
is arterial bp [systolic] of patient 9566 less than 158.0 today? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit ... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9566)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systo... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: is arterial bp [systolic] of patient 9566 less than 158.0 today? ### Input: CREATE TABLE labevents (
row_id number,
... |
how many patients whose diagnoses short title is physical restrain status and drug route is ng? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Physical restrain status" AND prescriptions.route = "NG" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose diagnoses short title is physical restrain status and drug route is ng? ### Input: CREATE TABLE diag... |
With a score smaller than 71 along with a place of t6, what is the To par score? | CREATE TABLE table_71934 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | SELECT "To par" FROM table_71934 WHERE "Score" < '71' AND "Place" = 't6' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: With a score smaller than 71 along with a place of t6, what is the To par score? ### Input: CREATE TABLE table_71934 (
"... |
What is the 1st round with a team 2 paris sg (d1)? | CREATE TABLE table_name_91 (
team_2 VARCHAR
) | SELECT 1 AS st_round FROM table_name_91 WHERE team_2 = "paris sg (d1)" | Below are sql tables 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 round with a team 2 paris sg (d1)? ### Input: CREATE TABLE table_name_91 (
team_2 VARCHAR
) ### Response... |
How many students taking a course who received an A or C? Group by students' last name with a pie chart. | CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
E... | SELECT STU_LNAME, COUNT(STU_LNAME) FROM STUDENT AS T1 JOIN ENROLL AS T2 ON T1.STU_NUM = T2.STU_NUM WHERE T2.ENROLL_GRADE = 'C' OR T2.ENROLL_GRADE = 'A' GROUP BY STU_LNAME | Below are sql tables 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 students taking a course who received an A or C? Group by students' last name with a pie chart. ### Input: CREATE T... |
How many points for maserati v12 engines in 1968? | CREATE TABLE table_name_89 (
points VARCHAR,
engine VARCHAR,
year VARCHAR
) | SELECT COUNT(points) FROM table_name_89 WHERE engine = "maserati v12" AND year = 1968 | Below are sql tables 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 points for maserati v12 engines in 1968? ### Input: CREATE TABLE table_name_89 (
points VARCHAR,
engine VAR... |
What is the lowest salary in departments with average salary greater than the overall average Plot them as bar chart, list by the total number from high to low. | CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id var... | SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY MIN(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: What is the lowest salary in departments with average salary greater than the overall average Plot them as bar chart, list b... |
calculate the number of patients to whom lidocaine 5% patch was administered when admitted to emergency. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Lidocaine 5% Patch" | Below are sql tables 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 number of patients to whom lidocaine 5% patch was administered when admitted to emergency. ### Input: CREATE T... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the sum of manufacturer , and group by attribute name. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.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, return a bar chart about the distribution of name and t... |
For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by weekday. | 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the sum o... |
how many days has it been since patient 013-33898 was admitted into icu? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '013-33898' 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: how many days has it been since patient 013-33898 was admitted into icu? ### Input: CREATE TABLE medication (
medication... |
Which classes offered this term will be a prerequisite for most other classes ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,... | SELECT COUNT(DISTINCT course_prerequisite.course_id), course.department, course.name, course.number FROM course, course_offering, course_prerequisite, semester WHERE course.course_id = course_offering.course_id AND course.course_id = course_prerequisite.pre_course_id AND course.department = 'EECS' AND semester.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: Which classes offered this term will be a prerequisite for most other classes ? ### Input: CREATE TABLE comment_instructor (... |
this month when did patient 025-44495 last get a microbiology test? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT 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 DATETIME(microlab.culturetakentime, 'start of mo... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: this month when did patient 025-44495 last get a microbiology test? ### Input: CREATE TABLE cost (
costid number,
un... |
Stack bar chart of how many home team vs Away_team based on home team | CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE sta... | SELECT Home_team, COUNT(Home_team) FROM game GROUP BY Away_team, Home_team | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Stack bar chart of how many home team vs Away_team based on home team ### Input: CREATE TABLE game (
stadium_id int,
... |
How many Bronze medals for the Nation with a Rank of 11 and less than 1 Silver? | CREATE TABLE table_name_9 (
bronze INTEGER,
rank VARCHAR,
silver VARCHAR
) | SELECT MIN(bronze) FROM table_name_9 WHERE rank = "11" AND silver < 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many Bronze medals for the Nation with a Rank of 11 and less than 1 Silver? ### Input: CREATE TABLE table_name_9 (
b... |
what are the most expensive FIRST class tickets between ATLANTA and DALLAS | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AN... | Below are sql tables 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 most expensive FIRST class tickets between ATLANTA and DALLAS ### Input: CREATE TABLE month (
month_number ... |
show me flights from PITTSBURGH to ATLANTA on monday morning | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
pro... | 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 (((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_nam... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me flights from PITTSBURGH to ATLANTA on monday morning ### Input: CREATE TABLE code_description (
code varchar,
... |
how many times did patient 030-53717 take a lab ast (sgot) test on their last hospital visit? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53717' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times did patient 030-53717 take a lab ast (sgot) test on their last hospital visit? ### Input: CREATE TABLE vitalp... |
What was the Runner-up with Ohio as the National Champion in Tucson, AZ? | CREATE TABLE table_name_53 (
runner_up VARCHAR,
national_champion VARCHAR,
location VARCHAR
) | SELECT runner_up FROM table_name_53 WHERE national_champion = "ohio" AND location = "tucson, az" | Below are sql tables 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 Runner-up with Ohio as the National Champion in Tucson, AZ? ### Input: CREATE TABLE table_name_53 (
runner_... |
What tournament was on May 31, 1987? | CREATE TABLE table_name_93 (
tournament VARCHAR,
date VARCHAR
) | SELECT tournament FROM table_name_93 WHERE date = "may 31, 1987" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What tournament was on May 31, 1987? ### Input: CREATE TABLE table_name_93 (
tournament VARCHAR,
date VARCHAR
) ### ... |
how many patients aged below 70 years had a drug route ivpca? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "70" AND prescriptions.route = "IVPCA" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients aged below 70 years had a drug route ivpca? ### Input: CREATE TABLE diagnoses (
subject_id text,
h... |
How many different payment methods are there? | CREATE TABLE products (
product_id number,
product_name text,
product_price number,
product_description text
)
CREATE TABLE order_deliveries (
location_code text,
actual_order_id number,
delivery_status_code text,
driver_employee_id number,
truck_id number,
delivery_date time
)
... | SELECT COUNT(DISTINCT payment_method) FROM customers | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many different payment methods are there? ### Input: CREATE TABLE products (
product_id number,
product_name tex... |
Can you draw the trend of how many date in location from over the date in location from?, order by the x-axis in descending. | CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Des... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations ORDER BY Date_in_Location_From 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: Can you draw the trend of how many date in location from over the date in location from?, order by the x-axis in descending.... |
What is Race 2, when Race 4 is 28? | CREATE TABLE table_49954 (
"Driver" text,
"Race 1" text,
"Race 2" text,
"Race 3" text,
"Race 4" text
) | SELECT "Race 2" FROM table_49954 WHERE "Race 4" = '28' | Below are sql tables 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 Race 2, when Race 4 is 28? ### Input: CREATE TABLE table_49954 (
"Driver" text,
"Race 1" text,
"Race 2" ... |
What was the record on May 20? | CREATE TABLE table_57545 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | SELECT "Record" FROM table_57545 WHERE "Date" = 'may 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: What was the record on May 20? ### Input: CREATE TABLE table_57545 (
"Date" text,
"Opponent" text,
"Score" text,... |
what is the number of patients whose admission location is emergency room admit and with primary disease t5 fracture? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "T5 FRACTURE" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose admission location is emergency room admit and with primary disease t5 fracture? ### In... |
What away has toronto downtown dingos as the home? | CREATE TABLE table_41483 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
) | SELECT "Away" FROM table_41483 WHERE "Home" = 'toronto downtown dingos' | Below are sql tables 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 away has toronto downtown dingos as the home? ### Input: CREATE TABLE table_41483 (
"Date" text,
"Time" text,
... |
how many days have elapsed since the last diagnosis of acute respiratory failure in patient 017-45919 in their current hospital visit? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-45919'... | Below are sql tables 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 days have elapsed since the last diagnosis of acute respiratory failure in patient 017-45919 in their current hospi... |
Who was the second rider when papayero raced as Horse 1 in the city of rancagua? | CREATE TABLE table_10580 (
"Year" real,
"City" text,
"Rider 1" text,
"Rider 2" text,
"Horse 1" text,
"Horse 2" text,
"Association" text
) | SELECT "Rider 2" FROM table_10580 WHERE "City" = 'rancagua' AND "Horse 1" = 'papayero' | Below are sql tables 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 second rider when papayero raced as Horse 1 in the city of rancagua? ### Input: CREATE TABLE table_10580 (
"... |
has criticare hn been given to patient 15209 since 04/2104? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE proced... | SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15209)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'criticar... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has criticare hn been given to patient 15209 since 04/2104? ### Input: CREATE TABLE diagnoses_icd (
row_id number,
s... |
TOP 50 users from Jaipur. | CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE... | SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Jaipur%' ORDER BY Reputation DESC LIMIT 1550 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: TOP 50 users from Jaipur. ### Input: CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostI... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and code , and group by attribute founder, and display by the total number from high to low please. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name 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, return a bar chart about the distribution of name and c... |
What is the sum of all the crowds that watched North Melbourne at home? | CREATE TABLE table_74725 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT SUM("Crowd") FROM table_74725 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 sum of all the crowds that watched North Melbourne at home? ### Input: CREATE TABLE table_74725 (
"Home team... |
For those records from the products and each product's manufacturer, give me the comparison about the sum of manufacturer over the founder , and group by attribute founder, and show from low to high by the Y-axis. | 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 Founder, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Manufacturer) | Below are sql tables 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 sum of manufacturer ov... |
when was the last time that patient 19473 had a heart rate that was less than 66.0? | 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 chartevents.charttime 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 = 19473)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ra... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the last time that patient 19473 had a heart rate that was less than 66.0? ### Input: CREATE TABLE admissions (
... |
when did patient 5142 come since 1 year ago for the first time to the hospital? | 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 admissions.admittime FROM admissions WHERE admissions.subject_id = 5142 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY admissions.admittime LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 5142 come since 1 year ago for the first time to the hospital? ### Input: CREATE TABLE procedures_icd (
... |
Name the opponent for week 12 | CREATE TABLE table_26604 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
) | SELECT "Opponent" FROM table_26604 WHERE "Week" = '12' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the opponent for week 12 ### Input: CREATE TABLE table_26604 (
"Week" real,
"Date" text,
"Opponent" text,
... |
What home team played against Richmond? | CREATE TABLE table_52073 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_52073 WHERE "Away team" = 'richmond' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What home team played against Richmond? ### Input: CREATE TABLE table_52073 (
"Home team" text,
"Home team score" te... |
How many weeks had a game on November 26, 1978, and an attendance higher than 26,248? | CREATE TABLE table_name_88 (
week VARCHAR,
date VARCHAR,
attendance VARCHAR
) | SELECT COUNT(week) FROM table_name_88 WHERE date = "november 26, 1978" AND attendance > 26 OFFSET 248 | Below are sql tables 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 had a game on November 26, 1978, and an attendance higher than 26,248? ### Input: CREATE TABLE table_name_88 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.