instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
TOP 200 users from BANGLADESH. | CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id, CreationDate, Id AS "user_link", Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Bangladesh%' ORDER BY Reputation DESC LIMIT 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: TOP 200 users from BANGLADESH. ### Input: CREATE TABLE Tags (
Id number,
TagName text,
Count number,
Excerpt... |
Find the number of rooms with price higher than 120 for different decor Show bar chart, and list by the Y in descending. | CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor 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: Find the number of rooms with price higher than 120 for different decor Show bar chart, and list by the Y in descending. ###... |
List the number of the name of all playlist, display by the x-axis from high to low please. | CREATE TABLE tracks (
id INTEGER,
name VARCHAR(200),
album_id INTEGER,
media_type_id INTEGER,
genre_id INTEGER,
composer VARCHAR(220),
milliseconds INTEGER,
bytes INTEGER,
unit_price NUMERIC(10,2)
)
CREATE TABLE artists (
id INTEGER,
name VARCHAR(120)
)
CREATE TABLE genres ... | SELECT name, COUNT(name) FROM playlists 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: List the number of the name of all playlist, display by the x-axis from high to low please. ### Input: CREATE TABLE tracks (... |
What commercial operation that has a gross capacity of 1,126 mw, and a unit of tianwan-4? | CREATE TABLE table_14738 (
"Unit" text,
"Reactor type" text,
"Net capacity" text,
"Gross capacity" text,
"Construction started" text,
"Electricity grid" text,
"Commercial operation" text,
"Shutdown" text
) | SELECT "Commercial operation" FROM table_14738 WHERE "Gross capacity" = '1,126 mw' AND "Unit" = 'tianwan-4' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What commercial operation that has a gross capacity of 1,126 mw, and a unit of tianwan-4? ### Input: CREATE TABLE table_1473... |
what was patient 012-63427's first id of the ward until 1 year ago? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
i... | SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-63427') AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY patient.unitadmittime 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 patient 012-63427's first id of the ward until 1 year ago? ### Input: CREATE TABLE allergy (
allergyid number,
... |
patients with creatinine clearance < 50 ml / min, | CREATE TABLE table_test_18 (
"id" int,
"bleeding" int,
"dialysis" bool,
"hct" int,
"hepatic_disease" bool,
"anaemia" bool,
"creatinine_clearance_cl" float,
"polycytaemia" bool,
"thrombocytopenia" float,
"kidney_disease" bool,
"body_mass_index_bmi" float,
"glycosylated_hem... | SELECT * FROM table_test_18 WHERE creatinine_clearance_cl < 50 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patients with creatinine clearance < 50 ml / min, ### Input: CREATE TABLE table_test_18 (
"id" int,
"bleeding" int,
... |
what is discharge location of subject id 3343? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT demographic.discharge_location FROM demographic WHERE demographic.subject_id = "3343" | Below are sql tables 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 discharge location of subject id 3343? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
... |
calculate the number of patients discharged from the hospital. | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the number of patients discharged from the hospital. ### Input: CREATE TABLE patient (
uniquepid text,
pat... |
what is the number of patients whose admission location is phys referral/normal deli and lab test fluid is ascites? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.fluid = "Ascites" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose admission location is phys referral/normal deli and lab test fluid is ascites? ### Inpu... |
what is date of birth and insurance of subject id 21796? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT demographic.dob, demographic.insurance FROM demographic WHERE demographic.subject_id = "21796" | Below are sql tables 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 of birth and insurance of subject id 21796? ### Input: CREATE TABLE procedures (
subject_id text,
hadm_... |
Who was the home team at Victoria Park? | CREATE TABLE table_56109 (
"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_56109 WHERE "Venue" = 'victoria park' | Below are sql tables 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 home team at Victoria Park? ### Input: CREATE TABLE table_56109 (
"Home team" text,
"Home team score" te... |
What is the highest wins for the NFL with a finish of 1st, and more than 6 losses? | CREATE TABLE table_77178 (
"Season" real,
"League" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Ties" real
) | SELECT MAX("Wins") FROM table_77178 WHERE "League" = 'nfl' AND "Finish" = '1st' AND "Losses" > '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 is the highest wins for the NFL with a finish of 1st, and more than 6 losses? ### Input: CREATE TABLE table_77178 (
... |
how many patients whose diagnoses icd9 code is 56212 and drug route is ed? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "56212" AND prescriptions.route = "ED" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose diagnoses icd9 code is 56212 and drug route is ed? ### Input: CREATE TABLE demographic (
subject... |
A bar chart about how many departments are in each school?, rank X-axis in asc order. | CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8... | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT ORDER BY SCHOOL_CODE | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart about how many departments are in each school?, rank X-axis in asc order. ### Input: CREATE TABLE PROFESSOR (
... |
What is the name of the teacher who teaches a PreMajor program requirement fulfilling course ? | CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = course_offering.course_id INN... | Below are sql tables 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 of the teacher who teaches a PreMajor program requirement fulfilling course ? ### Input: CREATE TABLE cours... |
List the original air date for week 5. | CREATE TABLE table_25555 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Rank (week)" real,
"Original air date" text
) | SELECT "Original air date" FROM table_25555 WHERE "Rank (week)" = '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: List the original air date for week 5. ### Input: CREATE TABLE table_25555 (
"No." real,
"#" real,
"Title" text,... |
how many patients have a medicare insurance with a diagnosis icd9 code 3019? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.icd9_code = "3019" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients have a medicare insurance with a diagnosis icd9 code 3019? ### Input: CREATE TABLE procedures (
subjec... |
Who was the opponent for the giants stadium game? | CREATE TABLE table_name_83 (
opponent VARCHAR,
game_site VARCHAR
) | SELECT opponent FROM table_name_83 WHERE game_site = "giants stadium" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the opponent for the giants stadium game? ### Input: CREATE TABLE table_name_83 (
opponent VARCHAR,
game_sit... |
Where was game number 5 played? | CREATE TABLE table_25882 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | SELECT "Location Attendance" FROM table_25882 WHERE "Game" = '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 game number 5 played? ### Input: CREATE TABLE table_25882 (
"Game" real,
"Date" text,
"Team" text,
... |
count the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft; myomectomy/sda and age is less than 67? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" AND demographic.age < "67" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft; myomectomy/sda a... |
How many rooms in each building have a capacity of over 50? | CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
CREATE TABLE prereq (
course_id text,
prereq_id text
)
... | SELECT COUNT(*), building FROM classroom WHERE capacity > 50 GROUP BY building | Below are sql tables 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 rooms in each building have a capacity of over 50? ### Input: CREATE TABLE section (
course_id text,
sec_id... |
Can you tell me the Score that has the Team of memphis? | CREATE TABLE table_name_89 (
score VARCHAR,
team VARCHAR
) | SELECT score FROM table_name_89 WHERE team = "memphis" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the Score that has the Team of memphis? ### Input: CREATE TABLE table_name_89 (
score VARCHAR,
team ... |
Which nation has a Silver of 1, a Gold of 0, and a Total of 1? | CREATE TABLE table_name_46 (
nation VARCHAR,
total VARCHAR,
silver VARCHAR,
gold VARCHAR
) | SELECT nation FROM table_name_46 WHERE silver = "1" AND gold = "0" AND total = "1" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which nation has a Silver of 1, a Gold of 0, and a Total of 1? ### Input: CREATE TABLE table_name_46 (
nation VARCHAR,
... |
How many people were at the game with a record of 6-1? | CREATE TABLE table_name_50 (
attendance VARCHAR,
record VARCHAR
) | SELECT attendance FROM table_name_50 WHERE record = "6-1" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many people were at the game with a record of 6-1? ### Input: CREATE TABLE table_name_50 (
attendance VARCHAR,
r... |
For those female students with age is older than 18 who are not majoring in 600, tell me how many students of different first names using a bar chart, rank by the how many fname in desc please. | CREATE TABLE Visits_Restaurant (
StuID INTEGER,
ResID INTEGER,
Time TIMESTAMP,
Spent FLOAT
)
CREATE TABLE Type_Of_Restaurant (
ResID INTEGER,
ResTypeID INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Maj... | SELECT Fname, COUNT(Fname) FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F' GROUP BY Fname ORDER BY COUNT(Fname) 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 female students with age is older than 18 who are not majoring in 600, tell me how many students of different firs... |
what is the number of patients who died on or before 2126 and had atrial septal defect/mitral valve replacement; repair atrial-septal defect/sda primary disease? | 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 WHERE demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" AND demographic.dod_year <= "2126.0" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients who died on or before 2126 and had atrial septal defect/mitral valve replacement; repair atri... |
How many single patients had a diagnosis long title protal hypertension? | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.long_title = "Portal hypertension" | Below are sql tables 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 single patients had a diagnosis long title protal hypertension? ### Input: CREATE TABLE procedures (
subject_id... |
What is the Place of the Player with a Score of 73-73-65-73=284? | CREATE TABLE table_42815 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
) | SELECT "Place" FROM table_42815 WHERE "Score" = '73-73-65-73=284' | Below are sql tables 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 73-73-65-73=284? ### Input: CREATE TABLE table_42815 (
"Place" text,
... |
get the number of patients who were admitted urgently with phys referral/normal deli as admission location. | 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 WHERE demographic.admission_type = "URGENT" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get the number of patients who were admitted urgently with phys referral/normal deli as admission location. ### Input: CREAT... |
Return a histogram on what are the different names and credit scores of customers who have taken a loan?, and show by the total number from high to low. | CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state ... | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID ORDER BY credit_score DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a histogram on what are the different names and credit scores of customers who have taken a loan?, and show by the to... |
How many companies each investor has invested? Show me a bar chart, and show by the X from low to high. | CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
) | SELECT Investor, COUNT(Investor) FROM entrepreneur GROUP BY Investor ORDER BY Investor | Below are sql tables 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 companies each investor has invested? Show me a bar chart, and show by the X from low to high. ### Input: CREATE TA... |
Plot mean age by grouped by sex as a bar graph, and could you sort bar in asc order? | CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Student (
StuID INTEGE... | SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Plot mean age by grouped by sex as a bar graph, and could you sort bar in asc order? ### Input: CREATE TABLE Lives_in (
... |
Name the power output for model of s-13 | CREATE TABLE table_70711 (
"Model" text,
"Specification" text,
"Build date" text,
"Total produced" real,
"Wheel arrangement" text,
"Prime mover" text,
"Power output" text
) | SELECT "Power output" FROM table_70711 WHERE "Model" = 's-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: Name the power output for model of s-13 ### Input: CREATE TABLE table_70711 (
"Model" text,
"Specification" text,
... |
In which series was season 18? | CREATE TABLE table_26568 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | SELECT COUNT("No. in series") FROM table_26568 WHERE "No. in season" = '18' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In which series was season 18? ### Input: CREATE TABLE table_26568 (
"No. in series" real,
"No. in season" real,
... |
Which title has a year later than 1986 with an album as the format? | CREATE TABLE table_69088 (
"Year" real,
"Date" text,
"Title" text,
"Format(s)" text,
"Award Description(s)" text,
"Result(s)" text
) | SELECT "Title" FROM table_69088 WHERE "Year" > '1986' AND "Format(s)" = 'album' | Below are sql tables 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 title has a year later than 1986 with an album as the format? ### Input: CREATE TABLE table_69088 (
"Year" real,
... |
How many different statuses do cities have? | CREATE TABLE competition_record (
competition_id number,
farm_id number,
rank number
)
CREATE TABLE farm_competition (
competition_id number,
year number,
theme text,
host_city_id number,
hosts text
)
CREATE TABLE farm (
farm_id number,
year number,
total_horses number,
... | SELECT COUNT(DISTINCT status) FROM 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: How many different statuses do cities have? ### Input: CREATE TABLE competition_record (
competition_id number,
farm... |
Who had the high point total when the team was 24-17? | CREATE TABLE table_18981 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High points" FROM table_18981 WHERE "Record" = '24-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: Who had the high point total when the team was 24-17? ### Input: CREATE TABLE table_18981 (
"Game" real,
"Date" text... |
Name the average lost for matches of 6 | CREATE TABLE table_54847 (
"Team" text,
"Nation" text,
"From" text,
"Matches" real,
"Drawn" real,
"Lost" real,
"Win %" real
) | SELECT AVG("Lost") FROM table_54847 WHERE "Matches" = '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: Name the average lost for matches of 6 ### Input: CREATE TABLE table_54847 (
"Team" text,
"Nation" text,
"From" ... |
show me the list of flights from DALLAS FORT WORTH to BALTIMORE on AA and DL | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
C... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight WHERE (((flight.airline_code = 'AA') OR (flight.airline_code = 'DL')) AND CITY_2.city_code = AIRPORT_SERVICE_2.ci... | Below are sql tables 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 list of flights from DALLAS FORT WORTH to BALTIMORE on AA and DL ### Input: CREATE TABLE city (
city_code va... |
how many hours has it been since the last time that patient 31854 on the current icu visit received a criticare hn intake? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagn... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) 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 = 31854) AND icustays.outtime IS NULL)... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many hours has it been since the last time that patient 31854 on the current icu visit received a criticare hn intake? #... |
What is the time of the rider ranked 6? | CREATE TABLE table_77586 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
) | SELECT "Time" FROM table_77586 WHERE "Rank" = '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 is the time of the rider ranked 6? ### Input: CREATE TABLE table_77586 (
"Rank" real,
"Rider" text,
"Team" ... |
Give me a bar chart for sum weight of each sex | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Sex, SUM(Weight) FROM people GROUP BY Sex | Below are sql tables 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 weight of each sex ### Input: CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
... |
can i go from BOSTON to SAN FRANCISCO with a stopover in DENVER | CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE ground_service (
city_code text,
airport_co... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: can i go from BOSTON to SAN FRANCISCO with a stopover in DENVER ### Input: CREATE TABLE class_of_service (
booking_class... |
How many patients aged below 77 years old died? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.age < "77" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many patients aged below 77 years old died? ### Input: CREATE TABLE lab (
subject_id text,
hadm_id text,
ite... |
provide the number of patients whose diagnoses long title is closed fracture of subtrochanteric section of neck of femur and lab test category is hematology? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Closed fracture of subtrochanteric section of neck of femur" AND lab."CATEGORY" = "Hematology" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses long title is closed fracture of subtrochanteric section of neck of femur and... |
What is the Branding of the Frequency owned by Sound of Faith Broadcasting Group? | CREATE TABLE table_8645 (
"Frequency" text,
"Call sign" text,
"Branding" text,
"Format" text,
"Owner" text
) | SELECT "Branding" FROM table_8645 WHERE "Owner" = 'sound of faith broadcasting group' | Below are sql tables 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 Branding of the Frequency owned by Sound of Faith Broadcasting Group? ### Input: CREATE TABLE table_8645 (
"... |
i need a flight from MEMPHIS to SEATTLE | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE month (
... | 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 CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MEMPHIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEATTL... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i need a flight from MEMPHIS to SEATTLE ### Input: CREATE TABLE restriction (
restriction_code text,
advance_purchas... |
provide the number of patients whose ethnicity is black/haitian and diagnosis icd9 code is v4511. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND diagnoses.icd9_code = "V4511" | Below are sql tables 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 ethnicity is black/haitian and diagnosis icd9 code is v4511. ### Input: CREATE TABLE pr... |
give me the number of patients whose drug name is sodium citrate 4%? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sodium CITRATE 4%" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose drug name is sodium citrate 4%? ### Input: CREATE TABLE prescriptions (
subject_id ... |
tell me the birth date of patient 1819? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABL... | SELECT patients.dob FROM patients WHERE patients.subject_id = 1819 | Below are sql tables 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 birth date of patient 1819? ### Input: CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... |
What is the total number of capitals that have an area of exactly 1104 square km? | CREATE TABLE table_19605700_1 (
capital VARCHAR,
area_km² VARCHAR
) | SELECT COUNT(capital) FROM table_19605700_1 WHERE area_km² = 1104 | Below are sql tables 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 capitals that have an area of exactly 1104 square km? ### Input: CREATE TABLE table_19605700_1 (... |
Find the number of stores in each city. Plot them as bar chart. | CREATE TABLE store_district (
Store_ID int,
District_ID int
)
CREATE TABLE store_product (
Store_ID int,
Product_ID int
)
CREATE TABLE product (
product_id int,
product text,
dimensions text,
dpi real,
pages_per_minute_color real,
max_page_size text,
interface text
)
CREAT... | SELECT Headquartered_City, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.Store_ID = t2.Store_ID JOIN district AS t3 ON t2.District_ID = t3.District_ID GROUP BY t3.Headquartered_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: Find the number of stores in each city. Plot them as bar chart. ### Input: CREATE TABLE store_district (
Store_ID int,
... |
how many patients were diagnosed with acute renal failure who did not return to the hospital within 2 months in this year? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicatio... | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute renal failure' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_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: how many patients were diagnosed with acute renal failure who did not return to the hospital within 2 months in this year? #... |
What is the lowest Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802? | CREATE TABLE table_name_10 (
grid INTEGER,
time VARCHAR,
laps VARCHAR,
manufacturer VARCHAR
) | SELECT MIN(grid) FROM table_name_10 WHERE laps = 21 AND manufacturer = "yamaha" AND time = "+18.802" | Below are sql tables 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 Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802? ### Input: CREATE TABLE tab... |
What is Position, when School/Club Team is McMaster? | CREATE TABLE table_name_34 (
position VARCHAR,
school_club_team VARCHAR
) | SELECT position FROM table_name_34 WHERE school_club_team = "mcmaster" | Below are sql tables 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 Position, when School/Club Team is McMaster? ### Input: CREATE TABLE table_name_34 (
position VARCHAR,
schoo... |
does patient 029-7028 had any tube feeding residual discarded (ml) output in 09/last year? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | 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 = '029-7028')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: does patient 029-7028 had any tube feeding residual discarded (ml) output in 09/last year? ### Input: CREATE TABLE allergy (... |
what is the name of the drug that has been prescribed two or more times in 12/2105 to patient 015-58787? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015... | Below are sql tables 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 of the drug that has been prescribed two or more times in 12/2105 to patient 015-58787? ### Input: CREATE T... |
can you show me one way economy fares from DALLAS to ATLANTA | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE month (
... | 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 = 'DALLAS' 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: can you show me one way economy fares from DALLAS to ATLANTA ### Input: CREATE TABLE restriction (
restriction_code text... |
What is the total number of captains in each rank and class? Let class as X-axis, and categorize by rank with a stacked bar chart, rank by the X-axis in ascending. | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | SELECT Class, COUNT(Class) FROM captain GROUP BY Rank, Class ORDER BY Class | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of captains in each rank and class? Let class as X-axis, and categorize by rank with a stacked bar ... |
How many opponents were there when the record was 6-0? | CREATE TABLE table_24204 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Cowboys points" real,
"Opponents" real,
"Record" text
) | SELECT "Date" FROM table_24204 WHERE "Record" = '6-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 opponents were there when the record was 6-0? ### Input: CREATE TABLE table_24204 (
"Game" real,
"Date" tex... |
Do you know when 501 is offered ? | CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 501 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Do you know when 501 is offered ? ### Input: CREATE TABLE student_record (
student_id int,
course_id int,
semest... |
What is the position of the player with a unanimous no result without a college hall of fame? | CREATE TABLE table_name_34 (
position VARCHAR,
unanimous VARCHAR,
college_hall_of_fame VARCHAR
) | SELECT position FROM table_name_34 WHERE unanimous = "no" AND college_hall_of_fame = "no" | Below are sql tables 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 position of the player with a unanimous no result without a college hall of fame? ### Input: CREATE TABLE table_... |
how many patients born before 2117 have lab test item id 51176? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2117" AND lab.itemid = "51176" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients born before 2117 have lab test item id 51176? ### Input: CREATE TABLE procedures (
subject_id text,
... |
how many patients are discharged to home health care and the admission year is before 2110? | 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.discharge_location = "HOME HEALTH CARE" AND demographic.admityear < "2110" | Below are sql tables 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 discharged to home health care and the admission year is before 2110? ### Input: CREATE TABLE procedur... |
what is date of birth and language of subject id 2560? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT demographic.dob, demographic.language 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: what is date of birth and language of subject id 2560? ### Input: CREATE TABLE demographic (
subject_id text,
hadm_i... |
How many documents are created in each day? Bin the document date by weekday and group by document type description with a stacked bar chart, I want to sort Y in desc order. | CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_... | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY COUNT(Document_Date) 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 documents are created in each day? Bin the document date by weekday and group by document type description with a s... |
show me the last flight available in the evening from BOSTON to WASHINGTON on 7 21 | 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 AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 21 AND date_day.month_number = 7 ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the last flight available in the evening from BOSTON to WASHINGTON on 7 21 ### Input: CREATE TABLE flight (
airc... |
For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the hire_date bin hire_date by time by a bar chart, show by the y-axis in desc. | 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 NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(MANAGER_ID) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, give me the comparison about the average of manager_id over the hi... |
what is the number of patients whose procedure long title is closed biopsy of skin and subcutaneous tissue and lab test fluid is cerebrospinal fluid (csf)? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Closed biopsy of skin and subcutaneous tissue" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | Below are sql tables 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 procedure long title is closed biopsy of skin and subcutaneous tissue and lab test flui... |
Name the Record of Visitor of toronto st. pats with a Score of 5 4 and a Home of ottawa senators? Question 5 | CREATE TABLE table_name_48 (
record VARCHAR,
home VARCHAR,
visitor VARCHAR,
score VARCHAR
) | SELECT record FROM table_name_48 WHERE visitor = "toronto st. pats" AND score = "5–4" AND home = "ottawa senators" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the Record of Visitor of toronto st. pats with a Score of 5 4 and a Home of ottawa senators? Question 5 ### Input: CREA... |
Show the number of faculty members for each rank in a bar chart. | CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Ra... | SELECT Rank, COUNT(Rank) 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: Show the number of faculty members for each rank in a bar chart. ### Input: CREATE TABLE Faculty_Participates_in (
FacID... |
Who did the high rebounds in the game against Boston? | CREATE TABLE table_29756 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High rebounds" FROM table_29756 WHERE "Team" = 'Boston' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who did the high rebounds in the game against Boston? ### Input: CREATE TABLE table_29756 (
"Game" real,
"Date" text... |
How many bronze medals were won when the total was larger than 2 and the more than 2 gold medals were won? | CREATE TABLE table_57503 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Bronze") FROM table_57503 WHERE "Total" > '2' AND "Gold" > '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: How many bronze medals were won when the total was larger than 2 and the more than 2 gold medals were won? ### Input: CREATE... |
Provide the number of patients that survived and had an admission location of emergency room admit. | 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.expire_flag = "0" AND demographic.admission_location = "EMERGENCY ROOM ADMIT" | Below are sql tables 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 that survived and had an admission location of emergency room admit. ### Input: CREATE TABLE ... |
what is the number of patients whose religion is protestant quaker and admission year is less than 2179? | 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.religion = "PROTESTANT QUAKER" AND demographic.admityear < "2179" | Below are sql tables 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 religion is protestant quaker and admission year is less than 2179? ### Input: CREATE T... |
What is the 1979 number for Standing Rock Indian Reservation when the 1989 is less than 54.9? | CREATE TABLE table_47910 (
"Reservation" text,
"Location" text,
"1969" real,
"1979" real,
"1989" real,
"2000" real
) | SELECT SUM("1979") FROM table_47910 WHERE "Reservation" = 'standing rock indian reservation' AND "1989" < '54.9' | Below are sql tables 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 1979 number for Standing Rock Indian Reservation when the 1989 is less than 54.9? ### Input: CREATE TABLE table_... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id, rank from high to low by the names. | 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, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
Give me the comparison about School_ID over the All_Home , and group by attribute ACC_Road, and show bar in asc order. | 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, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER 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: Give me the comparison about School_ID over the All_Home , and group by attribute ACC_Road, and show bar in asc order. ### I... |
Jason Goemaat upvotes by tag. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
... | SELECT TagName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Posts.OwnerUserId = @UserId GROUP BY TagName ORDER BY UpVotes 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: Jason Goemaat upvotes by tag. ### Input: CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description... |
What is the highest Pick # for the College of Maryland-Eastern Shore? | CREATE TABLE table_69046 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT MAX("Pick #") FROM table_69046 WHERE "College" = 'maryland-eastern shore' | Below are sql tables 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 Pick # for the College of Maryland-Eastern Shore? ### Input: CREATE TABLE table_69046 (
"Round" real... |
What is the status of partial thromboplastin times for conditions where the platelet count is decreased? | CREATE TABLE table_23754 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | SELECT "Partial thromboplastin time" FROM table_23754 WHERE "Platelet count" = 'Decreased' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the status of partial thromboplastin times for conditions where the platelet count is decreased? ### Input: CREATE T... |
What is the value of D 43 when the value of D 42 is d 42 ? | CREATE TABLE table_name_58 (
d_43_√ VARCHAR,
d_42_√ VARCHAR
) | SELECT d_43_√ FROM table_name_58 WHERE d_42_√ = "d 42 √" | Below are sql tables 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 value of D 43 when the value of D 42 is d 42 ? ### Input: CREATE TABLE table_name_58 (
d_43_√ VARCHAR,
d... |
How many documents in different starting date? Return a bar chart binning starting date by weekday interval, could you display in ascending by the y-axis? | CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Co... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations ORDER BY COUNT(Date_in_Location_From) | Below are sql tables 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 documents in different starting date? Return a bar chart binning starting date by weekday interval, could you displ... |
How many patients on a base drug type prescription have recurrent severe episode of major depressive affective disorder without mention of psychotic behavior diagnoses? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Rec depr psych-psychotic" AND prescriptions.drug_type = "BASE" | Below are sql tables 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 on a base drug type prescription have recurrent severe episode of major depressive affective disorder with... |
What happened on 2009-03-14? | CREATE TABLE table_68619 (
"Date" text,
"Location" text,
"Nature of incident" text,
"Circumstances" text,
"Casualties" text
) | SELECT "Circumstances" FROM table_68619 WHERE "Date" = '2009-03-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 happened on 2009-03-14? ### Input: CREATE TABLE table_68619 (
"Date" text,
"Location" text,
"Nature of inci... |
How recently has CAAS 426 been offered ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test... | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CAAS' AND course.number = 426 AND semester.semester_id = course_offering.semester ORDER BY semester.year DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How recently has CAAS 426 been offered ? ### Input: CREATE TABLE program (
program_id int,
name varchar,
college... |
since 5 months ago, what was the monthly maximum weight of patient 022-127032? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid ... | SELECT MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-127032') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-5 month') GROUP BY STRFTIME... | Below are sql tables 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 5 months ago, what was the monthly maximum weight of patient 022-127032? ### Input: CREATE TABLE diagnosis (
diagn... |
how many of the patients with icd9 code 80126 received inhalation therapy? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "80126" AND prescriptions.route = "INHALATION" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the patients with icd9 code 80126 received inhalation therapy? ### Input: CREATE TABLE lab (
subject_id text... |
Name the date for home team of collingwood | CREATE TABLE table_name_51 (
date VARCHAR,
home_team VARCHAR
) | SELECT date FROM table_name_51 WHERE home_team = "collingwood" | Below are sql tables 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 date for home team of collingwood ### Input: CREATE TABLE table_name_51 (
date VARCHAR,
home_team VARCHAR
)... |
Give me the comparison about ACC_Percent over the All_Road by a bar chart, and show x axis in ascending order please. | 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, ACC_Percent FROM basketball_match ORDER BY All_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: Give me the comparison about ACC_Percent over the All_Road by a bar chart, and show x axis in ascending order please. ### In... |
how many times during the last year patient 58649 had visited the intensive care unit? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 58649) AND DATETIME(icustays.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times during the last year patient 58649 had visited the intensive care unit? ### Input: CREATE TABLE outputevents ... |
On what date was Tie #13 played? | CREATE TABLE table_name_93 (
date VARCHAR,
tie_no VARCHAR
) | SELECT date FROM table_name_93 WHERE tie_no = "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: On what date was Tie #13 played? ### Input: CREATE TABLE table_name_93 (
date VARCHAR,
tie_no VARCHAR
) ### Response... |
what is maximum days of hospital stay of patients whose admission type is elective? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.admission_type = "ELECTIVE" | Below are sql tables 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 maximum days of hospital stay of patients whose admission type is elective? ### Input: CREATE TABLE diagnoses (
... |
What was the final score when the Buffalo Bills were the visiting team? | CREATE TABLE table_name_94 (
final_score VARCHAR,
visiting_team VARCHAR
) | SELECT final_score FROM table_name_94 WHERE visiting_team = "buffalo bills" | Below are sql tables 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 final score when the Buffalo Bills were the visiting team? ### Input: CREATE TABLE table_name_94 (
final_sc... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and manufacturer , and group by attribute name, rank by the bar from low to high please. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name an... |
What was the score on 20/6/97? | CREATE TABLE table_name_83 (
score VARCHAR,
date VARCHAR
) | SELECT score FROM table_name_83 WHERE date = "20/6/97" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score on 20/6/97? ### Input: CREATE TABLE table_name_83 (
score VARCHAR,
date VARCHAR
) ### Response: S... |
Find the average age of students living in each dorm and the name of dorm Plot them as bar chart, rank by the bars in asc. | CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHA... | SELECT dorm_name, AVG(T1.Age) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name ORDER BY dorm_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: Find the average age of students living in each dorm and the name of dorm Plot them as bar chart, rank by the bars in asc. #... |
What are the number of the dates when customers with ids between 10 and 20 became customers? | CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_status VARCHAR(15),
order_date DATETIME,
order_details VARCHAR(255)
)
CREATE TABLE Order_Items (
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(15)
)
CREATE TABLE Customer_Contact_Channels (
c... | SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the number of the dates when customers with ids between 10 and 20 became customers? ### Input: CREATE TABLE Custome... |
Which Lost is the highest one that has a Drawn smaller than 4, and a Played smaller than 9? | CREATE TABLE table_name_93 (
lost INTEGER,
drawn VARCHAR,
played VARCHAR
) | SELECT MAX(lost) FROM table_name_93 WHERE drawn < 4 AND played < 9 | Below are sql tables 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 Lost is the highest one that has a Drawn smaller than 4, and a Played smaller than 9? ### Input: CREATE TABLE table_na... |
What away team scored 6.22 (58)? | CREATE TABLE table_4932 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_4932 WHERE "Away team score" = '6.22 (58)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What away team scored 6.22 (58)? ### Input: CREATE TABLE table_4932 (
"Home team" text,
"Home team score" text,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.