instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
Which Blagojevich (D) has a Source of zogby/wsj, and a Topinka (R) of 33.2%? | CREATE TABLE table_name_5 (
blagojevich__d_ VARCHAR,
source VARCHAR,
topinka__r_ VARCHAR
) | SELECT blagojevich__d_ FROM table_name_5 WHERE source = "zogby/wsj" AND topinka__r_ = "33.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: Which Blagojevich (D) has a Source of zogby/wsj, and a Topinka (R) of 33.2%? ### Input: CREATE TABLE table_name_5 (
blag... |
What is the Money of the Player with a To par of +3 and Score of 76-69-69-69=283? | CREATE TABLE table_name_67 (
money___ INTEGER,
to_par VARCHAR,
score VARCHAR
) | SELECT MAX(money___) AS $__ FROM table_name_67 WHERE to_par = "+3" AND score = 76 - 69 - 69 - 69 = 283 | Below are sql tables 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 Money of the Player with a To par of +3 and Score of 76-69-69-69=283? ### Input: CREATE TABLE table_name_67 (
... |
what's the record where location attendance is keyarena 13,627 | CREATE TABLE table_11964154_9 (
record VARCHAR,
location_attendance VARCHAR
) | SELECT record FROM table_11964154_9 WHERE location_attendance = "KeyArena 13,627" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what's the record where location attendance is keyarena 13,627 ### Input: CREATE TABLE table_11964154_9 (
record VARCHAR... |
What is the most amount of games played this season? | CREATE TABLE table_28768469_5 (
game INTEGER
) | SELECT MAX(game) FROM table_28768469_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 is the most amount of games played this season? ### Input: CREATE TABLE table_28768469_5 (
game INTEGER
) ### Respo... |
what is diagnoses short title and diagnoses long title of subject id 4342? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "4342" | Below are sql tables 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 diagnoses short title and diagnoses long title of subject id 4342? ### Input: CREATE TABLE procedures (
subject_... |
What is the to par for the United States with a 67-71-73=211 score? | CREATE TABLE table_61597 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "To par" FROM table_61597 WHERE "Country" = 'united states' AND "Score" = '67-71-73=211' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the to par for the United States with a 67-71-73=211 score? ### Input: CREATE TABLE table_61597 (
"Place" text,
... |
Name the rank on channel mooning and crooning | CREATE TABLE table_24222929_4 (
rank_on_channel VARCHAR,
title VARCHAR
) | SELECT rank_on_channel FROM table_24222929_4 WHERE title = "Mooning and Crooning" | Below are sql tables 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 rank on channel mooning and crooning ### Input: CREATE TABLE table_24222929_4 (
rank_on_channel VARCHAR,
ti... |
What is the greatest lost where played is less than 9? | CREATE TABLE table_42900 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | SELECT MAX("Lost") FROM table_42900 WHERE "Played" < '9' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the greatest lost where played is less than 9? ### Input: CREATE TABLE table_42900 (
"Position" real,
"Team"... |
what is the country for rank 6? | CREATE TABLE table_name_3 (
country VARCHAR,
rank VARCHAR
) | SELECT country FROM table_name_3 WHERE rank = 6 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the country for rank 6? ### Input: CREATE TABLE table_name_3 (
country VARCHAR,
rank VARCHAR
) ### Response:... |
What is the Branding of the Frequency owned by Sound of Faith Broadcasting Group? | CREATE TABLE table_name_23 (
branding VARCHAR,
owner VARCHAR
) | SELECT branding FROM table_name_23 WHERE owner = "sound of faith broadcasting group" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Branding of the Frequency owned by Sound of Faith Broadcasting Group? ### Input: CREATE TABLE table_name_23 (
... |
which patients have procedure icd9 code 4041? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "4041" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which patients have procedure icd9 code 4041? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
... |
Return a bar chart showing the number of each company whose office is located in the building, and order in desc by the bar. | CREATE TABLE Office_locations (
building_id int,
company_id int,
move_in_year int
)
CREATE TABLE buildings (
id int,
name text,
City text,
Height int,
Stories int,
Status text
)
CREATE TABLE Companies (
id int,
name text,
Headquarters text,
Industry text,
Sales_... | SELECT T3.name, COUNT(T3.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T3.name ORDER BY T3.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: Return a bar chart showing the number of each company whose office is located in the building, and order in desc by the bar.... |
Can you tell me the Score that has the Team of memphis? | CREATE TABLE table_48287 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Score" FROM table_48287 WHERE "Team" = 'memphis' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the Score that has the Team of memphis? ### Input: CREATE TABLE table_48287 (
"Game" real,
"Date" te... |
provide the number of patients whose marital status is divorced? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" | Below are sql tables 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 marital status is divorced? ### Input: CREATE TABLE diagnoses (
subject_id text,
... |
how many patients whose year of death is less than or equal to 2186 and procedure short title is drsl/dslmb fus post/post? | 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.dod_year <= "2186.0" AND procedures.short_title = "Drsl/dslmb fus post/post" | Below are sql tables 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 year of death is less than or equal to 2186 and procedure short title is drsl/dslmb fus post/post? #... |
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the name , and group by attribute name, and could you display total number in desc order please? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT 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, give me the comparison about the sum of code over the n... |
what was the name of the procedure, which patient 029-30149 was first received since 2101? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-30149')) AND STRFTIME('%y', treatment.treatmenttime) >= '2101... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the procedure, which patient 029-30149 was first received since 2101? ### Input: CREATE TABLE diagnosis... |
What is the highest elevation for the highest point of Schnebelhorn? | CREATE TABLE table_name_7 (
highest_elevation VARCHAR,
highest_point VARCHAR
) | SELECT highest_elevation FROM table_name_7 WHERE highest_point = "schnebelhorn" | Below are sql tables 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 elevation for the highest point of Schnebelhorn? ### Input: CREATE TABLE table_name_7 (
highest_elev... |
number of papers written by lorenzo bruzzone | CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphr... | SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, writes WHERE author.authorname = 'lorenzo bruzzone' AND writes.authorid = author.authorid | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: number of papers written by lorenzo bruzzone ### Input: CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TA... |
Which team has a second qualification time of 1:01.936? | CREATE TABLE table_43615 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" text
) | SELECT "Team" FROM table_43615 WHERE "Qual 2" = '1:01.936' | Below are sql tables 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 team has a second qualification time of 1:01.936? ### Input: CREATE TABLE table_43615 (
"Name" text,
"Team" te... |
Draw a bar chart for what are the names and average prices of products for manufacturers whose products cost on average 150 or more? | 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, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart for what are the names and average prices of products for manufacturers whose products cost on average 150 ... |
What was the record on 12 march 2008? | CREATE TABLE table_11519 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
) | SELECT "Record" FROM table_11519 WHERE "Date" = '12 march 2008' | Below are sql tables 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 on 12 march 2008? ### Input: CREATE TABLE table_11519 (
"Date" text,
"Visitor" text,
"Score"... |
what was the new drug of patient 23436 today compared to that yesterday? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23436) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... | Below are sql tables 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 new drug of patient 23436 today compared to that yesterday? ### Input: CREATE TABLE admissions (
row_id num... |
how many days has elapsed since patient 022-6959 first versed was prescribed in their current hospital encounter? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '022-695... | Below are sql tables 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 has elapsed since patient 022-6959 first versed was prescribed in their current hospital encounter? ### Input:... |
how much is lidocaine 2% costing? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagn... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'lidocaine 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 much is lidocaine 2% costing? ### Input: CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id ... |
Where is Dynamo-2 located? | CREATE TABLE table_name_38 (
location VARCHAR,
team VARCHAR
) | SELECT location FROM table_name_38 WHERE team = "dynamo-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: Where is Dynamo-2 located? ### Input: CREATE TABLE table_name_38 (
location VARCHAR,
team VARCHAR
) ### Response: SE... |
Name the most number in season | CREATE TABLE table_26168687_5 (
no_in_season INTEGER
) | SELECT MIN(no_in_season) FROM table_26168687_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: Name the most number in season ### Input: CREATE TABLE table_26168687_5 (
no_in_season INTEGER
) ### Response: SELECT MI... |
nips papers 2015 | CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE writes (
paperid int,
a... | SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'nips' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: nips papers 2015 ### Input: CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperdataset (
pa... |
what is admission time and discharge time of subject id 18112? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT demographic.admittime, demographic.dischtime FROM demographic WHERE demographic.subject_id = "18112" | Below are sql tables 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 admission time and discharge time of subject id 18112? ### Input: CREATE TABLE procedures (
subject_id text,
... |
What is the 2010 result of a tournament that is A in 2006 and A in 2011? | CREATE TABLE table_67901 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2010" FROM table_67901 WHERE "2011" = 'a' AND "2006" = 'a' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the 2010 result of a tournament that is A in 2006 and A in 2011? ### Input: CREATE TABLE table_67901 (
"Tourname... |
For those employees who did not have any job in the past, give me the comparison about the sum of manager_id over the hire_date bin hire_date by weekday by a bar chart. | 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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS va... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, give me the comparison about the sum of manager_id over the hire_d... |
Can you draw a bar chart to show the number of items in each customer details category? | CREATE TABLE Timed_Status_of_Things (
thing_id INTEGER,
Date_and_Date DATETIME,
Status_of_Thing_Code CHAR(15)
)
CREATE TABLE Customer_Event_Notes (
Customer_Event_Note_ID INTEGER,
Customer_Event_ID INTEGER,
service_type_code CHAR(15),
resident_id INTEGER,
property_id INTEGER,
date_m... | SELECT customer_details, COUNT(customer_details) FROM Customers GROUP BY customer_details | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you draw a bar chart to show the number of items in each customer details category? ### Input: CREATE TABLE Timed_Status... |
what are the four most common medicines that patients were prescribed within the same month after receiving a pulmonary medicine consultation procedure in 2105? | 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 allergy (
allergy... | SELECT t3.drugname FROM (SELECT t2.drugname, 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 = 'pulmonary medicine consultation' 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: what are the four most common medicines that patients were prescribed within the same month after receiving a pulmonary medi... |
What event has a $248,004 prize? | CREATE TABLE table_77006 (
"Date" text,
"City" text,
"Event" text,
"Winner" text,
"Prize" text
) | SELECT "Event" FROM table_77006 WHERE "Prize" = '$248,004' | Below are sql tables 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 event has a $248,004 prize? ### Input: CREATE TABLE table_77006 (
"Date" text,
"City" text,
"Event" text,
... |
Who was the home team in the game played at arden street oval? | CREATE TABLE table_name_42 (
home_team VARCHAR,
venue VARCHAR
) | SELECT home_team AS score FROM table_name_42 WHERE venue = "arden street 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: Who was the home team in the game played at arden street oval? ### Input: CREATE TABLE table_name_42 (
home_team VARCHAR... |
What is the lowest division in the playoffs and did not qualify for the Open Cup in 2002? | CREATE TABLE table_67404 (
"Year" text,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
) | SELECT MIN("Division") FROM table_67404 WHERE "Playoffs" = 'did not qualify' AND "Open Cup" = 'did not qualify' AND "Year" = '2002' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest division in the playoffs and did not qualify for the Open Cup in 2002? ### Input: CREATE TABLE table_6740... |
What was the result in the voting district Kentucky 2? | CREATE TABLE table_1342218_17 (
result VARCHAR,
district VARCHAR
) | SELECT result FROM table_1342218_17 WHERE district = "Kentucky 2" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result in the voting district Kentucky 2? ### Input: CREATE TABLE table_1342218_17 (
result VARCHAR,
di... |
i would like a flight on tuesday which leaves from SAN DIEGO to INDIANAPOLIS INDIANA and that leaves in the afternoon | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
C... | SELECT DISTINCT flight_id FROM flight WHERE (((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 = 22 AND DATE_DAYalias0.month_number = 3 AND DATE_DAYalias0.year = 1991)) AND to... | Below are sql tables 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 a flight on tuesday which leaves from SAN DIEGO to INDIANAPOLIS INDIANA and that leaves in the afternoon ### In... |
on the current hospital encounter did patient 016-18575 excret any chest tube output: l lateral? | 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 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-18575' AND patient.hospitaldischargetime IS NULL)) 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: on the current hospital encounter did patient 016-18575 excret any chest tube output: l lateral? ### Input: CREATE TABLE vit... |
provide the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? maze and year of death is less than or equal to 2115? | 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 WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" 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: provide the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? maz... |
If I do n't want to do a lab , which 400 -level courses should I consider ? | CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational... | SELECT DISTINCT name, number FROM course WHERE department = 'EECS' AND has_lab = 'N' AND number < 400 + 100 AND number >= 400 | Below are sql tables 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 I do n't want to do a lab , which 400 -level courses should I consider ? ### Input: CREATE TABLE area (
course_id int... |
What is the lowest Total for rank 3 with more than 4 gold? | CREATE TABLE table_name_13 (
total INTEGER,
rank VARCHAR,
gold VARCHAR
) | SELECT MIN(total) FROM table_name_13 WHERE rank = "3" AND gold > 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 is the lowest Total for rank 3 with more than 4 gold? ### Input: CREATE TABLE table_name_13 (
total INTEGER,
ra... |
What is the to par of the player from the United States with a t1 place? | CREATE TABLE table_60502 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" text
) | SELECT "To par" FROM table_60502 WHERE "Country" = 'united states' AND "Place" = 't1' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the to par of the player from the United States with a t1 place? ### Input: CREATE TABLE table_60502 (
"Place" t... |
Which Played has a Lost larger than 14, and a Drawn of 10, and Points larger than 46? | CREATE TABLE table_35673 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | SELECT AVG("Played") FROM table_35673 WHERE "Lost" > '14' AND "Drawn" = '10' AND "Points" > '46' | Below are sql tables 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 Played has a Lost larger than 14, and a Drawn of 10, and Points larger than 46? ### Input: CREATE TABLE table_35673 (
... |
Who directed episode 2 of the season? | CREATE TABLE table_27988559_1 (
directed_by VARCHAR,
no_in_season VARCHAR
) | SELECT directed_by FROM table_27988559_1 WHERE no_in_season = 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: Who directed episode 2 of the season? ### Input: CREATE TABLE table_27988559_1 (
directed_by VARCHAR,
no_in_season V... |
Return the number of the claim start date for the claims whose claimed amount is no more than the average, show total number from high to low order. | CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE... | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return the number of the claim start date for the claims whose claimed amount is no more than the average, show total number... |
are there any flights from BOSTON to SAN FRANCISCO with a stopover in DALLAS | 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 flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE days (
days_code varchar,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: are there any flights from BOSTON to SAN FRANCISCO with a stopover in DALLAS ### Input: CREATE TABLE date_day (
month_nu... |
what was the last height of patient 26817 in 10/this year? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,... | SELECT 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 = 26817)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the last height of patient 26817 in 10/this year? ### Input: CREATE TABLE labevents (
row_id number,
subjec... |
What is the score of the game attended by 25,034? | CREATE TABLE table_79963 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Score" FROM table_79963 WHERE "Attendance" = '25,034' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the score of the game attended by 25,034? ### Input: CREATE TABLE table_79963 (
"Date" text,
"Opponent" text... |
What was the label in the region of Canada? | CREATE TABLE table_46824 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Label" FROM table_46824 WHERE "Region" = 'canada' | Below are sql tables 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 label in the region of Canada? ### Input: CREATE TABLE table_46824 (
"Region" text,
"Date" text,
"L... |
count the numbers of patients who died after having been diagnosed with hypoxemia within the same month in 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 patient (
uniquep... | SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypoxemia') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1.diagnosist... | Below are sql tables 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 numbers of patients who died after having been diagnosed with hypoxemia within the same month in 2104. ### Input: ... |
what is the number of patients whose primary disease is upper gi bleed and year of death is less than or equal to 2179? | 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 WHERE demographic.diagnosis = "UPPER GI BLEED" AND demographic.dod_year <= "2179.0" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose primary disease is upper gi bleed and year of death is less than or equal to 2179? ### ... |
Show the booking status code and the corresponding number of bookings Show bar chart, and order in ascending by the Y. | CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
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,
ap... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY COUNT(*) | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the booking status code and the corresponding number of bookings Show bar chart, and order in ascending by the Y. ### I... |
What is the average Year, when Country is 'U.S.', and when Location is 'Edmond , OK'? | CREATE TABLE table_name_28 (
year INTEGER,
country VARCHAR,
location VARCHAR
) | SELECT AVG(year) FROM table_name_28 WHERE country = "u.s." AND location = "edmond , ok" | Below are sql tables 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 Year, when Country is 'U.S.', and when Location is 'Edmond , OK'? ### Input: CREATE TABLE table_name_28 ... |
What was the total viewership for BBC One weekly rankings larger than 7, before episode 4? | CREATE TABLE table_name_30 (
total_viewers VARCHAR,
bbc_one_weekly_ranking VARCHAR,
episode_no VARCHAR
) | SELECT total_viewers FROM table_name_30 WHERE bbc_one_weekly_ranking > 7 AND episode_no < 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 was the total viewership for BBC One weekly rankings larger than 7, before episode 4? ### Input: CREATE TABLE table_nam... |
Which class is easier , EECS 381 or EECS 591 ? | CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program (
program_id int,
name varchar... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 381 OR course.number = 591) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | Below are sql tables 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 class is easier , EECS 381 or EECS 591 ? ### Input: CREATE TABLE jobs (
job_id int,
job_title varchar,
des... |
provide the number of patients whose procedure long title is continuous invasive mechanical ventilation for less than 96 consecutive hours and lab test category is hematology? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Continuous invasive mechanical ventilation for less than 96 consecutive hours" AND lab."CATEGORY" = "Hematol... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose procedure long title is continuous invasive mechanical ventilation for less than 96 con... |
Bar chart x axis acc regular season y axis acc_percent, and show X-axis in descending order. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Regular_Season 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 acc regular season y axis acc_percent, and show X-axis in descending order. ### Input: CREATE TABLE basketb... |
Which nation has 0 golds and more than 1 silver? | CREATE TABLE table_40364 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT "Nation" FROM table_40364 WHERE "Gold" = '0' AND "Silver" > '1' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which nation has 0 golds and more than 1 silver? ### Input: CREATE TABLE table_40364 (
"Rank" text,
"Nation" text,
... |
What is the date of the event with a $322,280 prize? | CREATE TABLE table_name_12 (
date VARCHAR,
prize VARCHAR
) | SELECT date FROM table_name_12 WHERE prize = "$322,280" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the date of the event with a $322,280 prize? ### Input: CREATE TABLE table_name_12 (
date VARCHAR,
prize VAR... |
provide the number of patients whose drug code is rosi8 and lab test fluid is urine? | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ROSI8" AND lab.fluid = "Urine" | Below are sql tables 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 drug code is rosi8 and lab test fluid is urine? ### Input: CREATE TABLE lab (
subje... |
How many of the hispanic or latino/puertorican patients had an influenza virus vaccine? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug = "Influenza Virus Vaccine" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many of the hispanic or latino/puertorican patients had an influenza virus vaccine? ### Input: CREATE TABLE lab (
su... |
What's the time for someone on grid 9? | CREATE TABLE table_51465 (
"Driver" text,
"Constructor" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
) | SELECT "Time/Retired" FROM table_51465 WHERE "Grid" = '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's the time for someone on grid 9? ### Input: CREATE TABLE table_51465 (
"Driver" text,
"Constructor" text,
... |
so whats the last weight of patient 7112 in 12/this year? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event... | SELECT 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 = 7112)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt' ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: so whats the last weight of patient 7112 in 12/this year? ### Input: CREATE TABLE patients (
row_id number,
subject_... |
What is the total attendance in a week greater than 1 with an opponent of Philadelphia Eagles? | CREATE TABLE table_name_92 (
attendance VARCHAR,
week VARCHAR,
opponent VARCHAR
) | SELECT COUNT(attendance) FROM table_name_92 WHERE week > 1 AND opponent = "philadelphia eagles" | Below are sql tables 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 attendance in a week greater than 1 with an opponent of Philadelphia Eagles? ### Input: CREATE TABLE table... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of salary 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(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 ... |
Show me salary by last name in a histogram, list y axis in asc order. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
... | SELECT LAST_NAME, SALARY FROM employees ORDER BY SALARY | Below are sql tables 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 salary by last name in a histogram, list y axis in asc order. ### Input: CREATE TABLE regions (
REGION_ID decima... |
how many airports are there in each country? | CREATE TABLE airport (
country VARCHAR
) | SELECT COUNT(*), country FROM airport 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: how many airports are there in each country? ### Input: CREATE TABLE airport (
country VARCHAR
) ### Response: SELECT CO... |
What is the away team at corio oval? | CREATE TABLE table_12019 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_12019 WHERE "Venue" = 'corio 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 is the away team at corio oval? ### Input: CREATE TABLE table_12019 (
"Home team" text,
"Home team score" text,... |
What is the location code with the most documents? | CREATE TABLE Document_locations (
location_code VARCHAR
) | SELECT location_code FROM Document_locations GROUP BY location_code 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: What is the location code with the most documents? ### Input: CREATE TABLE Document_locations (
location_code VARCHAR
) ... |
what is the number of patients whose admission year is less than 2133 and procedure icd9 code is 4513? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2133" AND procedures.icd9_code = "4513" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose admission year is less than 2133 and procedure icd9 code is 4513? ### Input: CREATE TAB... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of email and department_id , and could you sort by the X-axis in descending? | 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT EMAIL, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about... |
have any organisms been found in the last other microbiology testing of patient 031-3355 since 09/2104? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
... | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND microlab.culturesite = 'other' AND STRFTIME('%y-%m', microlab.... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: have any organisms been found in the last other microbiology testing of patient 031-3355 since 09/2104? ### Input: CREATE TA... |
what album is 5:15 long | CREATE TABLE table_75064 (
"Version" text,
"Length" text,
"Album" text,
"Remixed by" text,
"Year" real
) | SELECT "Version" FROM table_75064 WHERE "Length" = '5:15' | Below are sql tables 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 album is 5:15 long ### Input: CREATE TABLE table_75064 (
"Version" text,
"Length" text,
"Album" text,
"... |
What are the first names of the faculty members playing both Canoeing and Kayaking? | CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room text,
building text
)
CREATE TABLE activity (
actid number,
activity_name text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex... | SELECT T1.lname FROM faculty AS T1 JOIN faculty_participates_in AS T2 ON T1.facid = T2.facid JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM faculty AS T1 JOIN faculty_participates_in AS T2 ON T1.facid = T2.facid JOIN activity AS T3 ON T2.actid = T2.actid WH... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the first names of the faculty members playing both Canoeing and Kayaking? ### Input: CREATE TABLE faculty (
fa... |
Who was the home team at the game that had a crowd of over 24,520? | CREATE TABLE table_name_80 (
home_team VARCHAR,
crowd INTEGER
) | SELECT home_team FROM table_name_80 WHERE crowd > 24 OFFSET 520 | Below are sql tables 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 the game that had a crowd of over 24,520? ### Input: CREATE TABLE table_name_80 (
home_team VAR... |
when did patient 20165 first undergo the procedure until 2100? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20165) AND STRFTIME('%y', procedures_icd.charttime) <= '2100' ORDER BY procedures_icd.charttime LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 20165 first undergo the procedure until 2100? ### Input: CREATE TABLE admissions (
row_id number,
s... |
how many patients were given pericardiocentesis two or more times a year before? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
r... | 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 = 'pericardiocentesis') ... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients were given pericardiocentesis two or more times a year before? ### Input: CREATE TABLE d_icd_diagnoses (
... |
has there been any nasopharynx microbiology test until 2104 for patient 031-16123? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
... | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123')) AND microlab.culturesite = 'nasopharynx' AND STRFTIME('%y', microlab.... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has there been any nasopharynx microbiology test until 2104 for patient 031-16123? ### Input: CREATE TABLE intakeoutput (
... |
are there any AA flights flying into PITTSBURGH between 1200 and 1600 in the afternoon | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TA... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE ((flight.arrival_time <= 1600 AND flight.arrival_time >= 1200) AND city.city_code = airport_service.city_code AND city.city_name = 'PITTSBURGH' AND flight.to_airport = airport_service.airport_code) AND flight.airline_code = 'AA' | Below are sql tables 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 any AA flights flying into PITTSBURGH between 1200 and 1600 in the afternoon ### Input: CREATE TABLE city (
ci... |
Bin the claim date into Year interval and count them for visualizing a bar chart, and could you order by the the number of date claim settled from high to low? | CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed... | SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements ORDER BY COUNT(Date_Claim_Settled) 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: Bin the claim date into Year interval and count them for visualizing a bar chart, and could you order by the the number of d... |
What are the international tourist arrivals in 2010 where change from 2010 to 2011 is +11.2% ? | CREATE TABLE table_14752049_2 (
international_tourist_arrivals__2010_ VARCHAR,
change__2010_to_2011_ VARCHAR
) | SELECT international_tourist_arrivals__2010_ FROM table_14752049_2 WHERE change__2010_to_2011_ = "+11.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 are the international tourist arrivals in 2010 where change from 2010 to 2011 is +11.2% ? ### Input: CREATE TABLE table... |
show me the flights from SAN DIEGO to SAN FRANCISCO on WN | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
... | 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 flights from SAN DIEGO to SAN FRANCISCO on WN ### Input: CREATE TABLE equipment_sequence (
aircraft_code_seq... |
what is the number of patients whose ethnicity is black/african american and procedure icd9 code is 3806? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND procedures.icd9_code = "3806" | Below are sql tables 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 ethnicity is black/african american and procedure icd9 code is 3806? ### Input: CREATE ... |
what is the number of patients who died in or before 2174 and have item id 51360? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2174.0" AND lab.itemid = "51360" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients who died in or before 2174 and have item id 51360? ### Input: CREATE TABLE lab (
subject_... |
What is the maximum number of seasons for any team? | CREATE TABLE table_2522473_1 (
seasons INTEGER
) | SELECT MAX(seasons) FROM table_2522473_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 maximum number of seasons for any team? ### Input: CREATE TABLE table_2522473_1 (
seasons INTEGER
) ### Resp... |
what are the top five most common surgeries of patients 50s until 2101? | 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 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 50 AND 59) AND STRFTIME('%y', treatment.treatmenttime) <= '2101' GROUP BY treatment.... | Below are sql tables 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 top five most common surgeries of patients 50s until 2101? ### Input: CREATE TABLE microlab (
microlabid nu... |
What was the location and attendance on March 9? | CREATE TABLE table_27700530_13 (
location_attendance VARCHAR,
date VARCHAR
) | SELECT location_attendance FROM table_27700530_13 WHERE date = "March 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 location and attendance on March 9? ### Input: CREATE TABLE table_27700530_13 (
location_attendance VARCHAR... |
provide the number of patients whose age is less than 63 and days of hospital stay is greater than 17? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "63" AND demographic.days_stay > "17" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose age is less than 63 and days of hospital stay is greater than 17? ### Input: CREATE TAB... |
How many exhibitions has each artist had. Plot them as bar chart. | 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, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.Artist_ID = T2.Artist_ID GROUP BY T1.Artist_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many exhibitions has each artist had. Plot them as bar chart. ### Input: CREATE TABLE artist (
Artist_ID int,
Na... |
show me the number of patients with a diagnoses icd9 code of 4846 who were hospitalized for more than 15 days. | 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.days_stay > "15" AND diagnoses.icd9_code = "4846" | Below are sql tables 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 number of patients with a diagnoses icd9 code of 4846 who were hospitalized for more than 15 days. ### Input: CR... |
in 2105 what are the four most frequent medications prescribed during the same hospital encounter to the patients of age 50s after being diagnosed with long-term use of insulin? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | SELECT 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: in 2105 what are the four most frequent medications prescribed during the same hospital encounter to the patients of age 50s... |
Average round for 22 pick that is overall smaller than 229? | CREATE TABLE table_50452 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT AVG("Round") FROM table_50452 WHERE "Pick" = '22' AND "Overall" < '229' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Average round for 22 pick that is overall smaller than 229? ### Input: CREATE TABLE table_50452 (
"Round" real,
"Pic... |
Who became the champion for the 1984 Grand Prix where Marty Davis was the runner-up? | CREATE TABLE table_31076 (
"Week of" text,
"Tournament" text,
"Champion" text,
"Runner-up" text,
"Semifinalists" text,
"Quarterfinalists" text
) | SELECT "Champion" FROM table_31076 WHERE "Runner-up" = 'Marty Davis' | Below are sql tables 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 became the champion for the 1984 Grand Prix where Marty Davis was the runner-up? ### Input: CREATE TABLE table_31076 (
... |
A bar chart for how many competitions for each country, and display bars from high to low order. | CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real... | SELECT Country, COUNT(Country) FROM competition GROUP BY Country ORDER BY Country DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart for how many competitions for each country, and display bars from high to low order. ### Input: CREATE TABLE clu... |
how many games did not have at least 15,000 in attendance ? | CREATE TABLE table_204_467 (
id number,
"date" text,
"opponents" text,
"h/a" text,
"result\nf-a" text,
"scorers" text,
"attendance" number
) | SELECT COUNT(*) FROM table_204_467 WHERE "attendance" < 15000 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many games did not have at least 15,000 in attendance ? ### Input: CREATE TABLE table_204_467 (
id number,
"date... |
find the number of elective hospital admission patients with procedure icd9 code 3607. | 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.admission_type = "ELECTIVE" AND procedures.icd9_code = "3607" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of elective hospital admission patients with procedure icd9 code 3607. ### Input: CREATE TABLE procedures (
... |
i would like to fly from DENVER to BOSTON on wednesday the 21 of 4 | 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 21 AND date_day.month_number = 4 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: i would like to fly from DENVER to BOSTON on wednesday the 21 of 4 ### Input: CREATE TABLE aircraft (
aircraft_code varc... |
What years did Dwane Morrison had a pct less than 0.389 and losses less than 12? | CREATE TABLE table_name_11 (
years VARCHAR,
name VARCHAR,
pct VARCHAR,
lost VARCHAR
) | SELECT years FROM table_name_11 WHERE pct < 0.389 AND lost < 12 AND name = "dwane morrison" | Below are sql tables 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 years did Dwane Morrison had a pct less than 0.389 and losses less than 12? ### Input: CREATE TABLE table_name_11 (
... |
What are the number of the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa? | CREATE TABLE film_text (
film_id SMALLINT,
title VARCHAR(255),
description TEXT
)
CREATE TABLE customer (
customer_id SMALLINT UNSIGNED,
store_id TINYINT UNSIGNED,
first_name VARCHAR(45),
last_name VARCHAR(45),
email VARCHAR(50),
address_id SMALLINT UNSIGNED,
active BOOLEAN,
... | SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the number of the payment dates for any payments that have an amount greater than 10 or were handled by a staff mem... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.