instruction
stringlengths
11
303
input
stringlengths
38
5.51k
output
stringlengths
25
1.92k
text
stringlengths
321
6.52k
Bring the list of patients younger than 41 years of age who had a blood lab test done.
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.age < "41" AND lab.fluid = "Blood"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bring the list of patients younger than 41 years of age who had a blood lab test done. ### Input: CREATE TABLE demographic (...
Show all origins and the number of flights from each origin Show bar chart, and rank in desc by the x axis.
CREATE TABLE employee ( eid number(9,0), name varchar2(30), salary number(10,2) ) CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), ...
SELECT origin, COUNT(*) FROM flight GROUP BY origin ORDER BY origin 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 all origins and the number of flights from each origin Show bar chart, and rank in desc by the x axis. ### Input: CREAT...
Whats the song of name with an original artist Garth Brooks
CREATE TABLE table_21501518_1 ( song_choice VARCHAR, original_artist VARCHAR )
SELECT song_choice FROM table_21501518_1 WHERE original_artist = "Garth Brooks"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Whats the song of name with an original artist Garth Brooks ### Input: CREATE TABLE table_21501518_1 ( song_choice VARCH...
What is the name of the episode with 418 as the production code?
CREATE TABLE table_3990 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
SELECT "Title" FROM table_3990 WHERE "Production code" = '418'
Below are sql tables 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 episode with 418 as the production code? ### Input: CREATE TABLE table_3990 ( "No. in series" te...
What is the Score when the winner was sanyo wild knights, and a Runner-up of suntory sungoliath?
CREATE TABLE table_name_39 ( score VARCHAR, winner VARCHAR, runner_up VARCHAR )
SELECT score FROM table_name_39 WHERE winner = "sanyo wild knights" AND runner_up = "suntory sungoliath"
Below are sql tables 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 when the winner was sanyo wild knights, and a Runner-up of suntory sungoliath? ### Input: CREATE TABLE tab...
what is minimum days of hospital stay of patients whose age is greater than or equal to 41?
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 MIN(demographic.days_stay) FROM demographic WHERE demographic.age >= "41"
Below are sql tables 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 minimum days of hospital stay of patients whose age is greater than or equal to 41? ### Input: CREATE TABLE prescrip...
what is the average value of the systemicdiastolic of patient 029-6419 on the last icu visit?
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT AVG(vitalperiodic.systemicdiastolic) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-6419') AND NOT patient.unitdischargetime...
Below are sql tables 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 value of the systemicdiastolic of patient 029-6419 on the last icu visit? ### Input: CREATE TABLE patien...
who had the high assists when the game was less than 13 and the score was w 75-66?
CREATE TABLE table_76287 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
SELECT "High assists" FROM table_76287 WHERE "Game" < '13' AND "Score" = 'w 75-66'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who had the high assists when the game was less than 13 and the score was w 75-66? ### Input: CREATE TABLE table_76287 ( ...
find the minimum age of white female patients .
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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "WHITE"
Below are sql tables 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 minimum age of white female patients . ### Input: CREATE TABLE prescriptions ( subject_id text, hadm_id tex...
tell me the average hospital cost when there is coronary artery disease until 2104?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE medication ( medi...
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'coronary artery disease')) AND STRFTIME('%y'...
Below are sql tables 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 hospital cost when there is coronary artery disease until 2104? ### Input: CREATE TABLE vitalperiodic ( ...
Tell me the degree for chemistry 1965
CREATE TABLE table_31588 ( "Name" text, "Degree" text, "Degree Year" text, "Award Year" real, "Award" text )
SELECT "Degree" FROM table_31588 WHERE "Award Year" = '1965' AND "Award" = 'chemistry'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the degree for chemistry 1965 ### Input: CREATE TABLE table_31588 ( "Name" text, "Degree" text, "Degree ...
provide the number of patients whose admission type is elective and diagnoses long title is subarachnoid hemorrhage?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.long_title = "Subarachnoid hemorrhage"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose admission type is elective and diagnoses long title is subarachnoid hemorrhage? ### Inp...
What is the Venue with an Attendance that is larger than 6,938?
CREATE TABLE table_7185 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
SELECT "Venue" FROM table_7185 WHERE "Attendance" > '6,938'
Below are sql tables 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 Venue with an Attendance that is larger than 6,938? ### Input: CREATE TABLE table_7185 ( "Date" text, "O...
For the call sign w242at what's the city the license plate is registered to?
CREATE TABLE table_name_78 ( city_of_license VARCHAR, call_sign VARCHAR )
SELECT city_of_license FROM table_name_78 WHERE call_sign = "w242at"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the call sign w242at what's the city the license plate is registered to? ### Input: CREATE TABLE table_name_78 ( cit...
Show all artist names and ages in a histogram, could you sort bar from high to low order?
CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real...
SELECT Name, Age FROM artist 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: Show all artist names and ages in a histogram, could you sort bar from high to low order? ### Input: CREATE TABLE artist ( ...
return me the papers written by ' H. V. Jagadish ' and ' Divesh Srivastava ' with more than 200 citations .
CREATE TABLE publication_keyword ( kid int, pid int ) CREATE TABLE keyword ( keyword varchar, kid int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE conference ( ...
SELECT publication.title FROM author AS AUTHOR_0, author AS AUTHOR_1, publication, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.name = 'H. V. Jagadish' AND AUTHOR_1.name = 'Divesh Srivastava' AND publication.citation_num > 200 AND WRITES_0.aid = AUTHOR_0.aid AND WRITES_0.pid = publication.pid AND WRITES_1.aid ...
Below are sql tables 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 me the papers written by ' H. V. Jagadish ' and ' Divesh Srivastava ' with more than 200 citations . ### Input: CREAT...
Are any PreMajor or MDE courses offered in the Fall term ?
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar...
SELECT DISTINCT course.department, course.name, course.number, program_course.category FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category IN ('PreMajor', 'MDE') AND program_course.course_id = course.course_id AND semester.semester = 'Fal...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are any PreMajor or MDE courses offered in the Fall term ? ### Input: CREATE TABLE program_requirement ( program_id int,...
What opponent played on 07-09-2012?
CREATE TABLE table_10235 ( "Date" text, "Venue" text, "Opponent" text, "Result" text, "Competition" text )
SELECT "Opponent" FROM table_10235 WHERE "Date" = '07-09-2012'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What opponent played on 07-09-2012? ### Input: CREATE TABLE table_10235 ( "Date" text, "Venue" text, "Opponent" ...
in the previous month has patient 016-18150 had any output amt-blake drain output?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE treatment ( treat...
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 = '016-18150')) 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: in the previous month has patient 016-18150 had any output amt-blake drain output? ### Input: CREATE TABLE vitalperiodic ( ...
Which Themed Area has a Name of troublesome trucks runaway coaster?
CREATE TABLE table_name_12 ( themed_area VARCHAR, name VARCHAR )
SELECT themed_area FROM table_name_12 WHERE name = "troublesome trucks runaway coaster"
Below are sql tables 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 Themed Area has a Name of troublesome trucks runaway coaster? ### Input: CREATE TABLE table_name_12 ( themed_area ...
What engine doe the Ed Carpenter Racing team use?
CREATE TABLE table_3204 ( "Team" text, "#" real, "Car Sponsor(s)" text, "Driver(s)" text, "Listed Owner(s)" text, "Engine" text, "Chassis" text )
SELECT "Engine" FROM table_3204 WHERE "Team" = 'Ed Carpenter Racing'
Below are sql tables 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 engine doe the Ed Carpenter Racing team use? ### Input: CREATE TABLE table_3204 ( "Team" text, "#" real, "C...
Display a bar chart for what are the names and budgets of departments with budgets greater than the average?, and order by the budget from high to low.
CREATE TABLE student ( ID varchar(5), name varchar(20), dept_name varchar(20), tot_cred numeric(3,0) ) CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE course ( course_id varchar(8), title varchar(50), dept_name varchar...
SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) ORDER BY budget 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: Display a bar chart for what are the names and budgets of departments with budgets greater than the average?, and order by t...
Who has a Jersey number of 31?
CREATE TABLE table_name_84 ( player VARCHAR, jersey_number_s_ VARCHAR )
SELECT player FROM table_name_84 WHERE jersey_number_s_ = "31"
Below are sql tables 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 has a Jersey number of 31? ### Input: CREATE TABLE table_name_84 ( player VARCHAR, jersey_number_s_ VARCHAR ) ##...
provide the number of patients whose primary disease is st-segment elevation myocardial infarction\cardiac cath and procedure short title is attach pedicle graft nec?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ST-SEGMENT ELEVATION MYOCARDIAL INFARCTION\CARDIAC CATH" AND procedures.short_title = "Attach pedicle graft NEC"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose primary disease is st-segment elevation myocardial infarction\cardiac cath and procedur...
Who was the home team at princes park?
CREATE TABLE table_name_25 ( home_team VARCHAR, venue VARCHAR )
SELECT home_team FROM table_name_25 WHERE venue = "princes 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 princes park? ### Input: CREATE TABLE table_name_25 ( home_team VARCHAR, venue VARCHAR ) ##...
In how many different years did schools located in Logan Township, Pennsylvania join the Conference?
CREATE TABLE table_23184 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real )
SELECT COUNT("Joined") FROM table_23184 WHERE "Location" = 'Logan Township, Pennsylvania'
Below are sql tables 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 how many different years did schools located in Logan Township, Pennsylvania join the Conference? ### Input: CREATE TABLE...
Create a bar chart showing the total number across location code, and could you show X from high to low order?
CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME, Day_Number INTEGER ) CREATE TABLE All_Documents ( Document_ID I...
SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code ORDER BY Location_Code DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Create a bar chart showing the total number across location code, and could you show X from high to low order? ### Input: CR...
find the minimum age of patients with medicaid insurance whose ethnicity is hispanic/latino-puerto rican.
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 MIN(demographic.age) FROM demographic WHERE demographic.insurance = "Medicaid" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"
Below are sql tables 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 minimum age of patients with medicaid insurance whose ethnicity is hispanic/latino-puerto rican. ### Input: CREATE ...
the last year what is the first id of patient 162's ward?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABL...
SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 162) AND NOT transfers.wardid IS NULL AND DATETIME(transfers.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY transfers.intime LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: the last year what is the first id of patient 162's ward? ### Input: CREATE TABLE d_icd_procedures ( row_id number, ...
What is the award for the Star Awards earlier than 2005 and the result is won?
CREATE TABLE table_name_31 ( award VARCHAR, result VARCHAR, organisation VARCHAR, year VARCHAR )
SELECT award FROM table_name_31 WHERE organisation = "star awards" AND year < 2005 AND result = "won"
Below are sql tables 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 award for the Star Awards earlier than 2005 and the result is won? ### Input: CREATE TABLE table_name_31 ( a...
Search posts by comment text.
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 Id AS "comment_link", Score, Text FROM Comments WHERE UPPER(Text) LIKE UPPER('%You''re right%') ORDER BY 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: Search posts by comment text. ### Input: CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId ...
how many patients admitted before 2197 followed the procedure icd9 code 3323?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2197" AND procedures.icd9_code = "3323"
Below are sql tables 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 admitted before 2197 followed the procedure icd9 code 3323? ### Input: CREATE TABLE procedures ( subje...
how many states were listed as democratic ?
CREATE TABLE table_203_817 ( id number, "state" text, "incumbent" text, "party" text, "result" text, "candidates" text )
SELECT COUNT("state") FROM table_203_817 WHERE "party" = 'democratic'
Below are sql tables 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 states were listed as democratic ? ### Input: CREATE TABLE table_203_817 ( id number, "state" text, "in...
If the Away team score was 13.20 (98), what was the Home team they played?
CREATE TABLE table_11893 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Home team" FROM table_11893 WHERE "Away team score" = '13.20 (98)'
Below are sql tables 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 score was 13.20 (98), what was the Home team they played? ### Input: CREATE TABLE table_11893 ( "Home t...
What was the Opponent when the Cavaliers had a Record of 3-9?
CREATE TABLE table_76465 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text )
SELECT "Opponent" FROM table_76465 WHERE "Record" = '3-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 was the Opponent when the Cavaliers had a Record of 3-9? ### Input: CREATE TABLE table_76465 ( "Date" text, "H/...
Questions with a deleted answer (and no other answers), by tag.
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewRejectionReasons ( Id number, Na...
SELECT Id AS "post_link", CreationDate FROM Posts WHERE NOT AnswerCount IS NULL AND AnswerCount < 1 AND Tags LIKE '%<##TagName##>%' ORDER BY CreationDate 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: Questions with a deleted answer (and no other answers), by tag. ### Input: CREATE TABLE PostHistoryTypes ( Id number, ...
Among patients admitted before 2148, how many of them had pressure ulcer, buttock?
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.admityear < "2148" AND diagnoses.long_title = "Pressure ulcer, buttock"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Among patients admitted before 2148, how many of them had pressure ulcer, buttock? ### Input: CREATE TABLE demographic ( ...
what is date of birth and admission type of subject id 16438?
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 demographic.dob, demographic.admission_type FROM demographic WHERE demographic.subject_id = "16438"
Below are sql tables 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 admission type of subject id 16438? ### Input: CREATE TABLE prescriptions ( subject_id text, ...
count the number of medicines that patient 016-1459 has been prescribed since 3 years ago.
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(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-1459')) AND DATETIME(medication.drugstarttime) >= 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: count the number of medicines that patient 016-1459 has been prescribed since 3 years ago. ### Input: CREATE TABLE allergy (...
how many times has the carbamazepine xr been ordered for patient 23070 in this month?
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23070) AND prescriptions.drug = 'carbamazepine xr' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month')
Below are sql tables 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 has the carbamazepine xr been ordered for patient 23070 in this month? ### Input: CREATE TABLE inputevents_cv...
What is the Attendance for a Week earlier than 16, and a Date of bye?
CREATE TABLE table_75935 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT "Attendance" FROM table_75935 WHERE "Week" < '16' AND "Date" = 'bye'
Below are sql tables 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 Attendance for a Week earlier than 16, and a Date of bye? ### Input: CREATE TABLE table_75935 ( "Week" real,...
How many patients are of white-russian ethnicity and treated with drug epoetin alfa?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.drug = "Epoetin Alfa"
Below are sql tables 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 of white-russian ethnicity and treated with drug epoetin alfa? ### Input: CREATE TABLE procedures ( ...
in their last hospital encounter patient 005-26011 was diagnosed with a pleural effusion - etiology unknown?
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 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: in their last hospital encounter patient 005-26011 was diagnosed with a pleural effusion - etiology unknown? ### Input: CREA...
What is the record when Danilo Pereira was the opponent?
CREATE TABLE table_59535 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Location" text )
SELECT "Record" FROM table_59535 WHERE "Opponent" = 'danilo pereira'
Below are sql tables 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 record when Danilo Pereira was the opponent? ### Input: CREATE TABLE table_59535 ( "Res." text, "Record"...
On what date was Keiichi Ubukata the mediator and Mitsuko Mori the red team host?
CREATE TABLE table_18002 ( "K\u014dhaku #" real, "Date" text, "Red Team Host" text, "White Team Host" text, "Mediator" text, "Winning Team" text )
SELECT "Date" FROM table_18002 WHERE "Mediator" = 'Keiichi Ubukata' AND "Red Team Host" = 'Mitsuko Mori'
Below are sql tables 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 Keiichi Ubukata the mediator and Mitsuko Mori the red team host? ### Input: CREATE TABLE table_18002 ( ...
What is the number of their teams in elimination? Draw a bar chart, and list x axis in desc order.
CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text )
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team ORDER BY Team DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of their teams in elimination? Draw a bar chart, and list x axis in desc order. ### Input: CREATE TABLE E...
Final that has a Date of january 10, 2004 had what opponent?
CREATE TABLE table_5134 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the Final" text, "Score" text )
SELECT "Opponent in the Final" FROM table_5134 WHERE "Date" = 'january 10, 2004'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Final that has a Date of january 10, 2004 had what opponent? ### Input: CREATE TABLE table_5134 ( "Date" text, "Tour...
Find the name and checking balance of the account with the lowest savings balance.
CREATE TABLE savings ( custid number, balance number ) CREATE TABLE accounts ( custid number, name text ) CREATE TABLE checking ( custid number, balance number )
SELECT T1.name, T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance 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: Find the name and checking balance of the account with the lowest savings balance. ### Input: CREATE TABLE savings ( cus...
How big was the crowd at the game the away team geelong played at?
CREATE TABLE table_57686 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT SUM("Crowd") FROM table_57686 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 big was the crowd at the game the away team geelong played at? ### Input: CREATE TABLE table_57686 ( "Home team" tex...
what nonstop flights between ATLANTA and WASHINGTON leave ATLANTA after 1800 o'clock pm
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND flight.departure_time > 1800 AND flight.to_airport = AIRPORT_SERVICE_1.a...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what nonstop flights between ATLANTA and WASHINGTON leave ATLANTA after 1800 o'clock pm ### Input: CREATE TABLE aircraft ( ...
What is the traditional way to write the name of the district who's area is 2331?
CREATE TABLE table_614 ( "English Name" text, "Simplified" text, "Traditional" text, "Pinyin" text, "Area" real, "Population" real, "Density" real )
SELECT "Traditional" FROM table_614 WHERE "Area" = '2331'
Below are sql tables 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 traditional way to write the name of the district who's area is 2331? ### Input: CREATE TABLE table_614 ( "E...
Use a bar chart to show the number of start dates of all the apartment bookings made by guests with gender code 'Female' for each weekday, sort by the y-axis from high to low please.
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_star...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" ORDER BY COUNT(booking_start_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: Use a bar chart to show the number of start dates of all the apartment bookings made by guests with gender code 'Female' for...
What is the amount of oil terminal in 2004?
CREATE TABLE table_name_51 ( product VARCHAR )
SELECT 2004 FROM table_name_51 WHERE product = "oil terminal"
Below are sql tables 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 amount of oil terminal in 2004? ### Input: CREATE TABLE table_name_51 ( product VARCHAR ) ### Response: SELE...
count the number of patients whose year of death is less than or equal to 2126 and diagnoses long title is other convulsions?
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.dod_year <= "2126.0" AND diagnoses.long_title = "Other convulsions"
Below are sql tables 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 year of death is less than or equal to 2126 and diagnoses long title is other convulsions...
what ground transportation is available in PITTSBURGH
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, pro...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what ground transportation is available in PITTSBURGH ### Input: CREATE TABLE code_description ( code varchar, descr...
Show the relation between team id and all_games_percent for each ACC_Road using a scatter chart
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 Team_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Road
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the relation between team id and all_games_percent for each ACC_Road using a scatter chart ### Input: CREATE TABLE univ...
find travel arrangements for a one way flight from SAN FRANCISCO to DALLAS
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE month ( ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND fare.round_trip_required = 'NO' AND flight_fare.fare_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: find travel arrangements for a one way flight from SAN FRANCISCO to DALLAS ### Input: CREATE TABLE flight_stop ( flight_...
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the sum of code , and group by attribute name, list Y in desc order.
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 DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and t...
how much of a difference has patient 1561 made in its white blood cells levels last measured on the current hospital visit compared to the second to last value measured on the current hospital visit?
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1561 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'white blood cells') ORDER BY labevents.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: how much of a difference has patient 1561 made in its white blood cells levels last measured on the current hospital visit c...
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of job_id and the sum of department_id , and group by attribute job_id, and show in descending by the X-axis.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date...
SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, return a bar chart about the distribution of job_id and t...
For all employees who have the letters D or S in their first name, give me the comparison about the average of manager_id over the job_id , and group by attribute job_id, and rank bar from low to high order.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS va...
SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, give me the comparison about the average of manager_id ov...
For those records from the products and each product's manufacturer, draw a scatter chart about the correlation between price and code , and group by attribute name.
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.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY 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, draw a scatter chart about the correlation between pric...
Show the outcome code of mailshots along with the number of mailshots in each outcome code with a pie chart.
CREATE TABLE Premises ( premise_id INTEGER, premises_type VARCHAR(15), premise_details VARCHAR(255) ) CREATE TABLE Customers ( customer_id INTEGER, payment_method VARCHAR(15), customer_name VARCHAR(80), customer_phone VARCHAR(80), customer_email VARCHAR(80), customer_address VARCHAR...
SELECT outcome_code, COUNT(*) FROM Mailshot_Customers GROUP BY outcome_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: Show the outcome code of mailshots along with the number of mailshots in each outcome code with a pie chart. ### Input: CREA...
what is the average hospital cost that involves the procedure known as vascular surgery consultation in this year?
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 AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'vascular surgery consultation')) AND DATETIM...
Below are sql tables 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 hospital cost that involves the procedure known as vascular surgery consultation in this year? ### Input...
Return a pie on what is the average base price of rooms, for each bed type?
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 bedType, AVG(basePrice) FROM Rooms GROUP BY bedType
Below are sql tables 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 pie on what is the average base price of rooms, for each bed type? ### Input: CREATE TABLE Rooms ( RoomId TEXT,...
What was the score of the game with a H/A/N of H and a record of 12-24?
CREATE TABLE table_8035 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text )
SELECT "Score" FROM table_8035 WHERE "H/A/N" = 'h' AND "Record" = '12-24'
Below are sql tables 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 of the game with a H/A/N of H and a record of 12-24? ### Input: CREATE TABLE table_8035 ( "Date" text...
Get the number of patients who had the incision of vessel abdominal arteries procedure.
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Incision of vessel, abdominal arteries"
Below are sql tables 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 had the incision of vessel abdominal arteries procedure. ### Input: CREATE TABLE diagnoses ( ...
how many patients whose primary disease is transient ischemic attack and procedure short title is cardiopulm resuscita nos?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK" AND procedures.short_title = "Cardiopulm resuscita NOS"
Below are sql tables 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 primary disease is transient ischemic attack and procedure short title is cardiopulm resuscita nos? ...
what are the three most frequently performed surgeries for patients 40s a year before?
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 t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT...
Below are sql tables 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 three most frequently performed surgeries for patients 40s a year before? ### Input: CREATE TABLE patient ( ...
please show me airfare of flight US 345 from BOSTON to PITTSBURGH
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE...
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 (((flight.airline_code = 'US') AND flight.flight_number = 345) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBUR...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: please show me airfare of flight US 345 from BOSTON to PITTSBURGH ### Input: CREATE TABLE flight_fare ( flight_id int, ...
mirella lapata 's papers in 2016 ?
CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE pap...
SELECT DISTINCT paper.paperid FROM author, paper, writes WHERE author.authorname = 'mirella lapata' AND paper.year = 2016 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: mirella lapata 's papers in 2016 ? ### Input: CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE cite (...
Where is the show aired in New Zealand?
CREATE TABLE table_19382 ( "Country" text, "Local Name" text, "Host" text, "Channel" text, "Year Aired" text, "Top Prize" text )
SELECT "Channel" FROM table_19382 WHERE "Country" = 'New Zealand'
Below are sql tables 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 is the show aired in New Zealand? ### Input: CREATE TABLE table_19382 ( "Country" text, "Local Name" text, ...
What is the Standings of Eintracht Braunschweig?
CREATE TABLE table_34964 ( "Season" text, "Champions" text, "Runners-up" text, "Promotion Playoff" text, "Standings" text )
SELECT "Standings" FROM table_34964 WHERE "Champions" = 'eintracht braunschweig'
Below are sql tables 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 Standings of Eintracht Braunschweig? ### Input: CREATE TABLE table_34964 ( "Season" text, "Champions" te...
What is the traditional way to write the name of the district who's area is 2331?
CREATE TABLE table_1300525_1 ( traditional VARCHAR, area VARCHAR )
SELECT traditional FROM table_1300525_1 WHERE area = 2331
Below are sql tables 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 traditional way to write the name of the district who's area is 2331? ### Input: CREATE TABLE table_1300525_1 ( ...
What was the home team's score when the away team scored 16.14 (110)?
CREATE TABLE table_55232 ( "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_55232 WHERE "Away team score" = '16.14 (110)'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the home team's score when the away team scored 16.14 (110)? ### Input: CREATE TABLE table_55232 ( "Home team" ...
what is the maximum hospital cost for a drug with a name called dextrose 50 % (d50w) syringe until 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 MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'dextrose 50 % (d50w) syringe')) AND 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: what is the maximum hospital cost for a drug with a name called dextrose 50 % (d50w) syringe until 2101? ### Input: CREATE T...
what were the allergies patient 030-10559 had since 125 months ago?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-10559')) AND DATETIME(allergy.allergytime) >= 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: what were the allergies patient 030-10559 had since 125 months ago? ### Input: CREATE TABLE vitalperiodic ( vitalperiodi...
what was the name of a drug patient 89202 was first prescribed until 28 months ago?
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 89202) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-28 month') ORDER BY prescriptions.startdate 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 name of a drug patient 89202 was first prescribed until 28 months ago? ### Input: CREATE TABLE icustays ( r...
For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of hire_date and the average of department_id bin hire_date by weekday.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL v...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of hire_date and the average of...
What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.
CREATE TABLE weather ( date VARCHAR, cloud_cover VARCHAR )
SELECT date, cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 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: What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate. ### Input: CREATE TABLE weather ...
Is there going to be an Chinese Art and Religion colloquium this year ?
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE (course.description LIKE '%colloquium%' OR course.name LIKE '%colloquium%') AND (course.description LIKE '%Chinese Art and Religion%' OR course.name LIKE '%Chinese Art and Religion%') AND course.course_id = course_offering.course_id AND semester.semester_...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is there going to be an Chinese Art and Religion colloquium this year ? ### Input: CREATE TABLE ta ( campus_job_id int, ...
Name the sum of total for gold less than 1 and bronze of 3
CREATE TABLE table_name_56 ( total INTEGER, gold VARCHAR, bronze VARCHAR )
SELECT SUM(total) FROM table_name_56 WHERE gold < 1 AND bronze = 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: Name the sum of total for gold less than 1 and bronze of 3 ### Input: CREATE TABLE table_name_56 ( total INTEGER, go...
What was the average week of a game with a result of l 10-7 attended by 37,500?
CREATE TABLE table_name_4 ( week INTEGER, result VARCHAR, attendance VARCHAR )
SELECT AVG(week) FROM table_name_4 WHERE result = "l 10-7" AND attendance < 37 OFFSET 500
Below are sql tables 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 average week of a game with a result of l 10-7 attended by 37,500? ### Input: CREATE TABLE table_name_4 ( w...
Draw a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality.
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, ...
SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality. #...
What was the game record on March 6?
CREATE TABLE table_27721131_10 ( record VARCHAR, date VARCHAR )
SELECT record FROM table_27721131_10 WHERE date = "March 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 was the game record on March 6? ### Input: CREATE TABLE table_27721131_10 ( record VARCHAR, date VARCHAR ) ### ...
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, a line chart shows the trend of salary over hire_date .
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 countries ( COUNT...
SELECT HIRE_DATE, SALARY FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
Below are sql tables 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 ...
how many patients this year have received therapeutic antibacterials within 2 months after receiving glucocorticoid administration?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellv...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'glucocorticoid administration' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIM...
Below are sql tables 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 this year have received therapeutic antibacterials within 2 months after receiving glucocorticoid administ...
What was the average crowd size of games held at Glenferrie Oval?
CREATE TABLE table_name_43 ( crowd INTEGER, venue VARCHAR )
SELECT AVG(crowd) FROM table_name_43 WHERE venue = "glenferrie oval"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the average crowd size of games held at Glenferrie Oval? ### Input: CREATE TABLE table_name_43 ( crowd INTEGER,...
indicate the daily maximum volume of foley cath that patient 021-111547 has had in 12/this year.
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-111547')) AND intakeoutput.celllabel = 'fole...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: indicate the daily maximum volume of foley cath that patient 021-111547 has had in 12/this year. ### Input: CREATE TABLE dia...
Who directed the episode with an audience of 14.11 million?
CREATE TABLE table_29979 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
SELECT "Directed by" FROM table_29979 WHERE "U.S. viewers (million)" = '14.11'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who directed the episode with an audience of 14.11 million? ### Input: CREATE TABLE table_29979 ( "No. in series" real, ...
Who was from Great Britain in lanes under number 3?
CREATE TABLE table_66435 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
SELECT "Name" FROM table_66435 WHERE "Lane" < '3' AND "Nationality" = 'great britain'
Below are sql tables 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 from Great Britain in lanes under number 3? ### Input: CREATE TABLE table_66435 ( "Rank" real, "Lane" real, ...
WHAT IS THE SCORE WITH A WINNER AND OPPONENT BYRON BLACK?
CREATE TABLE table_name_89 ( score VARCHAR, outcome VARCHAR, opponent VARCHAR )
SELECT score FROM table_name_89 WHERE outcome = "winner" AND opponent = "byron black"
Below are sql tables 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 WITH A WINNER AND OPPONENT BYRON BLACK? ### Input: CREATE TABLE table_name_89 ( score VARCHAR, out...
age 50 _ 89 years old
CREATE TABLE table_train_79 ( "id" int, "fasting_triglycerides" int, "fasting_total_cholesterol" int, "fasting_glucose" int, "age" float, "NOUSE" float )
SELECT * FROM table_train_79 WHERE age >= 50 AND age <= 89
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: age 50 _ 89 years old ### Input: CREATE TABLE table_train_79 ( "id" int, "fasting_triglycerides" int, "fasting_t...
how many patients have received a vaccination nec procedure two times the previous year?
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE c...
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 = 'vaccination nec') 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 have received a vaccination nec procedure two times the previous year? ### Input: CREATE TABLE outputevent...
how many patients below the age of 54 had stayed in the hospital for more than 20 days?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE 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.age < "54" AND demographic.days_stay > "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: how many patients below the age of 54 had stayed in the hospital for more than 20 days? ### Input: CREATE TABLE lab ( su...
until 2 years ago what are the top five most common diagnoses that patients were given in the same month after diagnosis of paralysis agitans?
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: until 2 years ago what are the top five most common diagnoses that patients were given in the same month after diagnosis of ...
What is the club had 431 points against them?
CREATE TABLE table_51027 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Bonus Points" text, "Points" text )
SELECT "Club" FROM table_51027 WHERE "Points against" = '431'
Below are sql tables 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 club had 431 points against them? ### Input: CREATE TABLE table_51027 ( "Club" text, "Played" text, ...
what are the four most commonly performed lab tests for patients who have been diagnosed with breast ca previously within 2 months, since 1 year ago?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE a...
SELECT t3.labname FROM (SELECT t2.labname, 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 = 'breast ca' AND DATETIME(diagnosis.diagnosistime) >= ...
Below are sql tables 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 four most commonly performed lab tests for patients who have been diagnosed with breast ca previously within 2 ...
provide the number of patients whose insurance is government and procedure long title is parenteral infusion of concentrated nutritional substances?
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Parenteral infusion of concentrated nutritional substances"
Below are sql tables 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 insurance is government and procedure long title is parenteral infusion of concentrated...
What are the names of all songs produced by the artist with the first name 'Marianne'?
CREATE TABLE vocals ( songid number, bandmate number, type text ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE songs ( songid number, title text ) CREATE TABLE tr...
SELECT T3.title FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T2.firstname = "Marianne"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the names of all songs produced by the artist with the first name 'Marianne'? ### Input: CREATE TABLE vocals ( ...