instruction
stringlengths
11
303
input
stringlengths
38
5.51k
output
stringlengths
25
1.92k
text
stringlengths
321
6.52k
What is the fewest ties the team had with fewer than 7 games?
CREATE TABLE table_34008 ( "Games" real, "Drawn" real, "Lost" real, "Goal difference" text, "Points" real )
SELECT MIN("Drawn") FROM table_34008 WHERE "Games" < '7'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the fewest ties the team had with fewer than 7 games? ### Input: CREATE TABLE table_34008 ( "Games" real, "D...
Who was the (M) Best & Fairest when ray kaduck was president and richard keane was coach?
CREATE TABLE table_name_2 ( _m__best_ VARCHAR, _fairest VARCHAR, president VARCHAR, _m__coach VARCHAR )
SELECT _m__best_ & _fairest FROM table_name_2 WHERE president = "ray kaduck" AND _m__coach = "richard keane"
Below are sql tables 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 (M) Best & Fairest when ray kaduck was president and richard keane was coach? ### Input: CREATE TABLE table_name...
What album was recorded by the rca label?
CREATE TABLE table_66879 ( "Year" real, "Artist" text, "Album" text, "Record label" text, "Weeks at number one" real )
SELECT "Album" FROM table_66879 WHERE "Record label" = 'rca'
Below are sql tables 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 was recorded by the rca label? ### Input: CREATE TABLE table_66879 ( "Year" real, "Artist" text, "Alb...
What is the last name of each student who is not allergic to any type of food? Count them with a bar chart, and show by the X in desc.
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 LName, COUNT(LName) FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.AllergyType = "food") GROUP BY LName ORDER BY LName DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the last name of each student who is not allergic to any type of food? Count them with a bar chart, and show by the ...
What was the tie number of the away game for Ashford Town (Middx)?
CREATE TABLE table_name_79 ( tie_no VARCHAR, away_team VARCHAR )
SELECT tie_no FROM table_name_79 WHERE away_team = "ashford town (middx)"
Below are sql tables 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 tie number of the away game for Ashford Town (Middx)? ### Input: CREATE TABLE table_name_79 ( tie_no VARCHA...
For those records from the products and each product's manufacturer, give me the comparison about price over the name , and group by attribute founder, and sort in descending by the X.
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.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.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: For those records from the products and each product's manufacturer, give me the comparison about price over the name , and ...
What are the name and population of each county Plot them as bar chart, list by the Y in descending.
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, ...
SELECT County_name, Population FROM county ORDER BY Population DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the name and population of each county Plot them as bar chart, list by the Y in descending. ### Input: CREATE TABLE...
triglycerides > 450 mg / dl
CREATE TABLE table_train_189 ( "id" int, "alt" float, "hyperglycemia" bool, "liver_disease" bool, "smoking" bool, "alcohol_abuse" bool, "drug_abuse" bool, "triglyceride_tg" float, "NOUSE" float )
SELECT * FROM table_train_189 WHERE triglyceride_tg > 450
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: triglycerides > 450 mg / dl ### Input: CREATE TABLE table_train_189 ( "id" int, "alt" float, "hyperglycemia" boo...
What was the original air date of the episode that had 4.08 million U.S. viewers?
CREATE TABLE table_21304155_1 ( original_air_date VARCHAR, us_viewers__millions_ VARCHAR )
SELECT original_air_date FROM table_21304155_1 WHERE us_viewers__millions_ = "4.08"
Below are sql tables 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 original air date of the episode that had 4.08 million U.S. viewers? ### Input: CREATE TABLE table_21304155_1 (...
Who was Milwaukee's opponent?
CREATE TABLE table_name_98 ( opponent VARCHAR, city VARCHAR )
SELECT opponent FROM table_name_98 WHERE city = "milwaukee"
Below are sql tables 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 Milwaukee's opponent? ### Input: CREATE TABLE table_name_98 ( opponent VARCHAR, city VARCHAR ) ### Response:...
since 6 years ago, what was the yearly maximum value of the paco2 of patient 022-127032?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( me...
SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-127032')) AND lab.labname = 'paco2' AND DATETIME(lab.labresulttime) >= DATETIM...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 6 years ago, what was the yearly maximum value of the paco2 of patient 022-127032? ### Input: CREATE TABLE allergy ( ...
what is the total number of albums can i bus has released ?
CREATE TABLE table_203_137 ( id number, "title" text, "album details" text, "peak chart positions\nus" number, "peak chart positions\nus r&b" number, "certifications" text )
SELECT COUNT("title") FROM table_203_137
Below are sql tables 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 albums can i bus has released ? ### Input: CREATE TABLE table_203_137 ( id number, "titl...
What was the attendance during the week 1 match?
CREATE TABLE table_name_2 ( attendance VARCHAR, week VARCHAR )
SELECT attendance FROM table_name_2 WHERE week = 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 attendance during the week 1 match? ### Input: CREATE TABLE table_name_2 ( attendance VARCHAR, week VAR...
Top users in a tag by score and answer count.
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number...
SELECT TagUsers.UserLink AS "user_link", TagUsers.Score AS Score, TagUsers.Count AS "count", (TagUsers.Score + TagUsers.Count) / 2.0 AS Total FROM (SELECT a.OwnerUserId AS UserLink, SUM(a.Score) / 10.0 AS Score, COUNT(a.Score) AS "count" FROM Posts AS a, Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JO...
Below are sql tables 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 in a tag by score and answer count. ### Input: CREATE TABLE PostNoticeTypes ( Id number, ClassId number, ...
For which to par was the score 71-74-68=213?
CREATE TABLE table_name_11 ( to_par VARCHAR, score VARCHAR )
SELECT to_par FROM table_name_11 WHERE score = 71 - 74 - 68 = 213
Below are sql tables 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 which to par was the score 71-74-68=213? ### Input: CREATE TABLE table_name_11 ( to_par VARCHAR, score VARCHAR )...
what is the pick number minimum if the NFL team is the San Diego Chargers?
CREATE TABLE table_2508633_8 ( pick__number INTEGER, nfl_team VARCHAR )
SELECT MIN(pick__number) FROM table_2508633_8 WHERE nfl_team = "San Diego Chargers"
Below are sql tables 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 pick number minimum if the NFL team is the San Diego Chargers? ### Input: CREATE TABLE table_2508633_8 ( pic...
What airport is in Muscat?
CREATE TABLE table_45671 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
SELECT "Airport" FROM table_45671 WHERE "City" = 'muscat'
Below are sql tables 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 airport is in Muscat? ### Input: CREATE TABLE table_45671 ( "City" text, "Country" text, "IATA" text, "...
when was the first laboratory test patient 002-58884 received last month?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-58884')) AND DATETIME(lab.labresulttime, 'start of month') = DATETIME(CURRENT_T...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the first laboratory test patient 002-58884 received last month? ### Input: CREATE TABLE allergy ( allergyid nu...
What was the amount of laps for the vehicle manufactured by honda with a grid of 9?
CREATE TABLE table_76654 ( "Rider" text, "Manufacturer" text, "Laps" text, "Time/Retired" text, "Grid" text )
SELECT "Laps" FROM table_76654 WHERE "Manufacturer" = 'honda' AND "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 was the amount of laps for the vehicle manufactured by honda with a grid of 9? ### Input: CREATE TABLE table_76654 ( ...
WHAT IS THE AWAY TEAM WITH HOME OF LEICESTER CITY?
CREATE TABLE table_43809 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
SELECT "Away team" FROM table_43809 WHERE "Home team" = 'leicester 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: WHAT IS THE AWAY TEAM WITH HOME OF LEICESTER CITY? ### Input: CREATE TABLE table_43809 ( "Tie no" text, "Home team" ...
Show the card type codes and the number of transactions. Visualize by pie chart.
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, previous_transaction_id INTEGER, account_id INTEGER, card_id INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DOUBLE, transaction_comment VARCHAR(255), other_transaction_details VARCHAR(...
SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the card type codes and the number of transactions. Visualize by pie chart. ### Input: CREATE TABLE Financial_Transacti...
What is the total of the Divison that is from the country Serbia and Montenegro with apps smaller than 12 with more goals than 0?
CREATE TABLE table_70489 ( "Season" text, "Team" text, "Country" text, "Division" real, "Apps" real, "Goals" real )
SELECT SUM("Division") FROM table_70489 WHERE "Country" = 'serbia and montenegro' AND "Apps" < '12' AND "Goals" > '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 total of the Divison that is from the country Serbia and Montenegro with apps smaller than 12 with more goals th...
did patient 52598 undergo surgery the previous year?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_...
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52598) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: did patient 52598 undergo surgery the previous year? ### Input: CREATE TABLE labevents ( row_id number, subject_id n...
What are the smallest goals with a Goal Ratio of 0.14, and a Debut in Europe smaller than 1995?
CREATE TABLE table_name_20 ( goals INTEGER, goal_ratio VARCHAR, debut_in_europe VARCHAR )
SELECT MIN(goals) FROM table_name_20 WHERE goal_ratio = 0.14 AND debut_in_europe < 1995
Below are sql tables 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 smallest goals with a Goal Ratio of 0.14, and a Debut in Europe smaller than 1995? ### Input: CREATE TABLE tabl...
What was the away team that played Fitzroy?
CREATE TABLE table_32813 ( "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_32813 WHERE "Home team" = 'fitzroy'
Below are sql tables 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 away team that played Fitzroy? ### Input: CREATE TABLE table_32813 ( "Home team" text, "Home team score...
what is procedure short title and procedure long title of procedure icd9 code 5059?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT procedures.short_title, procedures.long_title FROM procedures WHERE procedures.icd9_code = "5059"
Below are sql tables 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 procedure short title and procedure long title of procedure icd9 code 5059? ### Input: CREATE TABLE procedures ( ...
Is there a EECS class that does n't meet on Friday ?
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course_offering.friday = 'N' AND course.department = 'EECS' AND semester.semester = 'WN' AND 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: Is there a EECS class that does n't meet on Friday ? ### Input: CREATE TABLE course_tags_count ( course_id int, clea...
Find the number of courses offered by Psychology department in each year with a line chart.
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE department ( dept_name varchar(20), building varchar(15), budget numeric(12,2) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year...
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
Below are sql tables 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 courses offered by Psychology department in each year with a line chart. ### Input: CREATE TABLE classroo...
what is minimum hours of the students playing in different position?
CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) )
SELECT pPos, MIN(T2.HS) FROM Tryout AS T1 JOIN Player AS T2 ON T1.pID = T2.pID GROUP BY pPos
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is minimum hours of the students playing in different position? ### Input: CREATE TABLE College ( cName varchar(20)...
how many patients had oxyc10 as their drug code?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "OXYC10"
Below are sql tables 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 oxyc10 as their drug code? ### Input: CREATE TABLE procedures ( subject_id text, hadm_id text,...
provide the number of patients whose gender is f and procedure short title is cont inv mec ven 96+ hrs?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "Cont inv mec ven 96+ hrs"
Below are sql tables 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 gender is f and procedure short title is cont inv mec ven 96+ hrs? ### Input: CREATE TA...
How many points are there for 63 tries against?
CREATE TABLE table_21847 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT "Points for" FROM table_21847 WHERE "Tries against" = '63'
Below are sql tables 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 points are there for 63 tries against? ### Input: CREATE TABLE table_21847 ( "Club" text, "Played" text, ...
Which courses do I need to take before RCNSCI 263 ?
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
Below are sql tables 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 courses do I need to take before RCNSCI 263 ? ### Input: CREATE TABLE semester ( semester_id int, semester var...
what would be the average monthly number of patients diagnosed with family hx-gi malignancy in 2103?
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 AVG(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'family hx-gi malignancy') AND STRFTIME('%y', diagnoses_icd.charttime) = '2103' GROUP BY 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 would be the average monthly number of patients diagnosed with family hx-gi malignancy in 2103? ### Input: CREATE TABLE...
Name the college for nate binder
CREATE TABLE table_25017530_5 ( college VARCHAR, player VARCHAR )
SELECT college FROM table_25017530_5 WHERE player = "Nate Binder"
Below are sql tables 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 college for nate binder ### Input: CREATE TABLE table_25017530_5 ( college VARCHAR, player VARCHAR ) ### Re...
how many patients whose days of hospital stay is greater than 14 and diagnoses long title is neonatal jaundice associated with preterm delivery?
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "14" AND diagnoses.long_title = "Neonatal jaundice associated with preterm delivery"
Below are sql tables 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 days of hospital stay is greater than 14 and diagnoses long title is neonatal jaundice associated wi...
how many times since 6 years ago has patient 50480 been to the hospital?
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 COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 50480 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-6 year')
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times since 6 years ago has patient 50480 been to the hospital? ### Input: CREATE TABLE prescriptions ( row_id ...
What was the name of the leader whose term ended in 2013?
CREATE TABLE table_35265 ( "Name" text, "Term start" real, "Term end" text, "Date of Birth" text, "Date of Death" text )
SELECT "Name" FROM table_35265 WHERE "Term end" = '2013'
Below are sql tables 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 leader whose term ended in 2013? ### Input: CREATE TABLE table_35265 ( "Name" text, "Term s...
What is the lowest rank of Jens Kruppa in a lane larger than 2?
CREATE TABLE table_name_28 ( rank INTEGER, name VARCHAR, lane VARCHAR )
SELECT MIN(rank) FROM table_name_28 WHERE name = "jens kruppa" AND lane > 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 lowest rank of Jens Kruppa in a lane larger than 2? ### Input: CREATE TABLE table_name_28 ( rank INTEGER, ...
history of chronic renal failure
CREATE TABLE table_train_187 ( "id" int, "pregnancy_or_lactation" bool, "renal_disease" bool, "diabetic" string, "liver_disease" bool, "NOUSE" float )
SELECT * FROM table_train_187 WHERE renal_disease = 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: history of chronic renal failure ### Input: CREATE TABLE table_train_187 ( "id" int, "pregnancy_or_lactation" bool, ...
What is the Tie no of the Blackburn Rovers Away game?
CREATE TABLE table_60348 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT "Tie no" FROM table_60348 WHERE "Away team" = 'blackburn rovers'
Below are sql tables 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 no of the Blackburn Rovers Away game? ### Input: CREATE TABLE table_60348 ( "Tie no" text, "Home tea...
did patient 006-205326 during a year before undergo surgery?
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 COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-205326')) AND DATETIME(treatment.treatmenttime, 'start of year') = DATET...
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: did patient 006-205326 during a year before undergo surgery? ### Input: CREATE TABLE cost ( costid number, uniquepid...
Show team id vs acc_percent as scatter plot use a different color for each All_Games
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 Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Games
Below are sql tables 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 team id vs acc_percent as scatter plot use a different color for each All_Games ### Input: CREATE TABLE basketball_matc...
What date had a record of 15-14-4?
CREATE TABLE table_name_79 ( date VARCHAR, record VARCHAR )
SELECT date FROM table_name_79 WHERE record = "15-14-4"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date had a record of 15-14-4? ### Input: CREATE TABLE table_name_79 ( date VARCHAR, record VARCHAR ) ### Respon...
What was the score of the tournament that was held in 1974?
CREATE TABLE table_name_92 ( score_in_the_final VARCHAR, date VARCHAR )
SELECT score_in_the_final FROM table_name_92 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_name_92 ( score_in_the_final V...
what is discharge location and procedure long title of subject id 55094?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.discharge_location, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "55094"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is discharge location and procedure long title of subject id 55094? ### Input: CREATE TABLE demographic ( subject_i...
What is the overall rank with rating smaller than 8.2 and rating share of 4.5/11?
CREATE TABLE table_57926 ( "Episode" text, "Air Date" text, "Rating" real, "Share" real, "Rating/Share 18\u201349" text, "Viewers (m)" real, "Timeslot Rank" real, "Night Rank" text, "Overall Rank" real )
SELECT COUNT("Overall Rank") FROM table_57926 WHERE "Rating/Share 18\u201349" = '4.5/11' AND "Rating" < '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 overall rank with rating smaller than 8.2 and rating share of 4.5/11? ### Input: CREATE TABLE table_57926 ( ...
Find the number of students who is older than 20 in each dorm. Visualize by pie chart.
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Has_amenity ( dormid...
SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of students who is older than 20 in each dorm. Visualize by pie chart. ### Input: CREATE TABLE Student ( ...
A scatter chart about what are ids and total number of hours played for each game?
CREATE TABLE SportsInfo ( StuID INTEGER, SportName VARCHAR(32), HoursPerWeek INTEGER, GamesPlayed INTEGER, OnScholarship VARCHAR(1) ) CREATE TABLE Video_Games ( GameID INTEGER, GName VARCHAR(40), GType VARCHAR(40) ) CREATE TABLE Plays_Games ( StuID INTEGER, GameID INTEGER, ...
SELECT GameID, SUM(Hours_Played) FROM Plays_Games GROUP BY GameID
Below are sql tables 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 scatter chart about what are ids and total number of hours played for each game? ### Input: CREATE TABLE SportsInfo ( ...
Name the fewest tries for leicester tigers with points less than 207
CREATE TABLE table_31955 ( "Points" real, "Name" text, "Club" text, "Tries" real, "Drop" real )
SELECT MIN("Tries") FROM table_31955 WHERE "Club" = 'leicester tigers' AND "Points" < '207'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the fewest tries for leicester tigers with points less than 207 ### Input: CREATE TABLE table_31955 ( "Points" real...
What was the result for the best musical revival category?
CREATE TABLE table_name_98 ( result VARCHAR, category VARCHAR )
SELECT result FROM table_name_98 WHERE category = "best musical revival"
Below are sql tables 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 for the best musical revival category? ### Input: CREATE TABLE table_name_98 ( result VARCHAR, c...
WHAT IS THE PLACE WITH THE SCORE 69-71-66-73=279?
CREATE TABLE table_45786 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text )
SELECT "Place" FROM table_45786 WHERE "Score" = '69-71-66-73=279'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT IS THE PLACE WITH THE SCORE 69-71-66-73=279? ### Input: CREATE TABLE table_45786 ( "Place" text, "Player" text,...
Show me a bar chart about the number of races held in each year after 2014, and order X-axis from high to low order please.
CREATE TABLE races ( raceId INTEGER, year INTEGER, round INTEGER, circuitId INTEGER, name TEXT, date TEXT, time TEXT, url TEXT ) CREATE TABLE driverStandings ( driverStandingsId INTEGER, raceId INTEGER, driverId INTEGER, points REAL, position INTEGER, positionTex...
SELECT year, COUNT(year) FROM races AS T1 JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.year > 2014 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: Show me a bar chart about the number of races held in each year after 2014, and order X-axis from high to low order please. ...
what changes have been made to the ph levels of patient 9566 second measured on the current hospital visit compared to the value first measured on the current hospital visit?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, v...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9566 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ph') ORDER BY labevents.charttime LIMIT ...
Below are sql tables 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 changes have been made to the ph levels of patient 9566 second measured on the current hospital visit compared to the v...
show all users from india as per their reputation.
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%IN' ORDER BY Reputation DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show all users from india as per their reputation. ### Input: CREATE TABLE PostLinks ( Id number, CreationDate time,...
How many titles does Episode 2 have
CREATE TABLE table_1482 ( "Series #" real, "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT COUNT("Title") FROM table_1482 WHERE "Episode #" = '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 titles does Episode 2 have ### Input: CREATE TABLE table_1482 ( "Series #" real, "Episode #" real, "Tit...
Return a bar chart on how many wines are there for each grape?, and I want to list the total number in desc order.
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases IN...
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY COUNT(*) DESC
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart on how many wines are there for each grape?, and I want to list the total number in desc order. ### Input...
Tell me the result for week of 3
CREATE TABLE table_name_33 ( result VARCHAR, week VARCHAR )
SELECT result FROM table_name_33 WHERE week = 3
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the result for week of 3 ### Input: CREATE TABLE table_name_33 ( result VARCHAR, week VARCHAR ) ### Response...
count the number of patients whose admission type is elective and age is less than 68?
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 WHERE demographic.admission_type = "ELECTIVE" AND demographic.age < "68"
Below are sql tables 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 admission type is elective and age is less than 68? ### Input: CREATE TABLE diagnoses ( ...
what was the procedure which during a month before had been given to patient 51200 two times?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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 ( row_id number, ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 512...
Below are sql tables 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 procedure which during a month before had been given to patient 51200 two times? ### Input: CREATE TABLE d_item...
How many classes of the upper level are 1 credits ?
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description va...
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 1 AND program_course.category LIKE 'ULCS'
Below are sql tables 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 classes of the upper level are 1 credits ? ### Input: CREATE TABLE program ( program_id int, name varchar, ...
provide the number of patients whose primary disease is morbid obesity/sda and lab test fluid is pleural?
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 prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND lab.fluid = "Pleural"
Below are sql tables 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 morbid obesity/sda and lab test fluid is pleural? ### Input: CREATE ...
how many patients until 2 years ago were staying at careunit tsicu?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyeve...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'tsicu' AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-2 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 patients until 2 years ago were staying at careunit tsicu? ### Input: CREATE TABLE d_items ( row_id number, ...
What was the winning score at bellerive country club?
CREATE TABLE table_275162_1 ( score VARCHAR, course VARCHAR )
SELECT score FROM table_275162_1 WHERE course = "Bellerive country Club"
Below are sql tables 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 winning score at bellerive country club? ### Input: CREATE TABLE table_275162_1 ( score VARCHAR, course...
Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.
CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine ( id number, name text,...
SELECT name, trade_name FROM medicine EXCEPT SELECT T1.name, T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'
Below are sql tables 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 medicine names and trade names that cannot interact with the enzyme with product 'Heme'. ### Input: CREATE TABLE me...
calculate the total number of newborn admitted on clinic referral/premature.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.admission_location = "CLINIC REFERRAL/PREMATURE"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: calculate the total number of newborn admitted on clinic referral/premature. ### Input: CREATE TABLE prescriptions ( sub...
What was the result of the Award of Drama desk award nominee Tom Hewitt.
CREATE TABLE table_41382 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text )
SELECT "Result" FROM table_41382 WHERE "Award" = 'drama desk award' AND "Nominee" = 'tom hewitt'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result of the Award of Drama desk award nominee Tom Hewitt. ### Input: CREATE TABLE table_41382 ( "Year" re...
Show me a bar chart for what is the total rating of channel for each channel owner?, and display in ascending by the X.
CREATE TABLE program ( Program_ID int, Name text, Origin text, Launch real, Owner text ) CREATE TABLE broadcast ( Channel_ID int, Program_ID int, Time_of_day text ) CREATE TABLE broadcast_share ( Channel_ID int, Program_ID int, Date text, Share_in_percent real ) CREATE...
SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner ORDER BY Owner
Below are sql tables 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 a bar chart for what is the total rating of channel for each channel owner?, and display in ascending by the X. ### ...
Who is the Constructor for round 5?
CREATE TABLE table_4677 ( "Team" text, "Constructor" text, "Motorcycle" text, "Rider" text, "Rounds" text )
SELECT "Constructor" FROM table_4677 WHERE "Rounds" = '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: Who is the Constructor for round 5? ### Input: CREATE TABLE table_4677 ( "Team" text, "Constructor" text, "Motor...
i want to fly from BOSTON to BALTIMORE
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE fare ( fare_id int, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight 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.city_name = 'BALTIMO...
Below are sql tables 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 to fly from BOSTON to BALTIMORE ### Input: CREATE TABLE code_description ( code varchar, description text ) ...
Who is the manufacturer for Henk Vd Lagemaat?
CREATE TABLE table_44668 ( "Rider" text, "Manufacturer" text, "Laps" text, "Time/Retired" text, "Grid" text )
SELECT "Manufacturer" FROM table_44668 WHERE "Rider" = 'henk vd lagemaat'
Below are sql tables 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 manufacturer for Henk Vd Lagemaat? ### Input: CREATE TABLE table_44668 ( "Rider" text, "Manufacturer" tex...
What is the team of the player from ohio state?
CREATE TABLE table_63005 ( "Pick" real, "Team" text, "Player" text, "Position" text, "College" text )
SELECT "Team" FROM table_63005 WHERE "College" = 'ohio state'
Below are sql tables 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 team of the player from ohio state? ### Input: CREATE TABLE table_63005 ( "Pick" real, "Team" text, ...
Which drivers won $40,000 in the NASCAR Winston Cup?
CREATE TABLE table_21297652_1 ( driver VARCHAR, series VARCHAR, winnings VARCHAR )
SELECT driver FROM table_21297652_1 WHERE series = "NASCAR Winston Cup" AND winnings = "$40,000"
Below are sql tables 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 drivers won $40,000 in the NASCAR Winston Cup? ### Input: CREATE TABLE table_21297652_1 ( driver VARCHAR, seri...
get the number of patients with lab test item id 51439 who were admitted to hospital before 2111.
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2111" AND lab.itemid = "51439"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get the number of patients with lab test item id 51439 who were admitted to hospital before 2111. ### Input: CREATE TABLE de...
triglycerides greater than 600 mg / dl
CREATE TABLE table_train_201 ( "id" int, "blood_pressure_bilaterally" bool, "creatinine_clearance_cl" float, "total_cholesterol" int, "smoking" bool, "triglyceride_tg" float, "NOUSE" float )
SELECT * FROM table_train_201 WHERE triglyceride_tg >= 600
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: triglycerides greater than 600 mg / dl ### Input: CREATE TABLE table_train_201 ( "id" int, "blood_pressure_bilateral...
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the sum of employee_id over the hire_date bin hire_date by weekday by a bar chart.
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCAT...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 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: For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison a...
Which player wears the number 2 on his jersey?
CREATE TABLE table_47226 ( "Player" text, "Nationality" text, "Jersey Number(s)" text, "Position" text, "Years" text, "From" text )
SELECT "Player" FROM table_47226 WHERE "Jersey Number(s)" = '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 player wears the number 2 on his jersey? ### Input: CREATE TABLE table_47226 ( "Player" text, "Nationality" te...
Total number of users in Stack Overflow.
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal bool...
SELECT COUNT(*) FROM Users
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Total number of users in Stack Overflow. ### Input: CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, ...
What is the score for Collingwood as the home team?
CREATE TABLE table_53391 ( "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_53391 WHERE "Home team" = 'collingwood'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the score for Collingwood as the home team? ### Input: CREATE TABLE table_53391 ( "Home team" text, "Home te...
On which date did Footscray play an away game?
CREATE TABLE table_name_48 ( date VARCHAR, away_team VARCHAR )
SELECT date FROM table_name_48 WHERE away_team = "footscray"
Below are sql tables 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 which date did Footscray play an away game? ### Input: CREATE TABLE table_name_48 ( date VARCHAR, away_team VARCH...
Return a bar chart about the distribution of All_Neutral and All_Games_Percent , and could you sort by the x axis in descending?
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, All_Games_Percent FROM basketball_match ORDER BY All_Neutral 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 about the distribution of All_Neutral and All_Games_Percent , and could you sort by the x axis in descend...
how many titles are on the album ?
CREATE TABLE table_203_701 ( id number, "#" number, "title" text, "featured guest(s)" text, "producer(s)" text, "length" text )
SELECT COUNT("title") FROM table_203_701
Below are sql tables 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 titles are on the album ? ### Input: CREATE TABLE table_203_701 ( id number, "#" number, "title" text, ...
Top Android Users in Malaysia.
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.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: Top Android Users in Malaysia. ### Input: CREATE TABLE Users ( Id number, Reputation number, CreationDate time, ...
What is the name of teh studio that created the most films?
CREATE TABLE film ( film_id number, title text, studio text, director text, gross_in_dollar number ) CREATE TABLE film_market_estimation ( estimation_id number, low_estimate number, high_estimate number, film_id number, type text, market_id number, year number ) CREATE ...
SELECT studio FROM film GROUP BY studio 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 name of teh studio that created the most films? ### Input: CREATE TABLE film ( film_id number, title tex...
At which location did 29753 fans show up to watch the game?
CREATE TABLE table_26866 ( "Week" real, "Date" text, "Kickoff" text, "Opponent" text, "Final score" text, "Team record" text, "Game site" text, "Attendance" real )
SELECT "Game site" FROM table_26866 WHERE "Attendance" = '29753'
Below are sql tables 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 which location did 29753 fans show up to watch the game? ### Input: CREATE TABLE table_26866 ( "Week" real, "Date...
A bar chart showing the minimum weight for each gender.
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, MIN(Weight) FROM people GROUP BY Sex
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart showing the minimum weight for each gender. ### Input: CREATE TABLE candidate ( Candidate_ID int, People...
Which morning classes does PERSIAN 404 have ?
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int...
SELECT DISTINCT course_offering.end_time, course_offering.start_time, semester.semester, semester.year FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'PERSIAN' 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: Which morning classes does PERSIAN 404 have ? ### Input: CREATE TABLE jobs ( job_id int, job_title varchar, desc...
What are the notes when the time was 7:42.92 and the rank is more than 1?
CREATE TABLE table_name_65 ( notes VARCHAR, rank VARCHAR, time VARCHAR )
SELECT notes FROM table_name_65 WHERE rank > 1 AND time = "7:42.92"
Below are sql tables 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 notes when the time was 7:42.92 and the rank is more than 1? ### Input: CREATE TABLE table_name_65 ( notes ...
What is the away team score of a Melbourne team that has a home team score of 12.7 (79)?
CREATE TABLE table_54881 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text )
SELECT "Away team score" FROM table_54881 WHERE "Home team score" = '12.7 (79)' AND "Away team" = 'melbourne'
Below are sql tables 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 score of a Melbourne team that has a home team score of 12.7 (79)? ### Input: CREATE TABLE table_54881...
A bar chart for what are the number of the countries of mountains with height bigger than 5000?, order by the Y-axis in asc.
CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text )
SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 GROUP BY Country ORDER BY COUNT(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: A bar chart for what are the number of the countries of mountains with height bigger than 5000?, order by the Y-axis in asc....
what is the number of patients whose ethnicity is hispanic/latino - puerto rican and item id is 51478?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND lab.itemid = "51478"
Below are sql tables 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 hispanic/latino - puerto rican and item id is 51478? ### Input: CREATE TAB...
which grid did less than 20 laps in a time of +58.353?
CREATE TABLE table_45608 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real )
SELECT MIN("Grid") FROM table_45608 WHERE "Time" = '+58.353' AND "Laps" < '20'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which grid did less than 20 laps in a time of +58.353? ### Input: CREATE TABLE table_45608 ( "Rider" text, "Manufact...
You can use a bar chart to show the employees' first name and their manager id as Y, could you display in ascending by the y axis?
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) 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...
SELECT T1.FIRST_NAME, T1.MANAGER_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID ORDER BY T1.MANAGER_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: You can use a bar chart to show the employees' first name and their manager id as Y, could you display in ascending by the y...
count the number of patients whose days of hospital stay is greater than 1 and diagnoses icd9 code is e8791?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.icd9_code = "E8791"
Below are sql tables 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 days of hospital stay is greater than 1 and diagnoses icd9 code is e8791? ### Input: CREA...
give me the number of patients whose primary disease is femoral artery thrombosis and age is less than 85?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND demographic.age < "85"
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose primary disease is femoral artery thrombosis and age is less than 85? ### Input: CREATE...
what would be patient 035-24054's monthly maximum weight since 2103?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) ...
SELECT MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-24054') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y', patient.unitadmittime) >= '2103' GROUP BY STRFTIME('%y-%m', patient.unitadm...
Below are sql tables 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 would be patient 035-24054's monthly maximum weight since 2103? ### Input: CREATE TABLE lab ( labid number, pat...
Visualize a bar chart for how many rooms cost more than 120, for each different decor?, and list by the names in ascending.
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor ORDER BY decor
Below are sql tables 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 how many rooms cost more than 120, for each different decor?, and list by the names in ascending. ...
Name the least age for cibao central and santo domingo
CREATE TABLE table_24300 ( "Province, Community" text, "Contestant" text, "Age" real, "Height" text, "Hometown" text, "Geographical Regions" text )
SELECT MIN("Age") FROM table_24300 WHERE "Geographical Regions" = 'Cibao Central' AND "Hometown" = 'Santo Domingo'
Below are sql tables 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 least age for cibao central and santo domingo ### Input: CREATE TABLE table_24300 ( "Province, Community" text,...
What is the total Crowd number for the team that has an Away team score of 12.18 (90)?
CREATE TABLE table_78147 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT SUM("Crowd") FROM table_78147 WHERE "Away team score" = '12.18 (90)'
Below are sql tables 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 Crowd number for the team that has an Away team score of 12.18 (90)? ### Input: CREATE TABLE table_78147 (...
until 1 year ago patient 77676 had a procedure?
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 77676) AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-1 year')
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: until 1 year ago patient 77676 had a procedure? ### Input: CREATE TABLE transfers ( row_id number, subject_id number...