instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
Which region had a catalogue number of 9362482872? | CREATE TABLE table_52355 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalogue" text
) | SELECT "Region" FROM table_52355 WHERE "Catalogue" = '9362482872' | Below are sql tables 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 region had a catalogue number of 9362482872? ### Input: CREATE TABLE table_52355 (
"Region" text,
"Date" text,... |
What is the 2012 value with 1r in 2011, 2007 of A, 2010 of 1r, and 2009 of A? | CREATE TABLE table_11461 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2012" FROM table_11461 WHERE "2011" = '1r' AND "2007" = 'a' AND "2010" = '1r' AND "2009" = 'a' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the 2012 value with 1r in 2011, 2007 of A, 2010 of 1r, and 2009 of A? ### Input: CREATE TABLE table_11461 (
"Tou... |
flights to BALTIMORE | CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE time_zone (
time_zone_code t... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'BALTIMORE' AND flight.to_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 to BALTIMORE ### Input: CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location... |
What is the home team when the Tie no is 1? | CREATE TABLE table_name_32 (
home_team VARCHAR,
tie_no VARCHAR
) | SELECT home_team FROM table_name_32 WHERE tie_no = "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 home team when the Tie no is 1? ### Input: CREATE TABLE table_name_32 (
home_team VARCHAR,
tie_no VARCHA... |
how many patients got tooth extraction nec two or more times until 2103? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 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_title = 'tooth extraction nec'... | Below are sql tables 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 got tooth extraction nec two or more times until 2103? ### Input: CREATE TABLE d_items (
row_id number... |
what is the number of patients whose admission year is less than 2145 and diagnoses icd9 code is 591? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2145" AND diagnoses.icd9_code = "591" | Below are sql tables 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 year is less than 2145 and diagnoses icd9 code is 591? ### Input: CREATE TABL... |
tell me the difference in patient 269's red blood cells levels second measured on the last hospital visit compared to the first value measured on the last hospital visit? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 269 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.lab... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the difference in patient 269's red blood cells levels second measured on the last hospital visit compared to the fi... |
provide the number of patients whose age is less than 61 and procedure icd9 code is 3727? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "61" AND procedures.icd9_code = "3727" | Below are sql tables 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 age is less than 61 and procedure icd9 code is 3727? ### Input: CREATE TABLE prescripti... |
Where was a 0-5 game played? | CREATE TABLE table_name_7 (
venue VARCHAR,
result VARCHAR
) | SELECT venue FROM table_name_7 WHERE result = "0-5" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where was a 0-5 game played? ### Input: CREATE TABLE table_name_7 (
venue VARCHAR,
result VARCHAR
) ### Response: SE... |
Bar chart x axis location y axis how many location, I want to display names from high to low order please. | CREATE TABLE performance (
Performance_ID real,
Date text,
Host text,
Location text,
Attendance int
)
CREATE TABLE member_attendance (
Member_ID int,
Performance_ID int,
Num_of_Pieces int
)
CREATE TABLE member (
Member_ID text,
Name text,
Nationality text,
Role text
) | SELECT Location, COUNT(Location) FROM performance GROUP BY Location ORDER BY Location 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 x axis location y axis how many location, I want to display names from high to low order please. ### Input: CREATE... |
count the number of patients whose discharge location is home health care and diagnoses long title is other abnormal blood chemistry? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND diagnoses.long_title = "Other abnormal blood chemistry" | Below are sql tables 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 discharge location is home health care and diagnoses long title is other abnormal blood c... |
Give me a pie to show the total number from different rank. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR... | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank | Below are sql tables 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 pie to show the total number from different rank. ### Input: CREATE TABLE Activity (
actid INTEGER,
activi... |
What is the to par of the player from the United States with a place of t1 and a 76-68=144 score? | CREATE TABLE table_50020 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "To par" FROM table_50020 WHERE "Country" = 'united states' AND "Place" = 't1' AND "Score" = '76-68=144' | Below are sql tables 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 to par of the player from the United States with a place of t1 and a 76-68=144 score? ### Input: CREATE TABLE ta... |
Name the winning driver with circuit of monza | CREATE TABLE table_56879 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
) | SELECT "Winning driver" FROM table_56879 WHERE "Circuit" = 'monza' | Below are sql tables 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 winning driver with circuit of monza ### Input: CREATE TABLE table_56879 (
"Race" text,
"Circuit" text,
... |
Tags that are used together. This might give some interesting insight in the types of posts on a site.. | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDat... | SELECT t1.TagName AS "tag_link", t2.TagName AS "tag_link", COUNT(pt1.PostId) AS "post_count" FROM PostTags AS pt1 JOIN PostTags AS pt2 ON pt1.PostId = pt2.PostId JOIN Tags AS t1 ON t1.Id = pt1.TagId JOIN Tags AS t2 ON t2.Id = pt2.TagId GROUP BY t1.TagName, t2.TagName ORDER BY COUNT(pt1.PostId) DESC LIMIT 1000 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tags that are used together. This might give some interesting insight in the types of posts on a site.. ### Input: CREATE TA... |
Tell me the partner for outcome of winner and score of 7-6 (7) 5-7 10-7 | CREATE TABLE table_4423 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
) | SELECT "Partner" FROM table_4423 WHERE "Outcome" = 'winner' AND "Score" = '7-6 (7) 5-7 10-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: Tell me the partner for outcome of winner and score of 7-6 (7) 5-7 10-7 ### Input: CREATE TABLE table_4423 (
"Outcome" t... |
Name the opponent on april 27 | CREATE TABLE table_name_60 (
opponent VARCHAR,
date VARCHAR
) | SELECT opponent FROM table_name_60 WHERE date = "april 27" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the opponent on april 27 ### Input: CREATE TABLE table_name_60 (
opponent VARCHAR,
date VARCHAR
) ### Response:... |
Show the number of companies whose headquarters are not from USA fpr each main industry in a bar chart, display bars in descending order. | CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
)
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank i... | SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY Main_Industry DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of companies whose headquarters are not from USA fpr each main industry in a bar chart, display bars in desc... |
what does fare code F mean | CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE month (
... | SELECT DISTINCT booking_class FROM class_of_service WHERE booking_class = 'F' | Below are sql tables 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 does fare code F mean ### Input: CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,... |
what is the number of patients whose age is less than 70 and diagnoses icd9 code is 36201? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "70" AND diagnoses.icd9_code = "36201" | Below are sql tables 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 age is less than 70 and diagnoses icd9 code is 36201? ### Input: CREATE TABLE demograph... |
For each city, return the highest latitude among its stations Show bar chart, I want to sort city in desc order please. | 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, MAX(lat) 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: For each city, return the highest latitude among its stations Show bar chart, I want to sort city in desc order please. ### ... |
how many male patients have long term care hospital as their discharge location? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many male patients have long term care hospital as their discharge location? ### Input: CREATE TABLE demographic (
s... |
What is the away team score when the away team is Essendon? | CREATE TABLE table_33178 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_33178 WHERE "Away team" = 'essendon' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the away team score when the away team is Essendon? ### Input: CREATE TABLE table_33178 (
"Home team" text,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a scatter chart about the correlation between employee_id and manager_id . | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | SELECT EMPLOYEE_ID, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, draw a scatter chart abo... |
how many tracks are in the album ? | CREATE TABLE table_204_184 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"featured guest(s)" text,
"length" text
) | SELECT COUNT("title") FROM table_204_184 | Below are sql tables 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 tracks are in the album ? ### Input: CREATE TABLE table_204_184 (
id number,
"#" number,
"title" text,
... |
when they came to the hospital last time, when did patient 83894 get a first lab test? | 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 chartevents (
row_id number,
subject_id number,
... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83894 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) ORDER BY labevents.charttime 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 they came to the hospital last time, when did patient 83894 get a first lab test? ### Input: CREATE TABLE diagnoses_icd... |
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by weekday. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average ... |
Name the landesliga mitte sv t rk g c m nchen | CREATE TABLE table_20181270_3 (
landesliga_mitte VARCHAR,
bayernliga VARCHAR
) | SELECT landesliga_mitte FROM table_20181270_3 WHERE bayernliga = "SV Türk Gücü München" | Below are sql tables 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 landesliga mitte sv t rk g c m nchen ### Input: CREATE TABLE table_20181270_3 (
landesliga_mitte VARCHAR,
b... |
i want information on flights from ATLANTA to WASHINGTON i want to leave after 1600 on wednesday or before 900 on thursday | CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE fligh... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((date_day.day_number = 24 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i want information on flights from ATLANTA to WASHINGTON i want to leave after 1600 on wednesday or before 900 on thursday #... |
count the number of patients admitted before 2200 who had endoscopic removal of stone(s) from biliary tract. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2200" AND procedures.long_title = "Endoscopic removal of stone(s) from biliary tract" | Below are sql tables 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 admitted before 2200 who had endoscopic removal of stone(s) from biliary tract. ### Input: CREA... |
For those records from the products and each product's manufacturer, give me the comparison about the sum of manufacturer over the name , and group by attribute name by a bar chart, and sort y-axis in ascending order 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 T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.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... |
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 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 T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and c... |
How many workshops did each author submit to? Return the author name and the number of workshops Plot them as bar chart, display in descending by the Y. | CREATE TABLE workshop (
Workshop_ID int,
Date text,
Venue text,
Name text
)
CREATE TABLE Acceptance (
Submission_ID int,
Workshop_ID int,
Result text
)
CREATE TABLE submission (
Submission_ID int,
Scores real,
Author text,
College text
) | SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY COUNT(DISTINCT T1.Workshop_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: How many workshops did each author submit to? Return the author name and the number of workshops Plot them as bar chart, dis... |
What is the highest number of laps for grid 17? | CREATE TABLE table_name_99 (
laps INTEGER,
grid VARCHAR
) | SELECT MAX(laps) FROM table_name_99 WHERE grid = 17 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number of laps for grid 17? ### Input: CREATE TABLE table_name_99 (
laps INTEGER,
grid VARCHAR
)... |
Who left a seat open for the district of connecticut at-large | CREATE TABLE table_25038 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
) | SELECT "Vacator" FROM table_25038 WHERE "District" = 'Connecticut At-large' | Below are sql tables 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 left a seat open for the district of connecticut at-large ### Input: CREATE TABLE table_25038 (
"District" text,
... |
the last intake patient 28443 had on this month/19 what was the name of that? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 28443)) AND DATETIME(inputevents_cv.... | Below are sql tables 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 last intake patient 28443 had on this month/19 what was the name of that? ### Input: CREATE TABLE microbiologyevents (
... |
Visualize a bar chart about the distribution of ACC_Road and the sum of School_ID , and group by attribute ACC_Road. | 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 ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart about the distribution of ACC_Road and the sum of School_ID , and group by attribute ACC_Road. ### Inp... |
What is the result for Gold Coast when Melbourne and Adelaide are yes, but Perth is no? | CREATE TABLE table_71060 (
"Sydney" text,
"Melbourne" text,
"Perth" text,
"Adelaide" text,
"Gold Coast" text,
"Auckland" text
) | SELECT "Gold Coast" FROM table_71060 WHERE "Melbourne" = 'yes' AND "Perth" = 'no' AND "Adelaide" = 'yes' | Below are sql tables 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 result for Gold Coast when Melbourne and Adelaide are yes, but Perth is no? ### Input: CREATE TABLE table_71060 ... |
tell me the type of admission patient with patient id 53707 had. | 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 demographic.admission_type FROM demographic WHERE demographic.subject_id = "53707" | Below are sql tables 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 type of admission patient with patient id 53707 had. ### Input: CREATE TABLE diagnoses (
subject_id text,
... |
show flights from PITTSBURGH to OAKLAND on US airlines with fare information | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name var... | 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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CIT... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show flights from PITTSBURGH to OAKLAND on US airlines with fare information ### Input: CREATE TABLE ground_service (
ci... |
count the number of patients whose diagnosis short title is ath ext ntv at w claudct. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Ath ext ntv at w claudct" | Below are sql tables 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 diagnosis short title is ath ext ntv at w claudct. ### Input: CREATE TABLE demographic (
... |
For all employees who have the letters D or S in their first name, give me the comparison about the average of employee_id over the job_id , and group by attribute job_id by a bar chart, could you show x-axis from high to low order? | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' 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 all employees who have the letters D or S in their first name, give me the comparison about the average of employee_id o... |
Find all invoice dates corresponding to customers with first name Astrid and last name Gruber. | CREATE TABLE genre (
genreid number,
name text
)
CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE album (
albumid number,
title text,
artistid number
)
CREATE TABLE invoiceline (
invoicelineid number,
invoiceid number,
trackid number,
unitprice... | SELECT T2.invoicedate FROM customer AS T1 JOIN invoice AS T2 ON T1.customerid = T2.customerid WHERE T1.firstname = "Astrid" AND lastname = "Gruber" | Below are sql tables 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 all invoice dates corresponding to customers with first name Astrid and last name Gruber. ### Input: CREATE TABLE genre... |
what was the last time that the arterial bp mean of patient 26817 was, on the last icu visit, greater than 58.0? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
sp... | 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 = 26817) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid... | Below are sql tables 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 time that the arterial bp mean of patient 26817 was, on the last icu visit, greater than 58.0? ### Input: ... |
What is the series number for the episode number 10 of the season? | CREATE TABLE table_27833469_1 (
series__number VARCHAR,
season__number VARCHAR
) | SELECT series__number FROM table_27833469_1 WHERE season__number = "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: What is the series number for the episode number 10 of the season? ### Input: CREATE TABLE table_27833469_1 (
series__nu... |
what is the number of sites when the number of screens is 687 and rank is more than 7? | CREATE TABLE table_name_8 (
sites INTEGER,
screens VARCHAR,
rank VARCHAR
) | SELECT AVG(sites) FROM table_name_8 WHERE screens = 687 AND rank > 7 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of sites when the number of screens is 687 and rank is more than 7? ### Input: CREATE TABLE table_name_8 ... |
Find the number of booking start date for the apartments that have more than two bedrooms for each weekday in a bar chart. | CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Bookin... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_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: Find the number of booking start date for the apartments that have more than two bedrooms for each weekday in a bar chart. #... |
How many were in the crowd when North Melbourne was the home team? | CREATE TABLE table_11607 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Crowd" FROM table_11607 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: How many were in the crowd when North Melbourne was the home team? ### Input: CREATE TABLE table_11607 (
"Home team" tex... |
What is the chassis for Augusto Scalbi on Team RP Motorsport? | CREATE TABLE table_name_34 (
chassis VARCHAR,
team VARCHAR,
driver VARCHAR
) | SELECT chassis FROM table_name_34 WHERE team = "rp motorsport" AND driver = "augusto scalbi" | Below are sql tables 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 chassis for Augusto Scalbi on Team RP Motorsport? ### Input: CREATE TABLE table_name_34 (
chassis VARCHAR,
... |
Pandas Trends (# Questions per Tag per Month). | CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConce... | SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Pandas Trends (# Questions per Tag per Month). ### Input: CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,... |
count the number of patients whose ethnicity is black/cape verdean and age is less than 68. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "68" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose ethnicity is black/cape verdean and age is less than 68. ### Input: CREATE TABLE prescrip... |
What was the guage of the concessionaire ferrosur roca? | CREATE TABLE table_name_8 (
gauge VARCHAR,
concessionaire VARCHAR
) | SELECT gauge FROM table_name_8 WHERE concessionaire = "ferrosur roca" | Below are sql tables 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 guage of the concessionaire ferrosur roca? ### Input: CREATE TABLE table_name_8 (
gauge VARCHAR,
conces... |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of headquarter and the average of revenue , and group by attribute headquarter, sort by the total number in asc 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 Headquarter, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Revenue) | Below are sql tables 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, a bar chart shows the distribution of headquarter and t... |
In what year is Zaxxon the Standalone? | CREATE TABLE table_66309 (
"Year" text,
"Arcade" text,
"Standalone" text,
"Console" text,
"Computer" text
) | SELECT "Year" FROM table_66309 WHERE "Standalone" = 'zaxxon' | Below are sql tables 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 what year is Zaxxon the Standalone? ### Input: CREATE TABLE table_66309 (
"Year" text,
"Arcade" text,
"Standa... |
What is the name when there are more than 161,219 electorates in 2009 and a constituency of 165? | CREATE TABLE table_66210 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
) | SELECT "Name" FROM table_66210 WHERE "Number of electorates (2009)" > '161,219' AND "Constituency number" = '165' | Below are sql tables 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 when there are more than 161,219 electorates in 2009 and a constituency of 165? ### Input: CREATE TABLE tab... |
Show me a bar chart for what are the department names and how many employees work in each of them?, could you list from low to high by the Y-axis? | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT DEPARTMENT_NAME, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY DEPARTMENT_NAME ORDER BY COUNT(*) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show me a bar chart for what are the department names and how many employees work in each of them?, could you list from low ... |
For the Indian Wells Masters tournament, what was the country? | CREATE TABLE table_name_96 (
country VARCHAR,
tournament VARCHAR
) | SELECT country FROM table_name_96 WHERE tournament = "indian wells masters" | Below are sql tables 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 the Indian Wells Masters tournament, what was the country? ### Input: CREATE TABLE table_name_96 (
country VARCHAR,
... |
what is gender and death status of subject id 32418? | 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 demographic.gender, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "32418" | Below are sql tables 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 gender and death status of subject id 32418? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id te... |
Give me a bar chart about the average of number_of_platforms in different locations, and rank X from low to high order. | CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
... | SELECT Location, AVG(Number_of_Platforms) FROM station GROUP BY Location ORDER BY Location | Below are sql tables 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 about the average of number_of_platforms in different locations, and rank X from low to high order. ### ... |
show me the cheapest one way flights from PITTSBURGH to DALLAS leaving PITTSBURGH between 1200 and 1400 | CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt 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,
... | 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, fare, flight, flight_fare WHERE (((flight.departure_time <= 1400 AND flight.departure_time >= 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the cheapest one way flights from PITTSBURGH to DALLAS leaving PITTSBURGH between 1200 and 1400 ### Input: CREATE TA... |
Which MSDN integration has a IntelliTrace of yes? | CREATE TABLE table_38392 (
"Product" text,
"Extensions" text,
"Projects templates" text,
"MSDN integration" text,
"Debugging" text,
"Profiling" text,
"IntelliTrace" text,
"Unit test" text,
"Code coverage" text,
"Test impact analysis" text,
"Load testing" text,
"Lab manage... | SELECT "MSDN integration" FROM table_38392 WHERE "IntelliTrace" = 'yes' | Below are sql tables 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 MSDN integration has a IntelliTrace of yes? ### Input: CREATE TABLE table_38392 (
"Product" text,
"Extensions"... |
how many patients who have stayed in the hospital for more than 43 days have 4432 as their procedure icd9 code? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "43" AND procedures.icd9_code = "4432" | Below are sql tables 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 who have stayed in the hospital for more than 43 days have 4432 as their procedure icd9 code? ### Input: C... |
when was patient 005-11182 prescribed with a drug via intraven route for the first time in 09/last year? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-11182')) AND medication.routeadmin = 'intraven' AND DATETI... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was patient 005-11182 prescribed with a drug via intraven route for the first time in 09/last year? ### Input: CREATE T... |
ASP.NET MVC, Django en Laravel. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
U... | SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: ASP.NET MVC, Django en Laravel. ### Input: CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
Revi... |
tell me the last lab test that was given to patient 002-7771 until 09/2102? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wa... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-7771')) AND STRFTIME('%y-%m', lab.labresulttime) <= '2102-09' ORDER BY lab.labresultt... | Below are sql tables 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 last lab test that was given to patient 002-7771 until 09/2102? ### Input: CREATE TABLE treatment (
treatmen... |
what is the number of patients whose age is less than 47 and days of hospital stay is greater than 30? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.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: what is the number of patients whose age is less than 47 and days of hospital stay is greater than 30? ### Input: CREATE TAB... |
What is the largest amount of spectators when the home team scored 13.11 (89)? | CREATE TABLE table_55974 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MAX("Crowd") FROM table_55974 WHERE "Home team score" = '13.11 (89)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the largest amount of spectators when the home team scored 13.11 (89)? ### Input: CREATE TABLE table_55974 (
"Ho... |
What was the home team score for the game where Hawthorn is the home team? | CREATE TABLE table_name_83 (
home_team VARCHAR
) | SELECT home_team AS score FROM table_name_83 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_name_83 (
home_... |
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum of department_id , and group by attribute job_id, and I want to list in desc by the Y. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum... |
What was the location attendance on January 19? | CREATE TABLE table_name_47 (
location_attendance VARCHAR,
date VARCHAR
) | SELECT location_attendance FROM table_name_47 WHERE date = "january 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: What was the location attendance on January 19? ### Input: CREATE TABLE table_name_47 (
location_attendance VARCHAR,
... |
What series number is the episode with production code bdf101? | CREATE TABLE table_28019988_2 (
series__number INTEGER,
production_code VARCHAR
) | SELECT MAX(series__number) FROM table_28019988_2 WHERE production_code = "BDF101" | Below are sql tables 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 series number is the episode with production code bdf101? ### Input: CREATE TABLE table_28019988_2 (
series__number... |
what is the number of patients whose drug code is bari2/450l? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "BARI2/450L" | Below are sql tables 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 drug code is bari2/450l? ### Input: CREATE TABLE lab (
subject_id text,
hadm_id... |
FIRST class round trip airfare from INDIANAPOLIS to MEMPHIS | CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops 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 = 'INDIANAPOLIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_co... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: FIRST class round trip airfare from INDIANAPOLIS to MEMPHIS ### Input: CREATE TABLE flight (
aircraft_code_sequence text... |
i would like to see the economy fares for DENVER to PHILADELPHIA | CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i would like to see the economy fares for DENVER to PHILADELPHIA ### Input: CREATE TABLE fare_basis (
fare_basis_code te... |
How many bronzes had a rank of 10 and 0 gold? | CREATE TABLE table_13254 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Bronze") FROM table_13254 WHERE "Rank" = '10' AND "Gold" < '0' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many bronzes had a rank of 10 and 0 gold? ### Input: CREATE TABLE table_13254 (
"Rank" text,
"Nation" text,
... |
What was the home team's score at junction oval? | CREATE TABLE table_56009 (
"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_56009 WHERE "Venue" = 'junction oval' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the home team's score at junction oval? ### Input: CREATE TABLE table_56009 (
"Home team" text,
"Home team ... |
What are the names of different tracks, and how many races has each had Plot them as bar chart, and could you sort in asc by the x axis? | 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 T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER 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: What are the names of different tracks, and how many races has each had Plot them as bar chart, and could you sort in asc by... |
list the number of patients who stayed in the hospital for more than 2 days. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.days_stay > "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 number of patients who stayed in the hospital for more than 2 days. ### Input: CREATE TABLE lab (
subject_id te... |
Draw a bar chart about the distribution of All_Home and the amount of All_Home , and group by attribute 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, COUNT(All_Home) 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: Draw a bar chart about the distribution of All_Home and the amount of All_Home , and group by attribute All_Home. ### Input:... |
Return a bar chart about the distribution of All_Games and School_ID , and show in ascending by the bar. | 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_Games, School_ID FROM basketball_match ORDER BY All_Games | Below are sql tables 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_Games and School_ID , and show in ascending by the bar. ### Input: CREATE T... |
how many patients are admitted under emergency and treated via the drug route ivpca? | 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.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 are admitted under emergency and treated via the drug route ivpca? ### Input: CREATE TABLE prescriptions (... |
For the upper-level classes , who is teaching them ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
s... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_... | Below are sql tables 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 the upper-level classes , who is teaching them ? ### Input: CREATE TABLE requirement (
requirement_id int,
requi... |
What is the date of week 8? | CREATE TABLE table_57553 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Date" FROM table_57553 WHERE "Week" = '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 date of week 8? ### Input: CREATE TABLE table_57553 (
"Week" real,
"Date" text,
"Opponent" text,
... |
What school did the player that has been in Toronto from 2012-present come from? | CREATE TABLE table_10015132_1 (
school_club_team VARCHAR,
years_in_toronto VARCHAR
) | SELECT school_club_team FROM table_10015132_1 WHERE years_in_toronto = "2012-present" | Below are sql tables 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 school did the player that has been in Toronto from 2012-present come from? ### Input: CREATE TABLE table_10015132_1 (
... |
How many games or records were played on the Miami Orange Bowl? | CREATE TABLE table_21666 (
"Week" real,
"Date" text,
"Opponent" text,
"Stadium" text,
"Result" text,
"Record" text,
"Streak" text,
"Attendance" real
) | SELECT COUNT("Record") FROM table_21666 WHERE "Stadium" = 'Miami Orange Bowl' | Below are sql tables 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 or records were played on the Miami Orange Bowl? ### Input: CREATE TABLE table_21666 (
"Week" real,
"... |
What dates were the games after game 6 played? | CREATE TABLE table_name_56 (
date VARCHAR,
game INTEGER
) | SELECT date FROM table_name_56 WHERE game > 6 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What dates were the games after game 6 played? ### Input: CREATE TABLE table_name_56 (
date VARCHAR,
game INTEGER
) ... |
How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get? | CREATE TABLE table_47046 (
"Squad No." real,
"Name" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"FLT Apps" text,
"FLT Goals" real,
"Playoff Apps" text,
"Playo... | SELECT SUM("Total Goals") FROM table_47046 WHERE "Playoff Apps" = '2' AND "FA Cup Apps" = '2' AND "League Cup Goals" < '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: How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get? ### Input: CREATE TABLE t... |
what is the number of countries in each team ? | CREATE TABLE table_203_526 (
id number,
"team 1" text,
"agg." text,
"team 2" text,
"1st leg" text,
"2nd leg" text
) | SELECT COUNT("team 1") FROM table_203_526 | Below are sql tables 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 countries in each team ? ### Input: CREATE TABLE table_203_526 (
id number,
"team 1" text,
... |
count the number of patients whose ethnicity is asian and procedure long title is small-to-small intestinal anastomosis? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "ASIAN" AND procedures.long_title = "Small-to-small intestinal anastomosis" | Below are sql tables 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 ethnicity is asian and procedure long title is small-to-small intestinal anastomosis? ###... |
provide the health insurance and patients name for patient id 2560. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT demographic.name, demographic.insurance FROM demographic WHERE demographic.subject_id = "2560" | Below are sql tables 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 health insurance and patients name for patient id 2560. ### Input: CREATE TABLE procedures (
subject_id text... |
Who is Winners that has editions of 1992, 2003 as Not Winning | CREATE TABLE table_15300 (
"Club" text,
"Winners" text,
"Finalists" text,
"Winning editions" text,
"Not winning editions" text
) | SELECT "Winners" FROM table_15300 WHERE "Not winning editions" = '1992, 2003' | Below are sql tables 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 Winners that has editions of 1992, 2003 as Not Winning ### Input: CREATE TABLE table_15300 (
"Club" text,
"Wi... |
count the number of patients whose primary disease is hypertension;rule out coronary artery disease\cardiac cath and year of death is less than or equal to 2180? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" AND demographic.dod_year <= "2180.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: count the number of patients whose primary disease is hypertension;rule out coronary artery disease\cardiac cath and year of... |
Who had the high assists when the opponent was Indiana? | CREATE TABLE table_27882867_9 (
high_assists VARCHAR,
team VARCHAR
) | SELECT high_assists FROM table_27882867_9 WHERE team = "Indiana" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who had the high assists when the opponent was Indiana? ### Input: CREATE TABLE table_27882867_9 (
high_assists VARCHAR,... |
i would like to find the cheapest one way fare from BOSTON to OAKLAND | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE food_service (
mea... | 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, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | Below are sql tables 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 would like to find the cheapest one way fare from BOSTON to OAKLAND ### Input: CREATE TABLE code_description (
code va... |
what is the total number of input patient 027-22704 has received until 1091 days ago? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-22704')) AND intakeoutput.cellpath LIKE '%in... | Below are sql tables 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 input patient 027-22704 has received until 1091 days ago? ### Input: CREATE TABLE treatment (
... |
how many patients are admitted urgently and tested for lab item id 50805? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.itemid = "50805" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients are admitted urgently and tested for lab item id 50805? ### Input: CREATE TABLE demographic (
subject_... |
how many female patients had lab test item id 50836? | 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 demographic.gender = "F" AND lab.itemid = "50836" | Below are sql tables 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 female patients had lab test item id 50836? ### Input: CREATE TABLE prescriptions (
subject_id text,
hadm_i... |
What is the Result of Week larger than 3 on 1971-11-07? | CREATE TABLE table_name_94 (
result VARCHAR,
week VARCHAR,
date VARCHAR
) | SELECT result FROM table_name_94 WHERE week > 3 AND date = "1971-11-07" | Below are sql tables 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 Result of Week larger than 3 on 1971-11-07? ### Input: CREATE TABLE table_name_94 (
result VARCHAR,
week... |
Name the sum of swimsuit when the evening gown is less than 6.983 and the average is less than 7.362 | CREATE TABLE table_name_67 (
swimsuit INTEGER,
average VARCHAR,
evening_gown VARCHAR
) | SELECT SUM(swimsuit) FROM table_name_67 WHERE average < 7.362 AND evening_gown < 6.983 | Below are sql tables 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 sum of swimsuit when the evening gown is less than 6.983 and the average is less than 7.362 ### Input: CREATE TABLE... |
Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date, and count them by a bar chart | CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,... | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) | Below are sql tables 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 all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date, a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.