instruction stringlengths 11 303 | input stringlengths 38 5.51k | output stringlengths 25 1.92k | text stringlengths 321 6.52k |
|---|---|---|---|
What is the time/retired of the team with a grid of 14? | CREATE TABLE table_37672 (
"Driver" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
) | SELECT "Time/Retired" FROM table_37672 WHERE "Grid" = '14' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the time/retired of the team with a grid of 14? ### Input: CREATE TABLE table_37672 (
"Driver" text,
"Team" ... |
what is the total minimum cost of a hospital that includes a drug called d5lr during the last year? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'd5lr') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY cost.hadm_id) AS 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 total minimum cost of a hospital that includes a drug called d5lr during the last year? ### Input: CREATE TABLE ... |
How many papers has david blei published in nips ? | CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpa... | SELECT DISTINCT COUNT(paper.paperid) FROM author, paper, venue, writes WHERE author.authorname = 'david blei' AND venue.venueid = paper.venueid AND venue.venuename = 'nips' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many papers has david blei published in nips ? ### Input: CREATE TABLE paperdataset (
paperid int,
datasetid int... |
what are the four most common drugs prescribed to the cardiomyopathy - dilated male patients of the 30s in the same month after they were diagnosed with cardiomyopathy - dilated since 2102? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardiomyopathy - dilated' AND STRFTIME('%y', diagn... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the four most common drugs prescribed to the cardiomyopathy - dilated male patients of the 30s in the same month af... |
What is title of episode 06-02-406? | CREATE TABLE table_22604 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | SELECT "Title" FROM table_22604 WHERE "Production code" = '06-02-406' | Below are sql tables 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 title of episode 06-02-406? ### Input: CREATE TABLE table_22604 (
"No. in series" real,
"No. in season" real... |
What is the Name of the person from the Netherlands in a Lane lower than 5, with a Rank better than 5, and a time of less than 55.62? | CREATE TABLE table_71937 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
) | SELECT "Name" FROM table_71937 WHERE "Rank" < '5' AND "Time" < '55.62' AND "Lane" < '5' AND "Nationality" = 'netherlands' | Below are sql tables 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 person from the Netherlands in a Lane lower than 5, with a Rank better than 5, and a time of less th... |
Draw a scatter chart about the correlation between author_id and author_tutor_ATB . | CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
fam... | SELECT author_id, author_tutor_ATB FROM Course_Authors_and_Tutors ORDER BY personal_name | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a scatter chart about the correlation between author_id and author_tutor_ATB . ### Input: CREATE TABLE Subjects (
s... |
What format has 080 360-2 as the catalog? | CREATE TABLE table_name_84 (
format VARCHAR,
catalog VARCHAR
) | SELECT format FROM table_name_84 WHERE catalog = "080 360-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 format has 080 360-2 as the catalog? ### Input: CREATE TABLE table_name_84 (
format VARCHAR,
catalog VARCHAR
) ... |
show me all flights from INDIANAPOLIS | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'INDIANAPOLIS' AND flight.from_airport = airport_service.airport_code | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me all flights from INDIANAPOLIS ### Input: CREATE TABLE restriction (
restriction_code text,
advance_purchase ... |
How many tourist attractions for each attraction name? Visualize by a bar chart. | CREATE TABLE Visitors (
Tourist_ID INTEGER,
Tourist_Details VARCHAR(255)
)
CREATE TABLE Museums (
Museum_ID INTEGER,
Museum_Details VARCHAR(255)
)
CREATE TABLE Street_Markets (
Market_ID INTEGER,
Market_Details VARCHAR(255)
)
CREATE TABLE Theme_Parks (
Theme_Park_ID INTEGER,
Theme_Par... | SELECT Name, COUNT(*) FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_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 tourist attractions for each attraction name? Visualize by a bar chart. ### Input: CREATE TABLE Visitors (
Tour... |
what is the number of patients with a personal history of antineoplastic chemotherapy diagnoses who have been admitted to the hospital on an emergency basis? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Personal history of antineoplastic chemotherapy" | Below are sql tables 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 with a personal history of antineoplastic chemotherapy diagnoses who have been admitted to th... |
Who became the champion for the 1984 Grand Prix where Marty Davis was the runner-up? | CREATE TABLE table_29295463_9 (
champion VARCHAR,
runner_up VARCHAR
) | SELECT champion FROM table_29295463_9 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_29295463_... |
How many people were in attendance on March 4? | CREATE TABLE table_11881 (
"Date" text,
"Opponent" text,
"Score" text,
"Site/Stadium" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Attendance" FROM table_11881 WHERE "Date" = 'march 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: How many people were in attendance on March 4? ### Input: CREATE TABLE table_11881 (
"Date" text,
"Opponent" text,
... |
How many characteristics does the product named 'laurel' have? | CREATE TABLE ref_characteristic_types (
characteristic_type_code text,
characteristic_type_description text
)
CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic_value text
)
CREATE TABLE ref_product_categories (
product_category_code text... | 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 ref_characteristic_types (
charac... |
what was the first time that patient 016-9636 had a minimum sao2 today? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND NOT vitalperiodic.sao2 IS NULL 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 was the first time that patient 016-9636 had a minimum sao2 today? ### Input: CREATE TABLE cost (
costid number,
... |
Top Users From The Philippines. | CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%philippines%' ORDER BY Reputation DESC LIMIT 200 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top Users From The Philippines. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,... |
The highest draws with smaller than 9 played? | CREATE TABLE table_name_32 (
draws INTEGER,
played INTEGER
) | SELECT MAX(draws) FROM table_name_32 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: The highest draws with smaller than 9 played? ### Input: CREATE TABLE table_name_32 (
draws INTEGER,
played INTEGER
... |
What is Position, when School/Club Team is McMaster? | CREATE TABLE table_48609 (
"Round" real,
"Pick" text,
"Player" text,
"Position" text,
"School/Club Team" text
) | SELECT "Position" FROM table_48609 WHERE "School/Club Team" = 'mcmaster' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Position, when School/Club Team is McMaster? ### Input: CREATE TABLE table_48609 (
"Round" real,
"Pick" text... |
What is the number of each allergie type that the student with first name Lisa has? Visualize by bar chart, display bar in asc order. | CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER... | SELECT AllergyType, COUNT(AllergyType) FROM Allergy_Type AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" GROUP BY AllergyType ORDER BY AllergyType | Below are sql tables 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 each allergie type that the student with first name Lisa has? Visualize by bar chart, display bar in a... |
What number is Andrea Bargnani? | CREATE TABLE table_12962773_15 (
no INTEGER,
player VARCHAR
) | SELECT MAX(no) FROM table_12962773_15 WHERE player = "Andrea Bargnani" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What number is Andrea Bargnani? ### Input: CREATE TABLE table_12962773_15 (
no INTEGER,
player VARCHAR
) ### Respons... |
How many semesters has Prof. Kartik Prasanna taught 724 ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar... | SELECT COUNT(*) FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number = 724 AND instructor.name LIKE '%Kartik Prasanna%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.off... | Below are sql tables 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 semesters has Prof. Kartik Prasanna taught 724 ? ### Input: CREATE TABLE comment_instructor (
instructor_id int... |
What was the record on September 26? | CREATE TABLE table_69540 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | SELECT "Record" FROM table_69540 WHERE "Date" = 'september 26' | Below are sql tables 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 September 26? ### Input: CREATE TABLE table_69540 (
"Date" text,
"Opponent" text,
"Score"... |
Who wrote the episode with 7.52 million US viewers? | CREATE TABLE table_28688313_1 (
written_by VARCHAR,
us_viewers__in_millions_ VARCHAR
) | SELECT written_by FROM table_28688313_1 WHERE us_viewers__in_millions_ = "7.52" | Below are sql tables 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 wrote the episode with 7.52 million US viewers? ### Input: CREATE TABLE table_28688313_1 (
written_by VARCHAR,
u... |
What year was Luis Gutierrez election | CREATE TABLE table_18106 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
) | SELECT MIN("First elected") FROM table_18106 WHERE "Incumbent" = 'Luis Gutierrez' | Below are sql tables 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 year was Luis Gutierrez election ### Input: CREATE TABLE table_18106 (
"District" text,
"Incumbent" text,
"... |
how many patients are diagnosed for perforation of intestine and administered through si drug route? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Perforation of intestine" 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 are diagnosed for perforation of intestine and administered through si drug route? ### Input: CREATE TABLE... |
Who is the home side when geelong is the away side? | CREATE TABLE table_name_80 (
home_team VARCHAR,
away_team VARCHAR
) | SELECT home_team FROM table_name_80 WHERE away_team = "geelong" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the home side when geelong is the away side? ### Input: CREATE TABLE table_name_80 (
home_team VARCHAR,
away_... |
Are there any Ancient Civilizations and Biblical Studies courses which have no prerequisites ? | CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructo... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Ancient Civilizations and Biblical Studies%' OR course.description LIKE '%Ancient Civilizations and Biblical Studies%' OR course.name LIKE '%Ancient Civilizations and Bi... | Below are sql tables 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 Ancient Civilizations and Biblical Studies courses which have no prerequisites ? ### Input: CREATE TABLE gsi (... |
What is the total number of Goals For, when Losses is greater than 16? | CREATE TABLE table_12549 (
"Position" real,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT COUNT("Goals for") FROM table_12549 WHERE "Losses" > '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: What is the total number of Goals For, when Losses is greater than 16? ### Input: CREATE TABLE table_12549 (
"Position" ... |
Give me the comparison about ID over the meter_700 , and order by the bar from low to high. | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | SELECT meter_700, ID FROM swimmer ORDER BY meter_700 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the comparison about ID over the meter_700 , and order by the bar from low to high. ### Input: CREATE TABLE record (... |
Create a bar chart showing school_id across all neutral, and show by the y axis in asc. | 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_Neutral, School_ID FROM basketball_match ORDER BY School_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: Create a bar chart showing school_id across all neutral, and show by the y axis in asc. ### Input: CREATE TABLE basketball_m... |
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id and the average of manager_id , and group by attribute job_id, order in asc by the JOB_ID. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id an... |
give me the number of patients whose discharge location is home health care and procedure icd9 code is 9961? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.icd9_code = "9961" | Below are sql tables 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 discharge location is home health care and procedure icd9 code is 9961? ### Input: CREA... |
When will they be offering Latin American Society and Culture ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... | Below are sql tables 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 will they be offering Latin American Society and Culture ? ### Input: CREATE TABLE program (
program_id int,
na... |
Which team scored 14.14 (98) at an away game? | CREATE TABLE table_52293 (
"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_52293 WHERE "Away team score" = '14.14 (98)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which team scored 14.14 (98) at an away game? ### Input: CREATE TABLE table_52293 (
"Home team" text,
"Home team sco... |
how many days has it been since the last stay of patient 9566 in the ward 14 during the current hospital encounter? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9566 AND admissions.dischtime IS NULL)) AND transfers.w... | Below are sql tables 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 it been since the last stay of patient 9566 in the ward 14 during the current hospital encounter? ### Inpu... |
Which home team was playing on January 13? | CREATE TABLE table_36931 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
) | SELECT "Home" FROM table_36931 WHERE "Date" = 'january 13' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which home team was playing on January 13? ### Input: CREATE TABLE table_36931 (
"Date" text,
"Visitor" text,
"S... |
for how many years was the encyclopedia printed ? | CREATE TABLE table_204_843 (
id number,
"volume" number,
"year" text,
"names" text,
"articles" number,
"pages" number,
"images" number,
"maps" number,
"number of copies" number
) | SELECT COUNT("year") FROM table_204_843 | Below are sql tables 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 how many years was the encyclopedia printed ? ### Input: CREATE TABLE table_204_843 (
id number,
"volume" number... |
since 1 year ago, what were the top three most frequent procedures that patients were given within 2 months after the diagnosis of hpt c w/o hepat coma nos. | 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 1 year ago, what were the top three most frequent procedures that patients were given within 2 months after the diagno... |
what is the cheapest flight from BOSTON to SAN FRANCISCO | CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code 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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_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 cheapest flight from BOSTON to SAN FRANCISCO ### Input: CREATE TABLE flight_leg (
flight_id int,
leg_num... |
provide the number of patients less than 80 years who are taking cefpodoxime proxetil medication. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "80" AND prescriptions.drug = "Cefpodoxime Proxetil" | Below are sql tables 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 less than 80 years who are taking cefpodoxime proxetil medication. ### Input: CREATE TABLE pr... |
Am I able to take 400 -level classes in Fall or Winter term ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credi... | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE ((SEM... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Am I able to take 400 -level classes in Fall or Winter term ? ### Input: CREATE TABLE instructor (
instructor_id int,
... |
how many guards were picked ? | CREATE TABLE table_203_815 (
id number,
"pick #" number,
"nfl team" text,
"player" text,
"position" text,
"college" text
) | SELECT COUNT(*) FROM table_203_815 WHERE "position" = 'guard' | Below are sql tables 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 guards were picked ? ### Input: CREATE TABLE table_203_815 (
id number,
"pick #" number,
"nfl team" tex... |
Give me a histogram for what are the different names and credit scores of customers who have taken a loan? | CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state ... | SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a histogram for what are the different names and credit scores of customers who have taken a loan? ### Input: CREATE... |
how many patients have drug code morp0.5-4? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "MORP0.5-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: how many patients have drug code morp0.5-4? ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
i... |
Who had the most assist when the opponent was Cleveland? | CREATE TABLE table_15780049_6 (
high_assists VARCHAR,
team VARCHAR
) | SELECT high_assists FROM table_15780049_6 WHERE team = "Cleveland" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who had the most assist when the opponent was Cleveland? ### Input: CREATE TABLE table_15780049_6 (
high_assists VARCHAR... |
A bar chart shows the distribution of Sex and the sum of Weight , and group by attribute Sex, could you list X-axis from low to high order? | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY Sex | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart shows the distribution of Sex and the sum of Weight , and group by attribute Sex, could you list X-axis from low... |
Who is the advisor of Linda Smith? Give me the first name and last name. | CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE faculty_participates_in (
facid number,
actid number
)
CREATE TABLE participates_in (
stuid number,
actid number
)
CREATE TABL... | SELECT T1.fname, T1.lname FROM faculty AS T1 JOIN student AS T2 ON T1.facid = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith" | Below are sql tables 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 advisor of Linda Smith? Give me the first name and last name. ### Input: CREATE TABLE student (
stuid number,... |
find out the number of patients with stemi primary disese who were admitted in hospital before 2155. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "STEMI" AND demographic.admityear < "2155" | Below are sql tables 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 out the number of patients with stemi primary disese who were admitted in hospital before 2155. ### Input: CREATE TABLE... |
i would like to make a one way flight from BOSTON to ATLANTA | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufac... | 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 = 'ATLANTA' AND fare.round_trip_required = 'NO' AND flight_fare.fare_id =... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i would like to make a one way flight from BOSTON to ATLANTA ### Input: CREATE TABLE restriction (
restriction_code text... |
How many faculty members does each building have? List the result with the name of the building. | CREATE TABLE participates_in (
stuid number,
actid number
)
CREATE TABLE activity (
actid number,
activity_name text
)
CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room text,
building text
)
CREATE TABLE student (
... | SELECT building, COUNT(*) FROM faculty GROUP BY building | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many faculty members does each building have? List the result with the name of the building. ### Input: CREATE TABLE par... |
what are the two year survival rates for those who were prescribed albuterol sulfate 2.5 mg inhl neb soln after having been diagnosed with metastatic lung ca? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmenti... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... | Below are sql tables 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 two year survival rates for those who were prescribed albuterol sulfate 2.5 mg inhl neb soln after having been ... |
What is the sum of the evening gown scores where the interview score is less than 8.77, the swimsuit score is equal to 7.8, and the average score is less than 8.2? | CREATE TABLE table_name_4 (
evening_gown INTEGER,
average VARCHAR,
interview VARCHAR,
swimsuit VARCHAR
) | SELECT SUM(evening_gown) FROM table_name_4 WHERE interview < 8.77 AND swimsuit = 7.8 AND average < 8.2 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of the evening gown scores where the interview score is less than 8.77, the swimsuit score is equal to 7.8, ... |
has patient 3677 had any procedures undergone in the last hospital encounter? | 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 COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3677 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime 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: has patient 3677 had any procedures undergone in the last hospital encounter? ### Input: CREATE TABLE microbiologyevents (
... |
Create a bar chart showing maximal revenue across name, and I want to rank X in descending order 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 Name, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY Name DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Create a bar chart showing maximal revenue across name, and I want to rank X in descending order please. ### Input: CREATE T... |
What is the series 4 with sarah newman in series 1? | CREATE TABLE table_12147 (
"Seat" real,
"Series 1" text,
"Series 3" text,
"Series 4" text,
"Series 5" text
) | SELECT "Series 4" FROM table_12147 WHERE "Series 1" = 'sarah newman' | Below are sql tables 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 series 4 with sarah newman in series 1? ### Input: CREATE TABLE table_12147 (
"Seat" real,
"Series 1" te... |
how many times is the team oklahoma city? | CREATE TABLE table_3858 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("High points") FROM table_3858 WHERE "Team" = 'Oklahoma City' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times is the team oklahoma city? ### Input: CREATE TABLE table_3858 (
"Game" real,
"Date" text,
"Team" ... |
who is the player when the place is t5 and the score is 69-66-71=206? | CREATE TABLE table_44177 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Player" FROM table_44177 WHERE "Place" = 't5' AND "Score" = '69-66-71=206' | Below are sql tables 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 player when the place is t5 and the score is 69-66-71=206? ### Input: CREATE TABLE table_44177 (
"Place" text... |
What professor next Winter is teaching the PreMajor classes ? | CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... | Below are sql tables 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 professor next Winter is teaching the PreMajor classes ? ### Input: CREATE TABLE course (
course_id int,
name v... |
How many silver medals when the total was 2 and less than 1 bronze? | CREATE TABLE table_14293 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Silver") FROM table_14293 WHERE "Bronze" < '1' AND "Total" = '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 silver medals when the total was 2 and less than 1 bronze? ### Input: CREATE TABLE table_14293 (
"Rank" text,
... |
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the average of department_id bin hire_date by time. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID... | SELECT HIRE_DATE, AVG(DEPARTMENT_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, return a bar chart about the distribution of hire_date an... |
What did the home team score when playing against Collingwood? | CREATE TABLE table_55442 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_55442 WHERE "Away team" = 'collingwood' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What did the home team score when playing against Collingwood? ### Input: CREATE TABLE table_55442 (
"Home team" text,
... |
what's the permanence of the body where constancy is interestedness | CREATE TABLE table_11609814_1 (
permanence_of_the_body VARCHAR,
constancy VARCHAR
) | SELECT permanence_of_the_body FROM table_11609814_1 WHERE constancy = "interestedness" | Below are sql tables 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 permanence of the body where constancy is interestedness ### Input: CREATE TABLE table_11609814_1 (
permanenc... |
Which Record has a Location/Attendance of palace of auburn hills 8,108? | CREATE TABLE table_name_22 (
record VARCHAR,
location_attendance VARCHAR
) | SELECT record FROM table_name_22 WHERE location_attendance = "palace of auburn hills 8,108" | Below are sql tables 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 Record has a Location/Attendance of palace of auburn hills 8,108? ### Input: CREATE TABLE table_name_22 (
record V... |
what was the last care unit of patient 27362 since 2104? | 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 transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27362) AND NOT transfers.careunit IS NULL AND STRFTIME('%y', transfers.intime) >= '2104' ORDER BY transfers.intime DESC LIMIT 1 | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the last care unit of patient 27362 since 2104? ### Input: CREATE TABLE patients (
row_id number,
subject_i... |
what is the total number of films athena chu has acted in ? | CREATE TABLE table_203_239 (
id number,
"year" number,
"title" text,
"chinese title" text,
"role" text,
"notes" text
) | SELECT COUNT("title") FROM table_203_239 | Below are sql tables 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 films athena chu has acted in ? ### Input: CREATE TABLE table_203_239 (
id number,
"year... |
What competition in 2003 has a score of 2 1? | CREATE TABLE table_11812 (
"Year" real,
"Competition" text,
"Date" text,
"Location" text,
"Score" text,
"Result" text
) | SELECT "Competition" FROM table_11812 WHERE "Year" = '2003' AND "Score" = '2–1' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What competition in 2003 has a score of 2 1? ### Input: CREATE TABLE table_11812 (
"Year" real,
"Competition" text,
... |
Does 566 include a lab ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time... | SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 566 | Below are sql tables 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 566 include a lab ? ### Input: CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREAT... |
Where are the Alexandria enrollment locations? | CREATE TABLE table_23904 (
"School" text,
"Location(s)" text,
"Control" text,
"Type" text,
"Accreditation" text,
"Founded" text,
"Enrollment" text
) | SELECT "Enrollment" FROM table_23904 WHERE "Location(s)" = 'Alexandria' | Below are sql tables 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 are the Alexandria enrollment locations? ### Input: CREATE TABLE table_23904 (
"School" text,
"Location(s)" te... |
list all flights from LONG BEACH to COLUMBUS late saturday | CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_stop (
flight_id in... | 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.departure_time <= 2359 AND flight.departure_time >= 2000) AND date_day.day_number = 26 AND date_day.month_number = 7 AND date_day.year... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: list all flights from LONG BEACH to COLUMBUS late saturday ### Input: CREATE TABLE time_zone (
time_zone_code text,
... |
when did patient 8016 had a mch test the first time during a month before? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime tim... | SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'mch') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TIM... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 8016 had a mch test the first time during a month before? ### Input: CREATE TABLE outputevents (
row_id... |
Draw a bar chart that counts the number of venues of each workshop, and I want to order in ascending by the X. | CREATE TABLE submission (
Submission_ID int,
Scores real,
Author text,
College text
)
CREATE TABLE Acceptance (
Submission_ID int,
Workshop_ID int,
Result text
)
CREATE TABLE workshop (
Workshop_ID int,
Date text,
Venue text,
Name text
) | SELECT Venue, COUNT(Venue) FROM workshop GROUP BY Venue ORDER BY Venue | Below are sql tables 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 that counts the number of venues of each workshop, and I want to order in ascending by the X. ### Input: CR... |
count the number of patients whose primary disease is left colon cancer and procedure short title is temporary tracheostomy? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "LEFT COLON CANCER" AND procedures.short_title = "Temporary tracheostomy" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose primary disease is left colon cancer and procedure short title is temporary tracheostomy?... |
provide me the number of patients who have been diagnosed with chordae tendinae rupture. | 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 diagnoses.short_title = "Chordae tendinae rupture" | Below are sql tables 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 me the number of patients who have been diagnosed with chordae tendinae rupture. ### Input: CREATE TABLE demographic... |
find the number of black african /american patients who had mesentric ischemia. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.diagnosis = "MESENTERIC ISCHEMIA" | Below are sql tables 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 black african /american patients who had mesentric ischemia. ### Input: CREATE TABLE procedures (
sub... |
Visualize a bar chart for what are the first names and ids for customers who have two or more accounts? | CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DECIMAL(19,4),
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(255)
)
CREATE TABLE In... | SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_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: Visualize a bar chart for what are the first names and ids for customers who have two or more accounts? ### Input: CREATE TA... |
how many of the patients who had a lab test for urine volume are married? | 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.marital_status = "MARRIED" AND lab.label = "Urine Volume" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the patients who had a lab test for urine volume are married? ### Input: CREATE TABLE prescriptions (
subjec... |
How many courses are in the Psychology department for each year? Return a line chart, rank in asc by the X-axis. | CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
... | SELECT year, COUNT(year) FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' GROUP BY year ORDER BY year | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many courses are in the Psychology department for each year? Return a line chart, rank in asc by the X-axis. ### Input: ... |
show me the flights from LOS ANGELES to PITTSBURGH which arrive at PITTSBURGH on monday | 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, date_day, days, flight, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 21 AND date_day.month_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: show me the flights from LOS ANGELES to PITTSBURGH which arrive at PITTSBURGH on monday ### Input: CREATE TABLE date_day (
... |
Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a bar chart, rank by the X in desc. | CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" GROUP BY date_test_taken ORDER BY date_test_taken 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 tests have 'Pass' results? Return the dates when the tests were taken, and count them by a bar chart, rank by the X in... |
Show different locations and the number of performances at each location. | CREATE TABLE member_attendance (
member_id number,
performance_id number,
num_of_pieces number
)
CREATE TABLE member (
member_id text,
name text,
nationality text,
role text
)
CREATE TABLE performance (
performance_id number,
date text,
host text,
location text,
attenda... | SELECT location, COUNT(*) FROM performance GROUP BY location | Below are sql tables 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 different locations and the number of performances at each location. ### Input: CREATE TABLE member_attendance (
me... |
For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the amount of hire_date bin hire_date by time in a bar chart, sort in descending by the y-axis please. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY COUNT(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 those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the amount of hire_date... |
At what Venue was the Home team score 17.19 (121)? | CREATE TABLE table_55019 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_55019 WHERE "Home team score" = '17.19 (121)' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: At what Venue was the Home team score 17.19 (121)? ### Input: CREATE TABLE table_55019 (
"Home team" text,
"Home tea... |
Display a line chart for what is the average prices of wines for each each?, list by the X-axis in descending. | CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... | SELECT Year, AVG(Price) FROM wine GROUP BY Year ORDER BY Year DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Display a line chart for what is the average prices of wines for each each?, list by the X-axis in descending. ### Input: CR... |
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 ... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id an... |
Bar chart x axis year y axis total number of avg(price) | CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No... | SELECT Year, SUM(AVG(Price)) FROM wine | Below are sql tables 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 year y axis total number of avg(price) ### Input: CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
... |
Tournament of tokyo, japan, and a Score of 4 6, 6 4, 6 4 had which date attached? | CREATE TABLE table_5135 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the Final" text,
"Score" text
) | SELECT "Date" FROM table_5135 WHERE "Tournament" = 'tokyo, japan' AND "Score" = '4–6, 6–4, 6–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: Tournament of tokyo, japan, and a Score of 4 6, 6 4, 6 4 had which date attached? ### Input: CREATE TABLE table_5135 (
"... |
What is the tie number when the home team is Port Vale? | CREATE TABLE table_name_72 (
tie_no VARCHAR,
home_team VARCHAR
) | SELECT tie_no FROM table_name_72 WHERE home_team = "port vale" | Below are sql tables 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 tie number when the home team is Port Vale? ### Input: CREATE TABLE table_name_72 (
tie_no VARCHAR,
home... |
who are the writers of the episode whose production code is 176206? | CREATE TABLE table_30653 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. air date" text,
"Production code" real,
"U.S. viewers (million)" text
) | SELECT "Written by" FROM table_30653 WHERE "Production code" = '176206' | Below are sql tables 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 are the writers of the episode whose production code is 176206? ### Input: CREATE TABLE table_30653 (
"No." real,
... |
Top 500 Askers on the site. A list of the top 500 askers of questions
ordered by average answer score excluding
community wiki / closed posts. | CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT * FROM (SELECT OwnerUserId AS "user_link", COUNT(Posts.Id) AS Questions, CAST(AVG(CAST(Score AS FLOAT)) AS FLOAT(6, 2)) AS "average_question_score" FROM Posts WHERE PostTypeId = 1 AND CommunityOwnedDate IS NULL AND ClosedDate IS NULL GROUP BY OwnerUserId ORDER BY COUNT(Posts.Id) DESC LIMIT 500) ORDER BY 'average... | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 500 Askers on the site. A list of the top 500 askers of questions
ordered by average answer score excluding
community wi... |
How many patients had a joint fluid lab test done and were diagnosed with acute/chronic systolic/diastolic heart failure? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac/chr syst/dia hrt fail" AND lab.fluid = "Joint Fluid" | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many patients had a joint fluid lab test done and were diagnosed with acute/chronic systolic/diastolic heart failure? ##... |
I want a bar chart to show the average cloud cover of the dates that have the 5 highest cloud cover rates each day. | CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
e... | SELECT date, AVG(cloud_cover) FROM weather | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: I want a bar chart to show the average cloud cover of the dates that have the 5 highest cloud cover rates each day. ### Inpu... |
How many tries against did Pentyrch RFC have? | CREATE TABLE table_name_92 (
tries_against VARCHAR,
club VARCHAR
) | SELECT tries_against FROM table_name_92 WHERE club = "pentyrch rfc" | Below are sql tables 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 tries against did Pentyrch RFC have? ### Input: CREATE TABLE table_name_92 (
tries_against VARCHAR,
club VA... |
How many courses for each office? Show me a bar chart, could you show by the x-axis in desc please? | CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE va... | SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY PROF_OFFICE ORDER BY PROF_OFFICE DESC | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many courses for each office? Show me a bar chart, could you show by the x-axis in desc please? ### Input: CREATE TABLE ... |
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 last_name and employee_id , and I want to sort in ascending by the X. | 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NA... | SELECT LAST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER 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: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about... |
Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold? | CREATE TABLE table_name_77 (
total INTEGER,
bronze VARCHAR,
rank VARCHAR,
gold VARCHAR,
silver VARCHAR
) | SELECT SUM(total) FROM table_name_77 WHERE gold < 4 AND silver > 0 AND rank = "3" AND bronze < 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: Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold? #... |
In what district was incumbent first elected in 1938? | CREATE TABLE table_18489 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "District" FROM table_18489 WHERE "First elected" = '1938' | Below are sql tables 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 district was incumbent first elected in 1938? ### Input: CREATE TABLE table_18489 (
"District" text,
"Incumb... |
What was the score of the tournament that was held in 1974? | CREATE TABLE table_4537 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | SELECT "Score in the final" FROM table_4537 WHERE "Date" = '1974' | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score of the tournament that was held in 1974? ### Input: CREATE TABLE table_4537 (
"Outcome" text,
"Da... |
What is the High points of charles oakley , kevin willis (11)? | CREATE TABLE table_name_55 (
high_points VARCHAR,
high_rebounds VARCHAR
) | SELECT high_points FROM table_name_55 WHERE high_rebounds = "charles oakley , kevin willis (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: What is the High points of charles oakley , kevin willis (11)? ### Input: CREATE TABLE table_name_55 (
high_points VARCH... |
could you tell me the flights leaving PITTSBURGH around midnight for OAKLAND | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name var... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time >= 2330 OR flight.departure_time < 30) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND flight.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: could you tell me the flights leaving PITTSBURGH around midnight for OAKLAND ### Input: CREATE TABLE ground_service (
ci... |
How many courses each teacher taught? Show me a bar chart grouping by instructor's first name, and rank by the names in ascending. | CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE EM... | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY EMP_FNAME ORDER BY EMP_FNAME | Below are sql tables 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 courses each teacher taught? Show me a bar chart grouping by instructor's first name, and rank by the names in asce... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.