instruction
stringlengths
11
303
input
stringlengths
38
5.51k
output
stringlengths
25
1.92k
text
stringlengths
321
6.52k
What was the Result of the game after Week 9 with an Attendance of 69,714?
CREATE TABLE table_48615 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT "Result" FROM table_48615 WHERE "Week" > '9' AND "Attendance" = '69,714'
Below are sql tables 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 Result of the game after Week 9 with an Attendance of 69,714? ### Input: CREATE TABLE table_48615 ( "Week" ...
What is the altitude (or elevation) of the airports in the city of New York? Show me a bar chart, order in ascending by the elevation.
CREATE TABLE airports ( apid integer, name text, city text, country text, x real, y real, elevation bigint, iata character varchar(3), icao character varchar(4) ) CREATE TABLE airlines ( alid integer, name text, iata varchar(2), icao varchar(3), callsign text, ...
SELECT name, elevation FROM airports WHERE city = 'New York' ORDER BY elevation
Below are sql tables 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 altitude (or elevation) of the airports in the city of New York? Show me a bar chart, order in ascending by the ...
i would like to arrange a flight from DENVER to PITTSBURGH
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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i would like to arrange a flight from DENVER to PITTSBURGH ### Input: CREATE TABLE aircraft ( aircraft_code varchar, ...
indicate the daily maximum amount of arterial bp mean for patient 26772 since 06/24/2103.
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE admissions ( ro...
SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26772)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte...
Below are sql tables 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 amount of arterial bp mean for patient 26772 since 06/24/2103. ### Input: CREATE TABLE d_icd_proc...
What is the location and attendance of game 1?
CREATE TABLE table_48454 ( "Game" real, "Date" text, "Team" text, "Score" text, "Location Attendance" text, "Record" text )
SELECT "Location Attendance" FROM table_48454 WHERE "Game" = '1'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the location and attendance of game 1? ### Input: CREATE TABLE table_48454 ( "Game" real, "Date" text, "...
What digital channel corresponds to virtual channel 5.2?
CREATE TABLE table_30608 ( "Callsign" text, "City of license" text, "Virtual channel" text, "Digital channel" text, "Network" text )
SELECT "Digital channel" FROM table_30608 WHERE "Virtual channel" = '5.2'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What digital channel corresponds to virtual channel 5.2? ### Input: CREATE TABLE table_30608 ( "Callsign" text, "Cit...
List the number of enginners and group by last name in a bar chart.
CREATE TABLE Skills_Required_To_Fix ( part_fault_id INTEGER, skill_id INTEGER ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_contract_company_id INTEGER, contract_start_date DATETIME, contract_end_date DATETIME, other_contract_details VARCHAR(255) ) CRE...
SELECT last_name, COUNT(last_name) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY last_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: List the number of enginners and group by last name in a bar chart. ### Input: CREATE TABLE Skills_Required_To_Fix ( par...
what flights from ATLANTA to ST. LOUIS on tuesday arriving around 230pm
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE food_service ( mea...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((flight.arrival_time <= 1500 AND flight.arrival_time >= 1400) AND date_day.day_number = 22 AND date_day.month_number = 3 AND date_day.year = 19...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights from ATLANTA to ST. LOUIS on tuesday arriving around 230pm ### Input: CREATE TABLE code_description ( code ...
How many numbers were recorded under Obama when he had 29.9% voters?
CREATE TABLE table_73221 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real, "Others%" text, "Others#" real )
SELECT COUNT("Obama#") FROM table_73221 WHERE "Obama%" = '29.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: How many numbers were recorded under Obama when he had 29.9% voters? ### Input: CREATE TABLE table_73221 ( "County" text...
what is the first ward for patient 162 since 2 years ago?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d...
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) >= DATETIME(CURRENT_TIME(), '-2 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: what is the first ward for patient 162 since 2 years ago? ### Input: CREATE TABLE chartevents ( row_id number, subje...
How many characteristics does the product named 'laurel' have?
CREATE TABLE product_characteristics ( product_id VARCHAR, characteristic_id VARCHAR ) CREATE TABLE products ( product_id VARCHAR, product_name VARCHAR ) CREATE TABLE CHARACTERISTICS ( characteristic_id VARCHAR )
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel"
Below are sql tables 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 characteristics does the product named 'laurel' have? ### Input: CREATE TABLE product_characteristics ( product...
how many patients having coronary artery disease\coronary artery bypass graft /sda expired in or before the year 2115?
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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND demographic.dod_year <= "2115.0"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients having coronary artery disease\coronary artery bypass graft /sda expired in or before the year 2115? ### I...
what is the drug that patient 033-12085 was prescribed two or more times?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
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 = '033...
Below are sql tables 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 drug that patient 033-12085 was prescribed two or more times? ### Input: CREATE TABLE cost ( costid number, ...
what was the name of the organism found in patient 031-3507's first stool microbiology test since 91 months ago?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( ...
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3507')) AND microlab.culturesite = 'stool' AND DATETIME(microlab.cult...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the organism found in patient 031-3507's first stool microbiology test since 91 months ago? ### Input: ...
show me prices of flights from BALTIMORE to DALLAS
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_lo...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.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 prices of flights from BALTIMORE to DALLAS ### Input: CREATE TABLE code_description ( code varchar, descript...
i need flight information for flights departing from CLEVELAND to MILWAUKEE on wednesday after 1700
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE ground_service ( city_code text, airport_co...
SELECT DISTINCT flight_id FROM flight WHERE (((departure_time > 1700 AND flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 23 AND DATE_DAYalias0.month_number = 4 AND DATE_DAYa...
Below are sql tables 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 flight information for flights departing from CLEVELAND to MILWAUKEE on wednesday after 1700 ### Input: CREATE TABLE ...
What was the record after game 45?
CREATE TABLE table_name_13 ( record VARCHAR, game VARCHAR )
SELECT record FROM table_name_13 WHERE game = "45"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the record after game 45? ### Input: CREATE TABLE table_name_13 ( record VARCHAR, game VARCHAR ) ### Respon...
Are there 16 -credit LATINOAM courses ?
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varc...
SELECT DISTINCT name, number FROM course WHERE department = 'LATINOAM' AND credits = 16
Below are sql tables 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 there 16 -credit LATINOAM courses ? ### Input: CREATE TABLE requirement ( requirement_id int, requirement varcha...
what were the top three commonly used procedures that patients received during the same month after having received a antiviral therapy - ganciclovir procedure since 2104?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( trea...
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiviral therapy - ganciclovir' AND STR...
Below are sql tables 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 top three commonly used procedures that patients received during the same month after having received a antivi...
list possible round trip DAILY flights between BOSTON and OAKLAND
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 = 'OAKLAND' AND NOT fare.round_trip_cost IS NULL 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: list possible round trip DAILY flights between BOSTON and OAKLAND ### Input: CREATE TABLE flight_stop ( flight_id int, ...
what is the amount of nutrition total that patient 035-4428 received on 01/15/last year?
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 intakeoutput ( in...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-4428')) AND intakeoutput.celllabel = 'nutrit...
Below are sql tables 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 nutrition total that patient 035-4428 received on 01/15/last year? ### Input: CREATE TABLE vitalperiod...
Who is the golfer that golfs for Northern Ireland?
CREATE TABLE table_name_54 ( player VARCHAR, country VARCHAR )
SELECT player FROM table_name_54 WHERE country = "northern ireland"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the golfer that golfs for Northern Ireland? ### Input: CREATE TABLE table_name_54 ( player VARCHAR, country V...
Compare the frequency of product names using a bar chart, and display in desc by the X-axis.
CREATE TABLE Addresses ( address_id INTEGER, line_1_number_building VARCHAR(80), city VARCHAR(50), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50) ) CREATE TABLE Customer_Orders ( order_id INTEGER, customer_id INTEGER, order_date DATETIME, order_...
SELECT product_name, COUNT(product_name) FROM Products GROUP BY product_name ORDER BY product_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: Compare the frequency of product names using a bar chart, and display in desc by the X-axis. ### Input: CREATE TABLE Address...
For each film, return the number of cinemas showing the fim in a pie chart.
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE cine...
SELECT Title, COUNT(Title) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Title
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each film, return the number of cinemas showing the fim in a pie chart. ### Input: CREATE TABLE schedule ( Cinema_ID...
Show the draft pick numbers and draft classes of players whose positions are defenders.
CREATE TABLE match_season ( Draft_Pick_Number VARCHAR, Draft_Class VARCHAR, POSITION VARCHAR )
SELECT Draft_Pick_Number, Draft_Class FROM match_season WHERE POSITION = "Defender"
Below are sql tables 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 draft pick numbers and draft classes of players whose positions are defenders. ### Input: CREATE TABLE match_season...
what was the first time patient 013-27480 had been tested for lab tests in 05/2105?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-27480')) AND STRFTIME('%y-%m', lab.labresulttime) = '2105-05' ORDER BY lab.labr...
Below are sql tables 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 first time patient 013-27480 had been tested for lab tests in 05/2105? ### Input: CREATE TABLE allergy ( al...
Round 1 of 71 has how many highest money?
CREATE TABLE table_69470 ( "Year" real, "Round 1" text, "Round 2" text, "Place" real, "Money ($)" real )
SELECT MAX("Money ($)") FROM table_69470 WHERE "Round 1" = '71'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Round 1 of 71 has how many highest money? ### Input: CREATE TABLE table_69470 ( "Year" real, "Round 1" text, "Ro...
okay could you tell me what flight leaves DALLAS to SAN FRANCISCO by UA
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_dista...
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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: okay could you tell me what flight leaves DALLAS to SAN FRANCISCO by UA ### Input: CREATE TABLE date_day ( month_number ...
Which Home team has a Venue of mcg?
CREATE TABLE table_name_32 ( home_team VARCHAR, venue VARCHAR )
SELECT home_team FROM table_name_32 WHERE venue = "mcg"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Home team has a Venue of mcg? ### Input: CREATE TABLE table_name_32 ( home_team VARCHAR, venue VARCHAR ) ### R...
What player has a span of 1997-2009?
CREATE TABLE table_32837 ( "Player" text, "Span" text, "Start" text, "Tries" text, "Conv" text, "Pens" text, "Drop" text, "Lost" text, "Draw" text )
SELECT "Player" FROM table_32837 WHERE "Span" = '1997-2009'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What player has a span of 1997-2009? ### Input: CREATE TABLE table_32837 ( "Player" text, "Span" text, "Start" t...
does patient 95986 had any pacu urine output since 1511 days ago?
CREATE TABLE d_labitems ( row_id number, itemid number, label 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 TABLE diagnoses_icd ( row_id numbe...
SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95986)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'pacu urine' AN...
Below are sql tables 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 95986 had any pacu urine output since 1511 days ago? ### Input: CREATE TABLE d_labitems ( row_id number, ...
get the total amount of .9% normal saline that patient 31510 has received on 05/31/this year.
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, ...
SELECT SUM(inputevents_cv.amount) 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 = 31510)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get the total amount of .9% normal saline that patient 31510 has received on 05/31/this year. ### Input: CREATE TABLE inpute...
What is the name of the place with 582.20 square km area?
CREATE TABLE table_21865 ( "Official Name" text, "Status" text, "Area km 2" text, "Population" real, "Census Ranking" text )
SELECT "Official Name" FROM table_21865 WHERE "Area km 2" = '582.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 is the name of the place with 582.20 square km area? ### Input: CREATE TABLE table_21865 ( "Official Name" text, ...
What is the number of dances for the team that averages 20.6?
CREATE TABLE table_27653 ( "Rank by average" real, "Place" real, "Couple" text, "Total points" real, "Number of dances" real, "Average" text )
SELECT "Number of dances" FROM table_27653 WHERE "Average" = '20.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 number of dances for the team that averages 20.6? ### Input: CREATE TABLE table_27653 ( "Rank by average" re...
calculate the two year survival rate among the patients who were prescribed diltiazem after they were diagnosed with dysarthria.
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost numb...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
Below are sql tables 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 two year survival rate among the patients who were prescribed diltiazem after they were diagnosed with dysarth...
In what language is the Lyrics of the release on August 10, 2005 with Catalog number of TOCP-66427?
CREATE TABLE table_62642 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog number" text, "Lyrics" text )
SELECT "Lyrics" FROM table_62642 WHERE "Date" = 'august 10, 2005' AND "Catalog number" = 'tocp-66427'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what language is the Lyrics of the release on August 10, 2005 with Catalog number of TOCP-66427? ### Input: CREATE TABLE ...
What date did episode 4 in the season originally air?
CREATE TABLE table_29436238_1 ( original_air_date VARCHAR, no_in_season VARCHAR )
SELECT original_air_date FROM table_29436238_1 WHERE no_in_season = 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 date did episode 4 in the season originally air? ### Input: CREATE TABLE table_29436238_1 ( original_air_date VARCH...
What is the total number of games played against the Buffalo Sabres?
CREATE TABLE table_name_65 ( game VARCHAR, opponent VARCHAR )
SELECT COUNT(game) FROM table_name_65 WHERE opponent = "buffalo sabres"
Below are sql tables 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 games played against the Buffalo Sabres? ### Input: CREATE TABLE table_name_65 ( game VARCHA...
how many times is gold more than 0 and the rank less than 2?
CREATE TABLE table_66452 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT COUNT("Silver") FROM table_66452 WHERE "Gold" > '0' AND "Rank" < '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 times is gold more than 0 and the rank less than 2? ### Input: CREATE TABLE table_66452 ( "Rank" real, "Nat...
With a score of 68-85, what is the location and attendance?
CREATE TABLE table_21307 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
SELECT "Location/Attendance" FROM table_21307 WHERE "Score" = '68-85'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: With a score of 68-85, what is the location and attendance? ### Input: CREATE TABLE table_21307 ( "Game" real, "Date...
For all employees who have the letters D or S in their first name, show me the trend about employee_id over hire_date with a line chart.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
Below are sql tables 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, show me the trend about employee_id over hire_date with a...
tell me the total dose of prismasate (b22 k4) prescribed to patient 3403 in 07/this year?
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type t...
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3403) AND prescriptions.drug = 'prismasate (b22 k4)' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 yea...
Below are sql tables 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 total dose of prismasate (b22 k4) prescribed to patient 3403 in 07/this year? ### Input: CREATE TABLE outputeven...
calculate the total of patient 594's input amounts since 01/11/2104.
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 admis...
SELECT SUM(inputevents_cv.amount) 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 = 594)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) >= '2104-01-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: calculate the total of patient 594's input amounts since 01/11/2104. ### Input: CREATE TABLE transfers ( row_id number, ...
tell me the diagnoses icd9 code and type of admission for the patient with patient id 28588.
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT demographic.admission_type, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "28588"
Below are sql tables 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 diagnoses icd9 code and type of admission for the patient with patient id 28588. ### Input: CREATE TABLE diagnos...
What team had a qual 2 time of 58.385?
CREATE TABLE table_34674 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" text, "Best" real )
SELECT "Team" FROM table_34674 WHERE "Qual 2" = '58.385'
Below are sql tables 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 team had a qual 2 time of 58.385? ### Input: CREATE TABLE table_34674 ( "Name" text, "Team" text, "Qual 1" ...
how many patients whose gender is f and drug code is d5lr1000?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "D5LR1000"
Below are sql tables 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 gender is f and drug code is d5lr1000? ### Input: CREATE TABLE procedures ( subject_id text, ...
How many drama workshop groups are there in each city? Return both the city and the count. Plot them as bar chart.
CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15), Workshop_Group_ID INTEGER, Product_Description VARCHAR(255), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Products ( Product_ID VARCHAR(100), ...
SELECT City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town
Below are sql tables 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 drama workshop groups are there in each city? Return both the city and the count. Plot them as bar chart. ### Input...
Please list the proportion number of each winning aircraft.
CREATE TABLE airport_aircraft ( ID int, Airport_ID int, Aircraft_ID int ) CREATE TABLE aircraft ( Aircraft_ID int(11), Aircraft varchar(50), Description varchar(50), Max_Gross_Weight varchar(50), Total_disk_area varchar(50), Max_disk_Loading varchar(50) ) CREATE TABLE match ( R...
SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
Below are sql tables 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 list the proportion number of each winning aircraft. ### Input: CREATE TABLE airport_aircraft ( ID int, Airpo...
What are the dates in which the mean sea level pressure was between 303 and 31, and count them by a bar chart, and order y axis in descending order please.
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE status ( station_i...
SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(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: What are the dates in which the mean sea level pressure was between 303 and 31, and count them by a bar chart, and order y a...
What is the Week number on November 30, 1958 with more than 33,240 in Attendance?
CREATE TABLE table_37509 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT COUNT("Week") FROM table_37509 WHERE "Date" = 'november 30, 1958' AND "Attendance" > '33,240'
Below are sql tables 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 Week number on November 30, 1958 with more than 33,240 in Attendance? ### Input: CREATE TABLE table_37509 ( ...
What is the highest number in series with director as Phil Abraham?
CREATE TABLE table_28975 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
SELECT MAX("No. in series") FROM table_28975 WHERE "Directed by" = 'Phil Abraham'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number in series with director as Phil Abraham? ### Input: CREATE TABLE table_28975 ( "No. in series...
Which side has Orcagna as the inscription?
CREATE TABLE table_8987 ( "Side" text, "Group" text, "Inscription" text, "Official history" text, "Identification" text )
SELECT "Side" FROM table_8987 WHERE "Inscription" = 'orcagna'
Below are sql tables 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 side has Orcagna as the inscription? ### Input: CREATE TABLE table_8987 ( "Side" text, "Group" text, "Insc...
What is the Time/Retired of the Newman-Haas Racing team in under 51 laps?
CREATE TABLE table_40207 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Time/Retired" FROM table_40207 WHERE "Laps" < '51' AND "Team" = 'newman-haas 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 is the Time/Retired of the Newman-Haas Racing team in under 51 laps? ### Input: CREATE TABLE table_40207 ( "Driver"...
How many Picks have a Round larger than 2, and a Name of lawrence sidbury, and an Overall smaller than 125?
CREATE TABLE table_name_69 ( pick__number VARCHAR, overall VARCHAR, round VARCHAR, name VARCHAR )
SELECT COUNT(pick__number) FROM table_name_69 WHERE round > 2 AND name = "lawrence sidbury" AND overall < 125
Below are sql tables 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 Picks have a Round larger than 2, and a Name of lawrence sidbury, and an Overall smaller than 125? ### Input: CREAT...
for patients who were diagnosed with chr airway obstruct nec until 2104, what are the top four most commonly prescribed drugs that followed afterwards within the same hospital visit to the male patients aged 40s?
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_...
Below are sql tables 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 patients who were diagnosed with chr airway obstruct nec until 2104, what are the top four most commonly prescribed drug...
what are the flights from DENVER to BALTIMORE on 8 10
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost 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 = 'BALTIMORE' AND date_day.day_number = 10 AND date_day.month_number = 8 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: what are the flights from DENVER to BALTIMORE on 8 10 ### Input: CREATE TABLE date_day ( month_number int, day_numbe...
Find the payment method that is used most frequently.
CREATE TABLE customer_addresses ( customer_id number, address_id number, date_address_from time, address_type text, date_address_to time ) CREATE TABLE products ( product_id number, product_details text ) CREATE TABLE customer_contact_channels ( customer_id number, channel_code tex...
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the payment method that is used most frequently. ### Input: CREATE TABLE customer_addresses ( customer_id number, ...
Compare the total number of competitions for each country.
CREATE TABLE club ( Club_ID int, name text, Region text, Start_year text ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_type text, Country text ) CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Club_ID_2 int, Score text ) C...
SELECT Country, COUNT(Country) FROM competition GROUP BY Country
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Compare the total number of competitions for each country. ### Input: CREATE TABLE club ( Club_ID int, name text, ...
How many people were in the crowd when the home team scored 31.9 (195)?
CREATE TABLE table_53447 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT COUNT("Crowd") FROM table_53447 WHERE "Home team score" = '31.9 (195)'
Below are sql tables 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 in the crowd when the home team scored 31.9 (195)? ### Input: CREATE TABLE table_53447 ( "Home team...
count the number of patients who have drug code warf1 and are less than 55 years of age.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "55" AND prescriptions.formulary_drug_cd = "WARF1"
Below are sql tables 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 who have drug code warf1 and are less than 55 years of age. ### Input: CREATE TABLE lab ( s...
what morning flights do you have between OAKLAND and DENVER
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE compartment_class ( compartment varchar, ...
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 = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVE...
Below are sql tables 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 morning flights do you have between OAKLAND and DENVER ### Input: CREATE TABLE dual_carrier ( main_airline varchar,...
Find All_Home and Team_ID , and group by attribute ACC_Home, and visualize them by a bar chart, and display in asc by the x-axis.
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Home, Team_ID FROM basketball_match GROUP BY ACC_Home, 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: Find All_Home and Team_ID , and group by attribute ACC_Home, and visualize them by a bar chart, and display in asc by the x-...
What is the nationality of the guard who played for Florida International?
CREATE TABLE table_name_53 ( nationality VARCHAR, position VARCHAR, school_club_team VARCHAR )
SELECT nationality FROM table_name_53 WHERE position = "guard" AND school_club_team = "florida international"
Below are sql tables 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 nationality of the guard who played for Florida International? ### Input: CREATE TABLE table_name_53 ( natio...
give me the number of patients whose ethnicity is hispanic or latino and lab test name is calculated total co2?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND lab.label = "Calculated Total CO2"
Below are sql tables 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 ethnicity is hispanic or latino and lab test name is calculated total co2? ### Input: C...
show me the WN flights from SAN DIEGO to SAN FRANCISCO
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE airport_servic...
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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the WN flights from SAN DIEGO to SAN FRANCISCO ### Input: CREATE TABLE month ( month_number int, month_name ...
Last time she taught it , did Prof. Mijin Yoon set an exam for 181 ?
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE semester ( semester_id int, ...
SELECT DISTINCT course_offering.has_final_exam FROM course_offering INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHER...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Last time she taught it , did Prof. Mijin Yoon set an exam for 181 ? ### Input: CREATE TABLE instructor ( instructor_id ...
CO on saturday from CHICAGO to SEATTLE
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREAT...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEATTLE' AND CITY_1.state_code = 'state_code0' AND date_day.day_number =...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: CO on saturday from CHICAGO to SEATTLE ### Input: CREATE TABLE state ( state_code text, state_name text, country...
What is the Result of the 2013 (86th) Ceremony?
CREATE TABLE table_42396 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text )
SELECT "Result" FROM table_42396 WHERE "Year (Ceremony)" = '2013 (86th)'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Result of the 2013 (86th) Ceremony? ### Input: CREATE TABLE table_42396 ( "Year (Ceremony)" text, "Film ...
Show me about the distribution of meter_200 and the average of meter_100 , and group by attribute meter_200 in a bar chart, and could you show mean meter 100 from low to high order?
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimme...
SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY AVG(meter_100)
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show me about the distribution of meter_200 and the average of meter_100 , and group by attribute meter_200 in a bar chart, ...
What was the attendance on week 12?
CREATE TABLE table_10609 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Channel" text, "Attendance" text )
SELECT "Attendance" FROM table_10609 WHERE "Week" = '12'
Below are sql tables 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 attendance on week 12? ### Input: CREATE TABLE table_10609 ( "Week" text, "Date" text, "Opponent" t...
what is the name of the venue where the last competition was played ?
CREATE TABLE table_203_6 ( id number, "#" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text )
SELECT "venue" FROM table_203_6 ORDER BY id DESC LIMIT 1
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the name of the venue where the last competition was played ? ### Input: CREATE TABLE table_203_6 ( id number, ...
For those records from the products and each product's manufacturer, show me about the distribution of name and the average of code , and group by attribute name in a bar chart, and I want to show by the y-axis in descending 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 T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.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, show me about the distribution of name and the average ...
what is insurance and ethnicity of subject id 21796?
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 demographic.insurance, demographic.ethnicity 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 insurance and ethnicity of subject id 21796? ### Input: CREATE TABLE prescriptions ( subject_id text, hadm_i...
What is the Rating/Share (18-49) that also has a Share greater than 10 and 12.42 million Viewers?
CREATE TABLE table_44988 ( "Rating" real, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" real, "Rank (Overall)" text )
SELECT "Rating/Share (18-49)" FROM table_44988 WHERE "Share" > '10' AND "Viewers (millions)" = '12.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 Rating/Share (18-49) that also has a Share greater than 10 and 12.42 million Viewers? ### Input: CREATE TABLE ta...
Name the party with edward boland
CREATE TABLE table_18398 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Party" FROM table_18398 WHERE "Incumbent" = 'Edward Boland'
Below are sql tables 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 party with edward boland ### Input: CREATE TABLE table_18398 ( "District" text, "Incumbent" text, "Part...
What is the sum of the episodes where chip esten was the 4th performer and jim meskimen was the 1st performer?
CREATE TABLE table_34322 ( "Date" text, "Episode" real, "Performer 1" text, "Performer 2" text, "Performer 3" text, "Performer 4" text )
SELECT SUM("Episode") FROM table_34322 WHERE "Performer 4" = 'chip esten' AND "Performer 1" = 'jim meskimen'
Below are sql tables 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 sum of the episodes where chip esten was the 4th performer and jim meskimen was the 1st performer? ### Input: CR...
count the number of patients who are aged less than 36 years with a lab test named albumin, body fluid
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "36" AND lab.label = "Albumin, Body Fluid"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients who are aged less than 36 years with a lab test named albumin, body fluid ### Input: CREATE TAB...
Who was second when Martynas Norkus was the skip?
CREATE TABLE table_35946 ( "Nation" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
SELECT "Second" FROM table_35946 WHERE "Skip" = 'martynas norkus'
Below are sql tables 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 second when Martynas Norkus was the skip? ### Input: CREATE TABLE table_35946 ( "Nation" text, "Skip" text, ...
how many patients whose age is less than 48 and drug route is sl?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "48" AND prescriptions.route = "SL"
Below are sql tables 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 age is less than 48 and drug route is sl? ### Input: CREATE TABLE lab ( subject_id text, had...
what is the number of patients whose admission year is before 2137 with procedure icd9 code 3972?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2137" AND procedures.icd9_code = "3972"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose admission year is before 2137 with procedure icd9 code 3972? ### Input: CREATE TABLE la...
Who has a home team score of 13.16 (94)?
CREATE TABLE table_57404 ( "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_57404 WHERE "Home team score" = '13.16 (94)'
Below are sql tables 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 home team score of 13.16 (94)? ### Input: CREATE TABLE table_57404 ( "Home team" text, "Home team score" t...
What is the sum of grid values of driver Michael Schumacher with lap counts larger than 66?
CREATE TABLE table_name_7 ( grid INTEGER, laps VARCHAR, driver VARCHAR )
SELECT SUM(grid) FROM table_name_7 WHERE laps > 66 AND driver = "michael schumacher"
Below are sql tables 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 sum of grid values of driver Michael Schumacher with lap counts larger than 66? ### Input: CREATE TABLE table_na...
Plot how many party by grouped by party as a bar graph, could you rank by the total number from low to high?
CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real ) CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text )
SELECT Party, COUNT(Party) FROM representative GROUP BY Party ORDER BY COUNT(Party)
Below are sql tables 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 how many party by grouped by party as a bar graph, could you rank by the total number from low to high? ### Input: CREA...
Which directors had a movie in either 1999 or 2000, and count them by a bar chart, show by the Y in desc.
CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text, movie_id text ) CREATE TABLE book_club ( book_club_id int, Year int, Author_or_Editor text, Book_Title text, Publisher text, Category tex...
SELECT Director, COUNT(Director) FROM movie WHERE Year = 1999 OR Year = 2000 GROUP BY Director ORDER BY COUNT(Director) 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: Which directors had a movie in either 1999 or 2000, and count them by a bar chart, show by the Y in desc. ### Input: CREATE ...
in 12/this year when was the last lab test of patient 006-124193?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid num...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-124193')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_T...
Below are sql tables 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 12/this year when was the last lab test of patient 006-124193? ### Input: CREATE TABLE microlab ( microlabid number, ...
What was the location attendance on January 19?
CREATE TABLE table_48517 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Location Attendance" FROM table_48517 WHERE "Date" = 'january 19'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the location attendance on January 19? ### Input: CREATE TABLE table_48517 ( "Game" real, "Date" text, ...
what is the least laps for driver gerhard berger with a grid more than 6?
CREATE TABLE table_10669 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT MIN("Laps") FROM table_10669 WHERE "Driver" = 'gerhard berger' AND "Grid" > '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 least laps for driver gerhard berger with a grid more than 6? ### Input: CREATE TABLE table_10669 ( "Driver"...
How many patients under 77 years of age had a renal epithelial cells lab test done?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "77" AND lab.label = "Renal Epithelial Cells"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many patients under 77 years of age had a renal epithelial cells lab test done? ### Input: CREATE TABLE diagnoses ( ...
Name the type that joined 2007
CREATE TABLE table_262560_1 ( type VARCHAR, joined VARCHAR )
SELECT type FROM table_262560_1 WHERE joined = 2007
Below are sql tables 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 type that joined 2007 ### Input: CREATE TABLE table_262560_1 ( type VARCHAR, joined VARCHAR ) ### Response:...
tell me what are the five most common diagnoses of patients in the 40s in this year?
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN...
Below are sql tables 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 what are the five most common diagnoses of patients in the 40s in this year? ### Input: CREATE TABLE procedures_icd ...
Which To par is the lowest one that has a Year(s) won of 1962, 1967, 1972, 1980, and a Total larger than 149?
CREATE TABLE table_name_90 ( to_par INTEGER, year_s__won VARCHAR, total VARCHAR )
SELECT MIN(to_par) FROM table_name_90 WHERE year_s__won = "1962, 1967, 1972, 1980" AND total > 149
Below are sql tables 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 To par is the lowest one that has a Year(s) won of 1962, 1967, 1972, 1980, and a Total larger than 149? ### Input: CRE...
give me the number of patients whose gender is f and drug code is trif12.5i?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "TRIF12.5I"
Below are sql tables 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 gender is f and drug code is trif12.5i? ### Input: CREATE TABLE diagnoses ( subject...
What is the avarage Attendance for the Date of october 26, 1947?
CREATE TABLE table_51778 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT AVG("Attendance") FROM table_51778 WHERE "Date" = 'october 26, 1947'
Below are sql tables 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 avarage Attendance for the Date of october 26, 1947? ### Input: CREATE TABLE table_51778 ( "Week" real, ...
What player scored 73-68-66=207?
CREATE TABLE table_name_78 ( player VARCHAR, score VARCHAR )
SELECT player FROM table_name_78 WHERE score = 73 - 68 - 66 = 207
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What player scored 73-68-66=207? ### Input: CREATE TABLE table_name_78 ( player VARCHAR, score VARCHAR ) ### Respons...
what time is the first time patient 006-167444 was prescribed a medicine via intravenous route until 64 months ago?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-167444')) AND medication.routeadmin = 'intravenous' AND DA...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what time is the first time patient 006-167444 was prescribed a medicine via intravenous route until 64 months ago? ### Inpu...
Bar chart x axis carrier y axis the number of carrier, sort in desc by the total number.
CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stoc...
SELECT Carrier, COUNT(Carrier) FROM phone GROUP BY Carrier ORDER BY COUNT(Carrier) DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar chart x axis carrier y axis the number of carrier, sort in desc by the total number. ### Input: CREATE TABLE market ( ...
Get User ID from Display Name. Look up your User ID (for use in other queries) based upon your Display Name
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description t...
SELECT Id FROM Users WHERE DisplayName = '##DisplayName##'
Below are sql tables 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 User ID from Display Name. Look up your User ID (for use in other queries) based upon your Display Name ### Input: CREAT...
For all employees who have the letters D or S in their first name, draw a line chart about the change of employee_id over hire_date , and list in desc by the x axis please.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE T...
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_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: For all employees who have the letters D or S in their first name, draw a line chart about the change of employee_id over hi...
how many days have passed since patient 015-59552 was admitted in a hospital?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '015-59552' AND 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: how many days have passed since patient 015-59552 was admitted in a hospital? ### Input: CREATE TABLE lab ( labid number...
Give me a histogram for how many drama workshop groups are there in each city? Return both the city and the count, could you order by the x axis in descending?
CREATE TABLE Invoices ( Invoice_ID INTEGER, Order_ID INTEGER, payment_method_code CHAR(15), Product_ID INTEGER, Order_Quantity VARCHAR(288), Other_Item_Details VARCHAR(255), Order_Item_ID INTEGER ) CREATE TABLE Invoice_Items ( Invoice_Item_ID INTEGER, Invoice_ID INTEGER, Order_I...
SELECT City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town ORDER BY City_Town DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a histogram for how many drama workshop groups are there in each city? Return both the city and the count, could you...