instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
What was the home team score for the game where Hawthorn is the home team? | CREATE TABLE table_32456 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_32456 WHERE "Home team" = 'hawthorn' | Below are sql tables 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 home team score for the game where Hawthorn is the home team? ### Input: CREATE TABLE table_32456 (
"Home t... |
provide the admission time of subject id 94762. | 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 demographic.admittime FROM demographic WHERE demographic.subject_id = "94762" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the admission time of subject id 94762. ### Input: CREATE TABLE demographic (
subject_id text,
hadm_id text,... |
Visualize the relationship between author_id and gender_mf . | CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARC... | SELECT author_id, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize the relationship between author_id and gender_mf . ### Input: CREATE TABLE Subjects (
subject_id INTEGER,
... |
My 50 Lowest Rated Answers On Questions With No Accepted Answer. | CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversa... | SELECT p.Id AS "post_link", COALESCE(p.LastEditDate, p.CreationDate) AS MostRecentChange, (SELECT COUNT(v.Id) FROM Votes AS v INNER JOIN VoteTypes AS vt ON v.VoteTypeId = vt.Id WHERE vt.Name = 'UpMod' AND v.PostId = p.Id) AS UpVotes, (SELECT COUNT(v.Id) FROM Votes AS v INNER JOIN VoteTypes AS vt ON v.VoteTypeId = vt.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: My 50 Lowest Rated Answers On Questions With No Accepted Answer. ### Input: CREATE TABLE PendingFlags (
Id number,
F... |
had patient 2536 had a enterostomy nec? | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
d... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'enterostomy nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2536) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 2536 had a enterostomy nec? ### Input: CREATE TABLE prescriptions (
row_id number,
subject_id number,
... |
A bar chart about what are the total number of credits offered by each department?, sort by the total number from high to low please. | 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 COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
... | SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE ORDER BY SUM(T1.CRS_CREDIT) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart about what are the total number of credits offered by each department?, sort by the total number from high to lo... |
What is the project id and detail for the project with at least two documents. Show a pie chart. | CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARC... | SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_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: What is the project id and detail for the project with at least two documents. Show a pie chart. ### Input: CREATE TABLE Acc... |
Find meter_200 and the average of ID , and group by attribute meter_200, and visualize them by a bar chart, and order by the bar in descending. | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
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
)
... | SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 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 meter_200 and the average of ID , and group by attribute meter_200, and visualize them by a bar chart, and order by the... |
in a year before, what was the four most common drugs prescribed to patients during the same month after the diagnosis of protein-calorie malnutrition? | 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 t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'protein-calorie malnutrition' AND DATETIME(diagnos... | Below are sql tables 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 a year before, what was the four most common drugs prescribed to patients during the same month after the diagnosis of pr... |
in 04/2104, when was the last time patient 69289 was prescribed lactulose and potassium chloride at the same time? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | SELECT t1.startdate FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'lactulose' AND admissions.subject_id = 69289 AND STRFTIME('%y-%m', prescriptions.startdate) = '2104-04') AS t1 JOIN (SELECT admissi... | Below are sql tables 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 04/2104, when was the last time patient 69289 was prescribed lactulose and potassium chloride at the same time? ### Input... |
get the number of patients on im route of drug administration who have been diagnosed with subarachnoid hemorrhage. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Subarachnoid hemorrhage" AND prescriptions.route = "IM" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get the number of patients on im route of drug administration who have been diagnosed with subarachnoid hemorrhage. ### Inpu... |
i need a FIRST class ticket on UA from DENVER to BALTIMORE scheduled for 12 17 | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREAT... | 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: i need a FIRST class ticket on UA from DENVER to BALTIMORE scheduled for 12 17 ### Input: CREATE TABLE state (
state_cod... |
What is the days held the champion with a reign larger than 3 and 1 defense has? | CREATE TABLE table_name_48 (
days_held VARCHAR,
reign VARCHAR,
defenses VARCHAR
) | SELECT days_held FROM table_name_48 WHERE reign > 3 AND defenses = 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the days held the champion with a reign larger than 3 and 1 defense has? ### Input: CREATE TABLE table_name_48 (
... |
what is the semifinalists when the surface is hard (i)? | CREATE TABLE table_9215 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
) | SELECT "Semifinalists" FROM table_9215 WHERE "Surface" = 'hard (i)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the semifinalists when the surface is hard (i)? ### Input: CREATE TABLE table_9215 (
"Tournament" text,
"Sur... |
What is the name for the best of 1:45.361? | CREATE TABLE table_44255 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
) | SELECT "Name" FROM table_44255 WHERE "Best" = '1:45.361' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name for the best of 1:45.361? ### Input: CREATE TABLE table_44255 (
"Name" text,
"Team" text,
"Qual... |
What is the total number of goals for when the drawn is less than 7, less than 21 games have been lost, and there are 1 of 33 points? | CREATE TABLE table_name_33 (
goals_for VARCHAR,
points_1 VARCHAR,
drawn VARCHAR,
lost VARCHAR
) | SELECT COUNT(goals_for) FROM table_name_33 WHERE drawn < 7 AND lost < 21 AND points_1 = "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 is the total number of goals for when the drawn is less than 7, less than 21 games have been lost, and there are 1 of 3... |
What is the highest Game, when Record is '21-30-11'? | CREATE TABLE table_name_92 (
game INTEGER,
record VARCHAR
) | SELECT MAX(game) FROM table_name_92 WHERE record = "21-30-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 highest Game, when Record is '21-30-11'? ### Input: CREATE TABLE table_name_92 (
game INTEGER,
record VA... |
Which year has a railway class of 250? | CREATE TABLE table_5679 (
"Gauge" text,
"Railway" text,
"Class" text,
"Works no." text,
"Year" text,
"Builder" text
) | SELECT "Year" FROM table_5679 WHERE "Class" = '250' | Below are sql tables 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 year has a railway class of 250? ### Input: CREATE TABLE table_5679 (
"Gauge" text,
"Railway" text,
"Class... |
Who was the away team when Melbourne was the home team? | CREATE TABLE table_name_35 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team FROM table_name_35 WHERE home_team = "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: Who was the away team when Melbourne was the home team? ### Input: CREATE TABLE table_name_35 (
away_team VARCHAR,
h... |
What opponent has euro '84 qualifying as the type and split as the city? | CREATE TABLE table_5122 (
"Date" text,
"City" text,
"Opponent" text,
"Results\u00b9" text,
"Type of game" text
) | SELECT "Opponent" FROM table_5122 WHERE "Type of game" = 'euro ''84 qualifying' AND "City" = 'split' | Below are sql tables 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 opponent has euro '84 qualifying as the type and split as the city? ### Input: CREATE TABLE table_5122 (
"Date" tex... |
For those records from the products and each product's manufacturer, find founder and the sum of price , and group by attribute founder, and visualize them by a bar chart, and order by the y-axis in descending. | 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 Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) 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 founder and the sum of price , and group by attrib... |
Draw a pie chart about the proportion of All_Road and All_Games_Percent. | 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_Road, All_Games_Percent FROM basketball_match | Below are sql tables 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 pie chart about the proportion of All_Road and All_Games_Percent. ### Input: CREATE TABLE university (
School_ID ... |
UA flights stopping in DENVER before 1200 | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE ... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight, flight_stop WHERE city.city_code = airport_service.city_code AND city.city_name = 'DENVER' AND flight_stop.arrival_time < 1200 AND flight_stop.stop_airport = airport_service.airport_code AND flight.airline_code = 'UA' AND flight.flight_id = flight_sto... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: UA flights stopping in DENVER before 1200 ### Input: CREATE TABLE month (
month_number int,
month_name text
)
CREAT... |
What is the lowest jersey # of the player with a height of 191 cm from the New Jersey Devils in 2008-2009? | CREATE TABLE table_40356 (
"Position" text,
"Jersey #" real,
"Name" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthdate" text,
"Birthplace" text,
"2008\u20132009 Team" text
) | SELECT MIN("Jersey #") FROM table_40356 WHERE "Height (cm)" = '191' AND "2008\u20132009 Team" = 'new jersey devils' | Below are sql tables 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 jersey # of the player with a height of 191 cm from the New Jersey Devils in 2008-2009? ### Input: CREATE... |
How many candidates ran in the election in the Arkansas 4 district? | CREATE TABLE table_1342359_4 (
candidates VARCHAR,
district VARCHAR
) | SELECT COUNT(candidates) FROM table_1342359_4 WHERE district = "Arkansas 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 candidates ran in the election in the Arkansas 4 district? ### Input: CREATE TABLE table_1342359_4 (
candidates... |
give me the number of patients whose admission location is phys referral/normal deli and age is less than 48? | 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 WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" 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: give me the number of patients whose admission location is phys referral/normal deli and age is less than 48? ### Input: CRE... |
Who was the away team when the VFL played at MCG? | CREATE TABLE table_74575 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_74575 WHERE "Venue" = 'mcg' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the away team when the VFL played at MCG? ### Input: CREATE TABLE table_74575 (
"Home team" text,
"Home team... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of first_name and employee_id in a bar chart, and sort by the y-axis in asc. | 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 FIRST_NAME, 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, show me about the distri... |
Find the number of records of each policy type and its type code. | CREATE TABLE staff (
staff_id number,
staff_details text
)
CREATE TABLE claims_processing_stages (
claim_stage_id number,
next_claim_stage_id number,
claim_status_name text,
claim_status_description text
)
CREATE TABLE claim_headers (
claim_header_id number,
claim_status_code text,
... | SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_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: Find the number of records of each policy type and its type code. ### Input: CREATE TABLE staff (
staff_id number,
s... |
Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time. | CREATE TABLE event (
id number,
name text,
stadium_id number,
year text
)
CREATE TABLE record (
id number,
result text,
swimmer_id number,
event_id number
)
CREATE TABLE stadium (
id number,
name text,
capacity number,
city text,
country text,
opening_year numbe... | SELECT t1.name, t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE result = 'Win' GROUP BY t2.swimmer_id HAVING COUNT(*) > 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the name and nationality of the swimmer who has won (i.e., has a result of 'win') more than 1 time. ### Input: CREATE T... |
in 03/this year when did patient 70516 get a lab test for the last time? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 70516) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', labevents.charttime) = '03' ORDER BY labevents... | Below are sql tables 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 03/this year when did patient 70516 get a lab test for the last time? ### Input: CREATE TABLE outputevents (
row_id n... |
what ground transportation is available in BALTIMORE for the day after tomorrow | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_fro... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_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: what ground transportation is available in BALTIMORE for the day after tomorrow ### Input: CREATE TABLE city (
city_code... |
Return a bar chart about the distribution of All_Road and Team_ID . | 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_Road, Team_ID FROM basketball_match | Below are sql tables 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 about the distribution of All_Road and Team_ID . ### Input: CREATE TABLE basketball_match (
Team_ID i... |
Show the transaction types and the total amount of transactions, I want to rank from high to low by the total number please. | CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DECIMAL(19,4),
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(255)
)
CREATE TABLE In... | SELECT transaction_type, SUM(transaction_amount) FROM Financial_Transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) 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 transaction types and the total amount of transactions, I want to rank from high to low by the total number please.... |
Name the lowest frequency for brand of radio manantial | CREATE TABLE table_name_54 (
frequency INTEGER,
brand VARCHAR
) | SELECT MIN(frequency) FROM table_name_54 WHERE brand = "radio manantial" | Below are sql tables 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 lowest frequency for brand of radio manantial ### Input: CREATE TABLE table_name_54 (
frequency INTEGER,
br... |
what are the nonstop flights from KANSAS CITY to BURBANK arriving on saturday 5 22 | CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((((((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time) AND date_day.day_number = 22 AND da... | Below are sql tables 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 nonstop flights from KANSAS CITY to BURBANK arriving on saturday 5 22 ### Input: CREATE TABLE aircraft (
ai... |
provide the number of patients whose admission type is urgent and admission location is trsf within this facility? | 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.admission_type = "URGENT" AND demographic.admission_location = "TRSF WITHIN THIS FACILITY" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose admission type is urgent and admission location is trsf within this facility? ### Input... |
What is the Score of the Scarborough Home game? | CREATE TABLE table_name_72 (
score VARCHAR,
home_team VARCHAR
) | SELECT score FROM table_name_72 WHERE home_team = "scarborough" | Below are sql tables 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 Score of the Scarborough Home game? ### Input: CREATE TABLE table_name_72 (
score VARCHAR,
home_team VAR... |
Which has a Score of 6 1, 3 0 ret.? | CREATE TABLE table_name_45 (
surface VARCHAR,
score VARCHAR
) | SELECT surface FROM table_name_45 WHERE score = "6–1, 3–0 ret." | Below are sql tables 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 has a Score of 6 1, 3 0 ret.? ### Input: CREATE TABLE table_name_45 (
surface VARCHAR,
score VARCHAR
) ### Res... |
Can CDB 503 and CDB 599 be taken in the same semester ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total... | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_offering AS COURSE_OFFERING_0, course_offering AS COURSE_OFFERING_1, course_prerequisite WHERE COURSE_OFFERING_1.semester = COURSE_OFFERING_0.semester AND COURSE_0.course_id = COURSE_OFFERING_0.course_id AND COURSE_0.department = 'CDB' AND COURSE_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: Can CDB 503 and CDB 599 be taken in the same semester ? ### Input: CREATE TABLE ta (
campus_job_id int,
student_id i... |
tell me the percentile for sodium of 140.0 among patients in the same age as patient 3125 on the current hospital encounter? | 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CR... | SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age = ... | Below are sql tables 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 percentile for sodium of 140.0 among patients in the same age as patient 3125 on the current hospital encounter?... |
What home team has 8 ties? | CREATE TABLE table_name_40 (
home_team VARCHAR,
tie_no VARCHAR
) | SELECT home_team FROM table_name_40 WHERE tie_no = "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 home team has 8 ties? ### Input: CREATE TABLE table_name_40 (
home_team VARCHAR,
tie_no VARCHAR
) ### Response:... |
The PreMajor classes are ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
countr... | SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The PreMajor classes are ? ### Input: CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
C... |
Top 100 Moroccan users in StackOverflow. | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId n... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%morocco%' OR LOWER(Location) LIKE '%MAROC%' ORDER BY Reputation DESC LIMIT 100 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 100 Moroccan users in StackOverflow. ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TA... |
what was the last value of the systemicdiastolic for patient 006-119203 until 03/17/2104? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | 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-119203')) 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 last value of the systemicdiastolic for patient 006-119203 until 03/17/2104? ### Input: CREATE TABLE allergy (
... |
Show the race class and number of races in each class in a pie chart. | 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 | Below are sql tables 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 in a pie chart. ### Input: CREATE TABLE track (
Track_ID int,
... |
flights from ATLANTA please | CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
m... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'ATLANTA' AND flight.from_airport = airport_service.airport_code | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights from ATLANTA please ### Input: CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
... |
What is the train number when the time is 10:38? | CREATE TABLE table_29202276_2 (
train_number INTEGER,
time VARCHAR
) | SELECT MAX(train_number) FROM table_29202276_2 WHERE time = "10:38" | Below are sql tables 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 train number when the time is 10:38? ### Input: CREATE TABLE table_29202276_2 (
train_number INTEGER,
ti... |
Find the number of web accelerators used for each Operating system. | CREATE TABLE web_client_accelerator (
Operating_system VARCHAR
) | SELECT Operating_system, COUNT(*) FROM web_client_accelerator GROUP BY Operating_system | Below are sql tables 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 web accelerators used for each Operating system. ### Input: CREATE TABLE web_client_accelerator (
Ope... |
What episode number had US viewership of 4.87 million? | CREATE TABLE table_30087 (
"\u2116" real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | SELECT "\u2116" FROM table_30087 WHERE "U.S. viewers (million)" = '4.87' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What episode number had US viewership of 4.87 million? ### Input: CREATE TABLE table_30087 (
"\u2116" real,
"#" real... |
i want to fly PHILADELPHIA to SAN FRANCISCO on 7 8 | 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,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 8 AND date_day.month_number = 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: i want to fly PHILADELPHIA to SAN FRANCISCO on 7 8 ### Input: CREATE TABLE flight_leg (
flight_id int,
leg_number in... |
What is the status of the game where there was more than 22 against? | CREATE TABLE table_64123 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | SELECT "Status" FROM table_64123 WHERE "Against" > '22' | Below are sql tables 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 status of the game where there was more than 22 against? ### Input: CREATE TABLE table_64123 (
"Opposing Tea... |
What was Mu's title? | CREATE TABLE table_45178 (
"State" text,
"Type" text,
"Name" text,
"Title" text,
"Royal house" text,
"From" text
) | SELECT "Title" FROM table_45178 WHERE "Name" = 'mu' | Below are sql tables 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 Mu's title? ### Input: CREATE TABLE table_45178 (
"State" text,
"Type" text,
"Name" text,
"Title" t... |
give me the number of patients whose admission type is elective and ethnicity is asian? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.ethnicity = "ASIAN" | Below are sql tables 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 elective and ethnicity is asian? ### Input: CREATE TABLE prescription... |
is the mcv of patient 94757 from the value last measured on the first hospital visit greater than first measured on the first hospital visit? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94757 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: is the mcv of patient 94757 from the value last measured on the first hospital visit greater than first measured on the firs... |
Show all book categories and the number of books in each category, list in asc by the bar. | CREATE TABLE culture_company (
Company_name text,
Type text,
Incorporated_in text,
Group_Equity_Shareholding real,
book_club_id text,
movie_id text
)
CREATE TABLE book_club (
book_club_id int,
Year int,
Author_or_Editor text,
Book_Title text,
Publisher text,
Category tex... | SELECT Category, COUNT(*) FROM book_club GROUP BY Category ORDER BY Category | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show all book categories and the number of books in each category, list in asc by the bar. ### Input: CREATE TABLE culture_c... |
Who was the opponent when the Maroons record was 11 4 1? | CREATE TABLE table_43391 (
"Number" real,
"Result" text,
"Date" text,
"Score" text,
"Opponent" text,
"Record" text
) | SELECT "Opponent" FROM table_43391 WHERE "Record" = '11–4–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: Who was the opponent when the Maroons record was 11 4 1? ### Input: CREATE TABLE table_43391 (
"Number" real,
"Resul... |
Find the max gpa of all students in each department with a bar chart, and I want to order in asc by the y axis please. | CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE PR... | SELECT DEPT_CODE, MAX(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MAX(STU_GPA) | Below are sql tables 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 max gpa of all students in each department with a bar chart, and I want to order in asc by the y axis please. ### I... |
Name the week number for the beatles | CREATE TABLE table_23044 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | SELECT "Week #" FROM table_23044 WHERE "Theme" = 'The Beatles' | Below are sql tables 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 week number for the beatles ### Input: CREATE TABLE table_23044 (
"Week #" text,
"Theme" text,
"Song ch... |
Show the most common headquarter for companies. | CREATE TABLE employment (
company_id number,
people_id number,
year_working number
)
CREATE TABLE company (
company_id number,
name text,
headquarters text,
industry text,
sales_in_billion number,
profits_in_billion number,
assets_in_billion number,
market_value_in_billion n... | SELECT headquarters FROM company GROUP BY headquarters ORDER BY COUNT(*) DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the most common headquarter for companies. ### Input: CREATE TABLE employment (
company_id number,
people_id nu... |
Name the record for december 8 | CREATE TABLE table_25811 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Record" FROM table_25811 WHERE "Date" = 'December 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: Name the record for december 8 ### Input: CREATE TABLE table_25811 (
"Game" real,
"Date" text,
"Team" text,
... |
What is Away Team, when Tie No is 4? | CREATE TABLE table_41004 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text,
"Attendance" text
) | SELECT "Away team" FROM table_41004 WHERE "Tie no" = '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 Away Team, when Tie No is 4? ### Input: CREATE TABLE table_41004 (
"Tie no" text,
"Home team" text,
"Sco... |
Which Country has a Score of 67? | CREATE TABLE table_name_84 (
country VARCHAR,
score VARCHAR
) | SELECT country FROM table_name_84 WHERE score = 67 | Below are sql tables 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 Country has a Score of 67? ### Input: CREATE TABLE table_name_84 (
country VARCHAR,
score VARCHAR
) ### Respon... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday, order from low to high by the Y please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(DEPARTMENT_ID) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about... |
Count different addresses of each school with a bar chart, I want to order Y from low to high order. | 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 CLASS (
CLASS_COD... | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_ADDRESS) FROM DEPARTMENT ORDER BY COUNT(DISTINCT DEPT_ADDRESS) | Below are sql tables 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 different addresses of each school with a bar chart, I want to order Y from low to high order. ### Input: CREATE TABLE... |
What party did Don Fuqua belong to? | CREATE TABLE table_18402 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Party" FROM table_18402 WHERE "Incumbent" = 'Don Fuqua' | Below are sql tables 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 party did Don Fuqua belong to? ### Input: CREATE TABLE table_18402 (
"District" text,
"Incumbent" text,
"Pa... |
Which Games have a Drawn smaller than 1, and a Lost smaller than 1? | CREATE TABLE table_38247 (
"Games" real,
"Drawn" real,
"Lost" real,
"Points difference" text,
"Points" real
) | SELECT "Games" FROM table_38247 WHERE "Drawn" < '1' AND "Lost" < '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 Games have a Drawn smaller than 1, and a Lost smaller than 1? ### Input: CREATE TABLE table_38247 (
"Games" real,
... |
how many patients have been admitted to hospital until 2103? | 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 COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE STRFTIME('%y', admissions.admittime) <= '2103' | Below are sql tables 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 have been admitted to hospital until 2103? ### Input: CREATE TABLE admissions (
row_id number,
sub... |
how many patients under the age of 47 stayed in the hospital for more than 30 days? | 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.age < "47" AND demographic.days_stay > "30" | Below are sql tables 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 under the age of 47 stayed in the hospital for more than 30 days? ### Input: CREATE TABLE demographic (
... |
give me the number of patients whose admission location is transfer from hosp/extram and drug name is clotrimazole? | 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_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: give me the number of patients whose admission location is transfer from hosp/extram and drug name is clotrimazole? ### Inpu... |
had patient 22449 had any intake of tpn d12.5? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
h... | 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 = 22449)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tpn d12.... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 22449 had any intake of tpn d12.5? ### Input: CREATE TABLE diagnoses_icd (
row_id number,
subject_id num... |
What is the total when the gold of 0, and a bronze larger than 1? | CREATE TABLE table_name_25 (
total INTEGER,
gold VARCHAR,
bronze VARCHAR
) | SELECT MAX(total) FROM table_name_25 WHERE gold = 0 AND bronze > 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total when the gold of 0, and a bronze larger than 1? ### Input: CREATE TABLE table_name_25 (
total INTEGER,... |
A bar chart about the average of maximum price of wines each year, bin the year into the weekday interval
, order by the total number in desc. | CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area... | SELECT Year, AVG(MAX(Price)) FROM wine ORDER BY AVG(MAX(Price)) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart about the average of maximum price of wines each year, bin the year into the weekday interval
, order by the t... |
which country was the venue in the most number of times ? | CREATE TABLE table_203_384 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | SELECT "venue" FROM table_203_384 GROUP BY "venue" ORDER BY COUNT(*) DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which country was the venue in the most number of times ? ### Input: CREATE TABLE table_203_384 (
id number,
"#" num... |
whats the unabbreviated version of gstr mcsl hyprt w hmrg. | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate ti... | SELECT d_icd_diagnoses.long_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'gstr mcsl hyprt w hmrg' UNION SELECT d_icd_procedures.long_title FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'gstr mcsl hyprt w hmrg' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: whats the unabbreviated version of gstr mcsl hyprt w hmrg. ### Input: CREATE TABLE d_icd_procedures (
row_id number,
... |
Which Team has a Position of linebacker? | CREATE TABLE table_66488 (
"Pick" real,
"Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Team" FROM table_66488 WHERE "Position" = 'linebacker' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Team has a Position of linebacker? ### Input: CREATE TABLE table_66488 (
"Pick" real,
"Team" text,
"Player... |
in 09/this year has patient 028-55868 received any medication? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-55868')) AND DATETIME(medication.drugstarttime, 'start of year') = DAT... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: in 09/this year has patient 028-55868 received any medication? ### Input: CREATE TABLE microlab (
microlabid number,
... |
What is 2003 when 1999 is 2.1? | CREATE TABLE table_27146868_1 (
Id VARCHAR
) | SELECT 2003 FROM table_27146868_1 WHERE 1999 = "2.1" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is 2003 when 1999 is 2.1? ### Input: CREATE TABLE table_27146868_1 (
Id VARCHAR
) ### Response: SELECT 2003 FROM ta... |
how many patients whose lab test name is ethanol? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Ethanol" | Below are sql tables 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 lab test name is ethanol? ### Input: CREATE TABLE prescriptions (
subject_id text,
hadm_id t... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and code , and group by attribute name, could you show Code in ascending order? | 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.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: For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name an... |
patients with a body mass index ( bmi ) of less than or equal to 26 . | CREATE TABLE table_train_238 (
"id" int,
"hemoglobin_a1c_hba1c" float,
"fasting_c_peptide" float,
"hba1c" float,
"allergy_to_mammalian_derived_drug_preparations" bool,
"body_mass_index_bmi" float,
"renal_transplantation" bool,
"NOUSE" float
) | SELECT * FROM table_train_238 WHERE body_mass_index_bmi <= 26 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patients with a body mass index ( bmi ) of less than or equal to 26 . ### Input: CREATE TABLE table_train_238 (
"id" int... |
what was the percentile of 7.49 in the ph lab test with the same age of patient 035-1391 in the last hospital encounter? | 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 DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = 'ph' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '035-1391' AND NOT patient.hos... | Below are sql tables 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 percentile of 7.49 in the ph lab test with the same age of patient 035-1391 in the last hospital encounter? ###... |
Which position had a pick of 50? | CREATE TABLE table_53485 (
"Draft" text,
"Round" real,
"Pick" real,
"Nationality" text,
"Position" text,
"School/Club Team" text
) | SELECT "Position" FROM table_53485 WHERE "Pick" = '50' | Below are sql tables 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 position had a pick of 50? ### Input: CREATE TABLE table_53485 (
"Draft" text,
"Round" real,
"Pick" real,
... |
Who is number 7 when Sophia is number 3 and Abigail is number 10? | CREATE TABLE table_name_70 (
no_7 VARCHAR,
no_3 VARCHAR,
no_10 VARCHAR
) | SELECT no_7 FROM table_name_70 WHERE no_3 = "sophia" AND no_10 = "abigail" | Below are sql tables 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 number 7 when Sophia is number 3 and Abigail is number 10? ### Input: CREATE TABLE table_name_70 (
no_7 VARCHAR,
... |
calculate the duration of stay of the first intensive care unit stay of patient 5520. | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE o... | SELECT STRFTIME('%j', icustays.outtime) - STRFTIME('%j', icustays.intime) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5520) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime 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: calculate the duration of stay of the first intensive care unit stay of patient 5520. ### Input: CREATE TABLE patients (
... |
Which 2009 year has a total of 1, and 2004 year of 7th? | CREATE TABLE table_68542 (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"Total" real
) | SELECT "2009" FROM table_68542 WHERE "Total" = '1' AND "2004" = '7th' | Below are sql tables 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 2009 year has a total of 1, and 2004 year of 7th? ### Input: CREATE TABLE table_68542 (
"2001" text,
"2004" te... |
Give me a bar chart to compare the number of departments located in different cities. | 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 CITY, COUNT(CITY) FROM locations 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: Give me a bar chart to compare the number of departments located in different cities. ### Input: CREATE TABLE employees (
... |
What's the try bonus that had 423 points? | CREATE TABLE table_name_38 (
try_bonus VARCHAR,
points_for VARCHAR
) | SELECT try_bonus FROM table_name_38 WHERE points_for = "423" | Below are sql tables 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 try bonus that had 423 points? ### Input: CREATE TABLE table_name_38 (
try_bonus VARCHAR,
points_for VARC... |
how many of the patients had icd9 code 9229? | 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 procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "9229" | Below are sql tables 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 had icd9 code 9229? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
... |
who is the opponent listed after wku ? | CREATE TABLE table_204_436 (
id number,
"date" text,
"time" text,
"opponent" text,
"site" text,
"tv" text,
"result" text,
"attendance" number,
"record" text
) | SELECT "opponent" FROM table_204_436 WHERE id = (SELECT id FROM table_204_436 WHERE "opponent" = 'wku') + 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: who is the opponent listed after wku ? ### Input: CREATE TABLE table_204_436 (
id number,
"date" text,
"time" te... |
How many rounds were 2r? | CREATE TABLE table_16645 (
"Edition" real,
"Zone" text,
"Round" text,
"Date" text,
"Against" text,
"Surface" text,
"Opponent" text,
"Outcome" text,
"Result" text
) | SELECT COUNT("Result") FROM table_16645 WHERE "Round" = '2R' | Below are sql tables 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 rounds were 2r? ### Input: CREATE TABLE table_16645 (
"Edition" real,
"Zone" text,
"Round" text,
"D... |
provide the number of patients whose diagnoses short title is crnry athrscl natve vssl? | 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 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: provide the number of patients whose diagnoses short title is crnry athrscl natve vssl? ### Input: CREATE TABLE diagnoses (
... |
among patients admitted to emergency, how many of them had coronar arteriogr-1 cath? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Coronar arteriogr-1 cath" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: among patients admitted to emergency, how many of them had coronar arteriogr-1 cath? ### Input: CREATE TABLE demographic (
... |
Draw a bar chart about the distribution of ACC_Regular_Season and Team_ID , I want to order by the Team_ID in ascending. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_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 ACC_Regular_Season and Team_ID , I want to order by the Team_ID in ascending. ###... |
Which label's year was 1990? | CREATE TABLE table_42514 (
"Year" text,
"Title" text,
"Genre" text,
"Label" text,
"Result" text
) | SELECT "Label" FROM table_42514 WHERE "Year" = '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: Which label's year was 1990? ### Input: CREATE TABLE table_42514 (
"Year" text,
"Title" text,
"Genre" text,
... |
Return a bar chart about the distribution of Nationality and the average of ID , and group by attribute Nationality, and I want to sort by the x axis in asc. | CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
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... | SELECT Nationality, AVG(ID) FROM swimmer GROUP BY Nationality ORDER BY Nationality | Below are sql tables 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 about the distribution of Nationality and the average of ID , and group by attribute Nationality, and I w... |
What is the in-state area with an outlet of South Platte River and Big Thompson river as the basin? | CREATE TABLE table_name_81 (
in_state_area VARCHAR,
outlet VARCHAR,
basin VARCHAR
) | SELECT in_state_area FROM table_name_81 WHERE outlet = "south platte river" AND basin = "big thompson river" | Below are sql tables 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 in-state area with an outlet of South Platte River and Big Thompson river as the basin? ### Input: CREATE TABLE ... |
what are the number of patients who received cont inv mec ven <96 hrs during the same hospital encounter after having received insert endotracheal tube since 2104? | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the number of patients who received cont inv mec ven <96 hrs during the same hospital encounter after having receiv... |
What's Italy's time when the notes were SA/B? | CREATE TABLE table_64421 (
"Rank" real,
"Rowers" text,
"Country" text,
"Time" text,
"Notes" text
) | SELECT "Time" FROM table_64421 WHERE "Notes" = 'sa/b' AND "Country" = 'italy' | Below are sql tables 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 Italy's time when the notes were SA/B? ### Input: CREATE TABLE table_64421 (
"Rank" real,
"Rowers" text,
... |
provide the number of patients whose diagnoses long title is other shock without mention of trauma? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other shock without mention of trauma" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses long title is other shock without mention of trauma? ### Input: CREATE TABLE ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.