instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
For those employees who was hired before 2002-06-21, give me the comparison about the average of manager_id over the hire_date bin hire_date by weekday, and I want to show from low to high by the Y-axis please. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(MANAGER_ID) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, give me the comparison about the average of manager_id over the hire_da... |
did patient 45612 have propofol prescribed until 2101? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 45612) AND prescriptions.drug = 'propofol' AND STRFTIME('%y', prescriptions.startdate) <= '2101' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: did patient 45612 have propofol prescribed until 2101? ### Input: CREATE TABLE cost (
row_id number,
subject_id numb... |
count the number of patients whose admission location is trsf within this facility and item id is 51419? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND lab.itemid = "51419" | Below are sql tables 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 admission location is trsf within this facility and item id is 51419? ### Input: CREATE T... |
what drug is actually the drug that patient 022-47102 is allergic to during their last hospital encounter? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-47102' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.ho... | Below are sql tables 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 drug is actually the drug that patient 022-47102 is allergic to during their last hospital encounter? ### Input: CREATE... |
List of Not-Closed Community Wiki Posts. List of Not-Closed Community Wiki Posts
Get all Question and Answer that are Community Wiki but not closed.
Don't list all answers of a Community Wiki Question because they are all Community Wiki anyway. | CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description... | SELECT PostTypes.Name, Posts.Id AS "post_link", Posts.Score AS Score, Posts.CreationDate FROM Posts INNER JOIN PostTypes ON Posts.PostTypeId = PostTypes.Id LEFT JOIN Posts AS ParentPosts ON Posts.ParentId = ParentPosts.Id WHERE Posts.PostTypeId IN (1, 2) AND NOT (Posts.CommunityOwnedDate IS NULL) AND (ParentPosts.Commu... | Below are sql tables 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 of Not-Closed Community Wiki Posts. List of Not-Closed Community Wiki Posts
Get all Question and Answer that are Commu... |
count the number of patients whose insurance is government and diagnoses icd9 code is 99702? | 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.insurance = "Government" AND diagnoses.icd9_code = "99702" | Below are sql tables 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 insurance is government and diagnoses icd9 code is 99702? ### Input: CREATE TABLE demogra... |
what is the number of starts in 1977 | CREATE TABLE table_2180 (
"Pitcher" text,
"Starts" real,
"Wins" real,
"Losses" real,
"No decisions" real,
"Winning %" text,
"Seasons" text
) | SELECT "Starts" FROM table_2180 WHERE "Seasons" = '1977' | Below are sql tables 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 starts in 1977 ### Input: CREATE TABLE table_2180 (
"Pitcher" text,
"Starts" real,
"Wins" ... |
find the number of patients whose lab test name was specific gravity. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Specific Gravity" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of patients whose lab test name was specific gravity. ### Input: CREATE TABLE lab (
subject_id text,
... |
A bar chart shows the distribution of family_name and gender_mf . | CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | SELECT family_name, 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: A bar chart shows the distribution of family_name and gender_mf . ### Input: CREATE TABLE Course_Authors_and_Tutors (
au... |
What are the low and high estimates of film markets? | CREATE TABLE film_market_estimation (
Low_Estimate VARCHAR,
High_Estimate VARCHAR
) | SELECT Low_Estimate, High_Estimate FROM film_market_estimation | Below are sql tables 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 low and high estimates of film markets? ### Input: CREATE TABLE film_market_estimation (
Low_Estimate VARCH... |
give the number of patients whose lab test name is troponin i. | 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 lab.label = "Troponin 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: give the number of patients whose lab test name is troponin i. ### Input: CREATE TABLE demographic (
subject_id text,
... |
what were the four most frequent drugs prescribed to patients within 2 months after being diagnosed with hyperglycemia - stress related during the last year? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | 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 = 'hyperglycemia - stress related' AND DATETIME(diagn... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the four most frequent drugs prescribed to patients within 2 months after being diagnosed with hyperglycemia - str... |
Tell me the average gold for moldova and bronze less than 1 | CREATE TABLE table_51649 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Gold") FROM table_51649 WHERE "Nation" = 'moldova' 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: Tell me the average gold for moldova and bronze less than 1 ### Input: CREATE TABLE table_51649 (
"Nation" text,
"Go... |
What was the date of game #3? | CREATE TABLE table_29758 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | SELECT "Date" FROM table_29758 WHERE "Game" = '3' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the date of game #3? ### Input: CREATE TABLE table_29758 (
"Game" real,
"Date" text,
"Team" text,
"... |
How many captains are in each rank? | CREATE TABLE captain (
rank VARCHAR
) | SELECT COUNT(*), rank FROM captain 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: How many captains are in each rank? ### Input: CREATE TABLE captain (
rank VARCHAR
) ### Response: SELECT COUNT(*), rank... |
What are the colors of the team hosted by Christopher? | CREATE TABLE table_58762 (
"Team Name" text,
"Schools" text,
"Sports" text,
"Host" text,
"Nickname(s)" text,
"Colors" text,
"Enrollment (2013/14)" real
) | SELECT "Colors" FROM table_58762 WHERE "Host" = 'christopher' | Below are sql tables 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 colors of the team hosted by Christopher? ### Input: CREATE TABLE table_58762 (
"Team Name" text,
"Scho... |
If the Away team is essendon, what was the Date they played? | CREATE TABLE table_55039 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_55039 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: If the Away team is essendon, what was the Date they played? ### Input: CREATE TABLE table_55039 (
"Home team" text,
... |
since 4 years ago, what are the three most frequent drugs prescribed to the patients 40s during the same hospital visit after they were diagnosed with septic shock? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'septic shock' 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: since 4 years ago, what are the three most frequent drugs prescribed to the patients 40s during the same hospital visit afte... |
For those employees who do not work in departments with managers that have ids between 100 and 200, find email and salary , and visualize them by a bar chart, and list in ascending by the bars. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_... | SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL | Below are sql tables 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, find email and salary , ... |
patient 002-58884 has produced output (ml)-chest tube #1 mid since 07/2101? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
d... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-58884')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patient 002-58884 has produced output (ml)-chest tube #1 mid since 07/2101? ### Input: CREATE TABLE cost (
costid number... |
What player was chosen for the Chicago Sky? | CREATE TABLE table_name_57 (
player VARCHAR,
wnba_team VARCHAR
) | SELECT player FROM table_name_57 WHERE wnba_team = "chicago sky" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What player was chosen for the Chicago Sky? ### Input: CREATE TABLE table_name_57 (
player VARCHAR,
wnba_team VARCHA... |
what flights leave DENVER before 1200 on NW | 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 flight.flight_id FROM airport_service, city, flight WHERE (city.city_code = airport_service.city_code AND city.city_name = 'DENVER' AND flight.departure_time < 1200 AND flight.from_airport = airport_service.airport_code) AND flight.airline_code = 'NW' | Below are sql tables 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 flights leave DENVER before 1200 on NW ### Input: CREATE TABLE flight (
aircraft_code_sequence text,
airline_co... |
What's the statue for an against above 22? | CREATE TABLE table_13155 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | SELECT "Status" FROM table_13155 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's the statue for an against above 22? ### Input: CREATE TABLE table_13155 (
"Opposing Teams" text,
"Against" re... |
provide the number of patients whose procedure long title is percutaneous (endoscopic) jejunostomy [pej] and lab test fluid is joint fluid? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Percutaneous (endoscopic) jejunostomy [PEJ]" AND lab.fluid = "Joint Fluid" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose procedure long title is percutaneous (endoscopic) jejunostomy [pej] and lab test fluid ... |
Of matches that had a home team score of 13.13 (91), which one had the largest crowd? | CREATE TABLE table_74798 (
"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_74798 WHERE "Home team score" = '13.13 (91)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Of matches that had a home team score of 13.13 (91), which one had the largest crowd? ### Input: CREATE TABLE table_74798 (
... |
How many people in the crowd with Away team of geelong? | CREATE TABLE table_11052 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT COUNT("Crowd") FROM table_11052 WHERE "Away team" = 'geelong' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many people in the crowd with Away team of geelong? ### Input: CREATE TABLE table_11052 (
"Home team" text,
"Hom... |
What is the lowest number of loses of the club with more than 42 goals scored, more than 20 goals conceded, and less than 3 draws? | CREATE TABLE table_name_30 (
loses INTEGER,
draws VARCHAR,
goals_scored VARCHAR,
goals_conceded VARCHAR
) | SELECT MIN(loses) FROM table_name_30 WHERE goals_scored > 42 AND goals_conceded > 20 AND draws < 3 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest number of loses of the club with more than 42 goals scored, more than 20 goals conceded, and less than 3 ... |
What is the Place of the Player with a Score of 70-71=141? | CREATE TABLE table_44501 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Place" FROM table_44501 WHERE "Score" = '70-71=141' | Below are sql tables 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 Place of the Player with a Score of 70-71=141? ### Input: CREATE TABLE table_44501 (
"Place" text,
"Play... |
Return a bar chart on how old is the youngest person for each job?, and could you display names in desc order please? | CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
) | SELECT job, MIN(age) FROM Person GROUP BY job ORDER BY job DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart on how old is the youngest person for each job?, and could you display names in desc order please? ### In... |
Tell me the sum of wins for top 5 less than 1 | CREATE TABLE table_name_77 (
wins INTEGER,
top_5 INTEGER
) | SELECT SUM(wins) FROM table_name_77 WHERE top_5 < 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: Tell me the sum of wins for top 5 less than 1 ### Input: CREATE TABLE table_name_77 (
wins INTEGER,
top_5 INTEGER
) ... |
provide the number of patients whose lab test chart time is 2120-04-16 13:27:00. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.charttime = "2120-04-16 13:27:00" | Below are sql tables 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 lab test chart time is 2120-04-16 13:27:00. ### Input: CREATE TABLE diagnoses (
sub... |
show me round trip fares from LAS VEGAS to HOUSTON nonstop | 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 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 = 'LAS VEGAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.c... | Below are sql tables 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 round trip fares from LAS VEGAS to HOUSTON nonstop ### Input: CREATE TABLE dual_carrier (
main_airline varchar,
... |
Draw a bar chart about the distribution of All_Road and All_Games_Percent , rank in asc by the y axis. | 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 ORDER BY All_Games_Percent | Below are sql tables 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_Road and All_Games_Percent , rank in asc by the y axis. ### Input: CREATE TAB... |
What is the Score of the game with a Record of 29 23 13? | CREATE TABLE table_47166 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Score" FROM table_47166 WHERE "Record" = '29–23–13' | Below are sql tables 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 game with a Record of 29 23 13? ### Input: CREATE TABLE table_47166 (
"Date" text,
"Visitor... |
count the number of patients whose gender is m and diagnoses icd9 code is 769? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "769" | Below are sql tables 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 gender is m and diagnoses icd9 code is 769? ### Input: CREATE TABLE procedures (
subj... |
At what venue did the home team score 12.19 (91)? | CREATE TABLE table_32846 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_32846 WHERE "Home team score" = '12.19 (91)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: At what venue did the home team score 12.19 (91)? ### Input: CREATE TABLE table_32846 (
"Home team" text,
"Home team... |
has patient 005-26011 had a pleural effusion - etiology unknown diagnosis on the last hospital encounter? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-26011' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.ho... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has patient 005-26011 had a pleural effusion - etiology unknown diagnosis on the last hospital encounter? ### Input: CREATE ... |
what was the time patient 031-19622 was discharged from the hospital for the last time? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number... | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '031-19622' ORDER BY patient.hospitaldischargetime DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the time patient 031-19622 was discharged from the hospital for the last time? ### Input: CREATE TABLE microlab (
... |
Create a bar chart showing the total number across sex, order y-axis in ascending order. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
... | SELECT Sex, COUNT(*) FROM Faculty GROUP BY Sex 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: Create a bar chart showing the total number across sex, order y-axis in ascending order. ### Input: CREATE TABLE Activity (
... |
Show the name of track and the number of races in each track Visualize by bar chart, order in desc by the Name. | 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 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 name of track and the number of races in each track Visualize by bar chart, order in desc by the Name. ### Input: C... |
Who directed the episode whose production code is pabf05? | CREATE TABLE table_28194879_1 (
directed_by VARCHAR,
production_code VARCHAR
) | SELECT directed_by FROM table_28194879_1 WHERE production_code = "PABF05" | Below are sql tables 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 directed the episode whose production code is pabf05? ### Input: CREATE TABLE table_28194879_1 (
directed_by VARCHAR... |
What is the Home team of tie no 2? | CREATE TABLE table_59550 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Home team" FROM table_59550 WHERE "Tie no" = '2' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Home team of tie no 2? ### Input: CREATE TABLE table_59550 (
"Tie no" text,
"Home team" text,
"Score... |
when did patient 20033 have the last minimum ph value until 09/2104? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
val... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20033) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ph') AND STRFTIME('%y-%m', labevents.charttime) <= '2104-09' 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: when did patient 20033 have the last minimum ph value until 09/2104? ### Input: CREATE TABLE microbiologyevents (
row_id... |
Give me a histogram for how many events are there for each party?, and list by the total number in descending. | CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE member (
Member_ID int,
Member_Name text,
Part... | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY COUNT(*) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a histogram for how many events are there for each party?, and list by the total number in descending. ### Input: CR... |
A bar chart shows the distribution of other_details and the amount of other_details , and group by attribute other_details. | CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Address_Types (
add... | SELECT other_details, COUNT(other_details) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental 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 shows the distribution of other_details and the amount of other_details , and group by attribute other_details. ... |
give me the number of patients whose diagnoses short title is critical illness myopthy and drug route is id? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Critical illness myopthy" AND prescriptions.route = "ID" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose diagnoses short title is critical illness myopthy and drug route is id? ### Input: CREA... |
what are the hospital admission times of patient 015-100195 in 2105? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '015-100195' AND STRFTIME('%y', patient.hospitaladmittime) = '2105' | Below are sql tables 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 hospital admission times of patient 015-100195 in 2105? ### Input: CREATE TABLE intakeoutput (
intakeoutput... |
how many patients died of septic shock? | 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.expire_flag = "1" AND diagnoses.short_title = "Septic shock" | Below are sql tables 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 died of septic shock? ### Input: CREATE TABLE demographic (
subject_id text,
hadm_id text,
nam... |
How many patients who died in or before year 2138 had pituitary bleed as the primary disease? | 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 WHERE demographic.diagnosis = "PITUITARY BLEED" AND demographic.dod_year <= "2138.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 patients who died in or before year 2138 had pituitary bleed as the primary disease? ### Input: CREATE TABLE diagno... |
How many entries are there for weight when the winner is 1st - defier and venue is randwick? | CREATE TABLE table_1360997_3 (
weight__kg_ VARCHAR,
winner_2nd VARCHAR,
venue VARCHAR
) | SELECT COUNT(weight__kg_) FROM table_1360997_3 WHERE winner_2nd = "1st - Defier" AND venue = "Randwick" | Below are sql tables 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 entries are there for weight when the winner is 1st - defier and venue is randwick? ### Input: CREATE TABLE table_1... |
I want to compare the number of the names of phones by a bar chart, and display from low to high by the total number. | CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stock int
)
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Rankin... | SELECT Name, COUNT(Name) FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID GROUP BY Name ORDER BY COUNT(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: I want to compare the number of the names of phones by a bar chart, and display from low to high by the total number. ### In... |
Return the staff ids and genders for any staff with the title Department Manager. | CREATE TABLE staff (
staff_id number,
staff_gender text,
staff_name text
)
CREATE TABLE department_store_chain (
dept_store_chain_id number,
dept_store_chain_name text
)
CREATE TABLE customer_addresses (
customer_id number,
address_id number,
date_from time,
date_to time
)
CREATE ... | SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager" | Below are sql tables 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 the staff ids and genders for any staff with the title Department Manager. ### Input: CREATE TABLE staff (
staff_... |
how many days have passed since the first time that patient 97330 has received a red blood cells laboratory test in the current hospital encounter? | 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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime ti... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'red blood cells') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97330 AND adm... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many days have passed since the first time that patient 97330 has received a red blood cells laboratory test in the curr... |
What date has 136-134 as the score? | CREATE TABLE table_38118 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
) | SELECT "Date" FROM table_38118 WHERE "Score" = '136-134' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date has 136-134 as the score? ### Input: CREATE TABLE table_38118 (
"Date" text,
"Visitor" text,
"Score" t... |
ali farhadi 's papers in 2015 | CREATE TABLE field (
fieldid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int... | SELECT DISTINCT paper.paperid FROM author, paper, writes WHERE author.authorname = 'ali farhadi' AND paper.year = 2015 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: ali farhadi 's papers in 2015 ### Input: CREATE TABLE field (
fieldid int
)
CREATE TABLE writes (
paperid int,
... |
Questions counted by number of answers. | CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
Cr... | SELECT AnswerCount, COUNT(*) FROM Posts WHERE PostTypeId = 1 AND AnswerCount > 0 GROUP BY AnswerCount | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions counted by number of answers. ### Input: CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
... |
Which courses does Prof. Stephen Cooper teach ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Stephen Cooper%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_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: Which courses does Prof. Stephen Cooper teach ? ### Input: CREATE TABLE requirement (
requirement_id int,
requiremen... |
What are the first and last name of all biology professors? | CREATE TABLE enroll (
class_code text,
stu_num number,
enroll_grade text
)
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_office text,
prof_extension text,
prof_high_degree text
)
CREATE TABLE employee (
emp_num number,
emp_lname text,
emp_fname text,
emp... | SELECT T3.emp_fname, T3.emp_lname FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.emp_num = T3.emp_num WHERE dept_name = "Biology" | Below are sql tables 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 first and last name of all biology professors? ### Input: CREATE TABLE enroll (
class_code text,
stu_nu... |
find the number of patients with procedure icd9 code 3512 who have complete heart block primary disease. | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "COMPLETE HEART BLOCK" AND procedures.icd9_code = "3512" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of patients with procedure icd9 code 3512 who have complete heart block primary disease. ### Input: CREATE T... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the sum of code , and group by attribute name, and I want to rank in asc by the y-axis. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY 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... |
who was the opponent where the date was the 21st? | CREATE TABLE table_21361 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text,
"Competition" text,
"Man of the Match" text
) | SELECT "Opponent" FROM table_21361 WHERE "Date" = '21st' | Below are sql tables 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 where the date was the 21st? ### Input: CREATE TABLE table_21361 (
"Date" text,
"Opponent" text... |
What is the away team's score when south melbourne is the away team? | CREATE TABLE table_4823 (
"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_4823 WHERE "Away team" = 'south melbourne' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the away team's score when south melbourne is the away team? ### Input: CREATE TABLE table_4823 (
"Home team" te... |
provide the number of patients whose gender is f and age is less than 36? | 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 = "F" AND demographic.age < "36" | Below are sql tables 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 gender is f and age is less than 36? ### Input: CREATE TABLE demographic (
subject_... |
What's the loss of who has a Save of Miguel Saladin and played against Chinatrust Whales? | CREATE TABLE table_37118 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
) | SELECT "Loss" FROM table_37118 WHERE "Opponent" = 'chinatrust whales' AND "Save" = 'miguel saladin' | Below are sql tables 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 loss of who has a Save of Miguel Saladin and played against Chinatrust Whales? ### Input: CREATE TABLE table_3711... |
Give me a bar chart for sum price of each name, I want to display by the x-axis in desc. | 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 Name, SUM(Price) FROM Products GROUP BY Name ORDER BY Name DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a bar chart for sum price of each name, I want to display by the x-axis in desc. ### Input: CREATE TABLE Manufacture... |
how many patients were in careunit micu in 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 icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'micu' AND STRFTIME('%y', transfers.intime) = '2104') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients were in careunit micu in 2104. ### Input: CREATE TABLE prescriptions (
row_id number,
subject_id n... |
How many members gained university status in 1900? | CREATE TABLE table_142950_1 (
research_funding__ VARCHAR,
gained_university_status VARCHAR
) | SELECT COUNT(research_funding__) AS £, 000 AS _ FROM table_142950_1 WHERE gained_university_status = 1900 | Below are sql tables 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 members gained university status in 1900? ### Input: CREATE TABLE table_142950_1 (
research_funding__ VARCHAR,
... |
What club had 523 points against? | CREATE TABLE table_18955 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Points" text
) | SELECT "Club" FROM table_18955 WHERE "Points against" = '523' | Below are sql tables 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 club had 523 points against? ### Input: CREATE TABLE table_18955 (
"Club" text,
"Played" text,
"Won" text,
... |
What percentage of users were using Internet Explorer during the period in which 2.1% were using mobile browsers? | CREATE TABLE table_66075 (
"Period" text,
"Internet Explorer" text,
"Firefox" text,
"Chrome" text,
"Safari" text,
"Opera" text,
"Other Mozilla" text,
"Mobile" text
) | SELECT "Internet Explorer" FROM table_66075 WHERE "Mobile" = '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 percentage of users were using Internet Explorer during the period in which 2.1% were using mobile browsers? ### Input:... |
how many patients whose days of hospital stay is greater than 23 and drug name is pseudoephedrine? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "23" AND prescriptions.drug = "Pseudoephedrine" | Below are sql tables 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 days of hospital stay is greater than 23 and drug name is pseudoephedrine? ### Input: CREATE TABLE d... |
What was the record after the bout with Alexis Vila? | CREATE TABLE table_37137 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Record" FROM table_37137 WHERE "Opponent" = 'alexis vila' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the record after the bout with Alexis Vila? ### Input: CREATE TABLE table_37137 (
"Res." text,
"Record" tex... |
What's the bus width (in bit) of the model whose core is 650 MHz? | CREATE TABLE table_19161046_1 (
bus_width___bit__ VARCHAR,
core___mhz__ VARCHAR
) | SELECT COUNT(bus_width___bit__) FROM table_19161046_1 WHERE core___mhz__ = 650 | Below are sql tables 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 bus width (in bit) of the model whose core is 650 MHz? ### Input: CREATE TABLE table_19161046_1 (
bus_width__... |
what is the fare from SAN FRANCISCO to DALLAS FORT WORTH on DL flight 852 | 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 fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, fare, flight, flight_fare WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the fare from SAN FRANCISCO to DALLAS FORT WORTH on DL flight 852 ### Input: CREATE TABLE aircraft (
aircraft_co... |
Find Nationality and the average of meter_100 , and group by attribute Nationality, and visualize them by a bar chart, I want to show by the Nationality from high to low. | CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimme... | SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality ORDER BY Nationality 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 Nationality and the average of meter_100 , and group by attribute Nationality, and visualize them by a bar chart, I wan... |
give me the number of patients whose diagnoses long title is major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior and drug route is ou? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Major depressive affective disorder, recurrent episode, severe, specified as with psychotic... | Below are sql tables 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 diagnoses long title is major depressive affective disorder, recurrent episode, severe,... |
what is the number of patients whose admission year is less than 2194 and diagnoses long title is hypopotassemia? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2194" AND diagnoses.long_title = "Hypopotassemia" | Below are sql tables 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 2194 and diagnoses long title is hypopotassemia? ### Input:... |
count the number of patients whose admission type is elective and lab test fluid is joint fluid? | 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 = "ELECTIVE" AND lab.fluid = "Joint Fluid" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose admission type is elective and lab test fluid is joint fluid? ### Input: CREATE TABLE dem... |
provide the drug type and drug code for hydrocerin? | 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 prescriptions.drug_type, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Hydrocerin" | Below are sql tables 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 drug type and drug code for hydrocerin? ### Input: CREATE TABLE demographic (
subject_id text,
hadm_id t... |
Which patients on main drug type prescriptions have diagnoses icd9 code 5180? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "5180" AND prescriptions.drug_type = "MAIN" | Below are sql tables 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 patients on main drug type prescriptions have diagnoses icd9 code 5180? ### Input: CREATE TABLE lab (
subject_id t... |
i'd like a flight from SAN DIEGO to TORONTO on AS leaving around 1pm | CREATE TABLE month (
month_number int,
month_name text
)
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... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (((flight.departure_time <= 1330 AND flight.departure_time >= 1230) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TORONTO' AND fligh... | Below are sql tables 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'd like a flight from SAN DIEGO to TORONTO on AS leaving around 1pm ### Input: CREATE TABLE month (
month_number int,
... |
how many patients were prescribed with ns within the same month last year after the diagnosis with assault nos? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'assault nos') 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: how many patients were prescribed with ns within the same month last year after the diagnosis with assault nos? ### Input: C... |
What was the lowes population of 2002 when the 2011 population was 30076? | CREATE TABLE table_27911 (
"Urban settlement" text,
"Cyrillic Name" text,
"City / municipality" text,
"District" text,
"Population (1991)" real,
"Population (2002)" real,
"Population (2011)" real
) | SELECT MIN("Population (2002)") FROM table_27911 WHERE "Population (2011)" = '30076' | Below are sql tables 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 lowes population of 2002 when the 2011 population was 30076? ### Input: CREATE TABLE table_27911 (
"Urban s... |
What is the transfer window of the player moving to Panionios? | CREATE TABLE table_58968 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text
) | SELECT "Transfer window" FROM table_58968 WHERE "Moving to" = 'panionios' | Below are sql tables 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 transfer window of the player moving to Panionios? ### Input: CREATE TABLE table_58968 (
"Nat." text,
"N... |
What is Date, when Away Team is 'Minehead'? | CREATE TABLE table_61638 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Date" FROM table_61638 WHERE "Away team" = 'minehead' | Below are sql tables 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 Date, when Away Team is 'Minehead'? ### Input: CREATE TABLE table_61638 (
"Tie no" text,
"Home team" text,
... |
Give me a histogram for what are the statuses and average populations of each city?, could you sort Y from high to low order? | CREATE TABLE city (
City_ID int,
Official_Name text,
Status text,
Area_km_2 real,
Population real,
Census_Ranking text
)
CREATE TABLE competition_record (
Competition_ID int,
Farm_ID int,
Rank int
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Worki... | SELECT Status, AVG(Population) FROM city GROUP BY Status ORDER BY AVG(Population) 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: Give me a histogram for what are the statuses and average populations of each city?, could you sort Y from high to low order... |
oh let 's see does EA have a flight from ATLANTA to WASHINGTON | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
econ... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.airline_code = 'EA') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND flight.to_airport = AIRPORT... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: oh let 's see does EA have a flight from ATLANTA to WASHINGTON ### Input: CREATE TABLE code_description (
code varchar,
... |
What is the average loss with a goal higher than 51 and wins higher than 14? | CREATE TABLE table_80130 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT AVG("Losses") FROM table_80130 WHERE "Goals against" > '51' AND "Wins" > '14' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average loss with a goal higher than 51 and wins higher than 14? ### Input: CREATE TABLE table_80130 (
"Posi... |
How many actors have appeared in each musical? | CREATE TABLE musical (
musical_id number,
name text,
year number,
award text,
category text,
nominee text,
result text
)
CREATE TABLE actor (
actor_id number,
name text,
musical_id number,
character text,
duration text,
age number
) | SELECT T2.name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.musical_id = T2.musical_id GROUP BY T1.musical_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: How many actors have appeared in each musical? ### Input: CREATE TABLE musical (
musical_id number,
name text,
y... |
how many patients that died were born before 2107? | 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 WHERE demographic.expire_flag = "0" AND demographic.dob_year < "2107" | Below are sql tables 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 that died were born before 2107? ### Input: CREATE TABLE lab (
subject_id text,
hadm_id text,
... |
find the number of patients under the age of 61 whose primary disease is coronary artery disease/coronary artery bypass graft/sda. | 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 WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND demographic.age < "61" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of patients under the age of 61 whose primary disease is coronary artery disease/coronary artery bypass graf... |
look for the number of patients who were discharged to short term hospital. | 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.discharge_location = "SHORT TERM 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: look for the number of patients who were discharged to short term hospital. ### Input: CREATE TABLE prescriptions (
subj... |
what was the name of the drug that patient 92788 had been prescribed two times in this hospital encounter. | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92788 AND admissions.dischtime IS NULL) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 = 2 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the drug that patient 92788 had been prescribed two times in this hospital encounter. ### Input: CREATE... |
What is the total number of losses for a draw of 7, and 1 points less than 33? | CREATE TABLE table_name_21 (
lost VARCHAR,
drawn VARCHAR,
points_1 VARCHAR
) | SELECT COUNT(lost) FROM table_name_21 WHERE drawn = 7 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 losses for a draw of 7, and 1 points less than 33? ### Input: CREATE TABLE table_name_21 (
l... |
what is the number of patients whose days of hospital stay is greater than 16 and item id is 50976? | 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.days_stay > "16" AND lab.itemid = "50976" | Below are sql tables 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 days of hospital stay is greater than 16 and item id is 50976? ### Input: CREATE TABLE ... |
What was the name of eipsode 618? | CREATE TABLE table_21823 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | SELECT "Title" FROM table_21823 WHERE "Production code" = '618' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the name of eipsode 618? ### Input: CREATE TABLE table_21823 (
"No. in series" real,
"No. in season" real,
... |
What are the names and number of hours spent training for each player who trains for less than 1500 hours Visualize by bar chart, and could you list by the total number from low to high? | CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) | SELECT pName, HS FROM Player WHERE HS < 1500 ORDER BY HS | Below are sql tables 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 and number of hours spent training for each player who trains for less than 1500 hours Visualize by bar c... |
What competition has may 5, 2001 as the date? | CREATE TABLE table_name_25 (
competition VARCHAR,
date VARCHAR
) | SELECT competition FROM table_name_25 WHERE date = "may 5, 2001" | Below are sql tables 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 competition has may 5, 2001 as the date? ### Input: CREATE TABLE table_name_25 (
competition VARCHAR,
date VARC... |
For each file format, return the number of artists who released songs in that format. Show bar chart. | CREATE TABLE files (
f_id number(10),
artist_name varchar2(50),
file_size varchar2(20),
duration varchar2(20),
formats varchar2(20)
)
CREATE TABLE genre (
g_name varchar2(20),
rating varchar2(10),
most_popular_in varchar2(50)
)
CREATE TABLE song (
song_name varchar2(50),
artist... | SELECT formats, COUNT(*) FROM files GROUP BY formats | Below are sql tables 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 file format, return the number of artists who released songs in that format. Show bar chart. ### Input: CREATE TABL... |
With which kind of payment method were the least number of payments processed? | CREATE TABLE Payments (
Payment_Method_Code VARCHAR
) | SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) 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: With which kind of payment method were the least number of payments processed? ### Input: CREATE TABLE Payments (
Paymen... |
what number of patients were given opn/oth rep aort vlv-tis two or more times during a year before? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid 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 = 'opn/oth rep aort vlv-... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of patients were given opn/oth rep aort vlv-tis two or more times during a year before? ### Input: CREATE TABLE ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.