instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
What years does Kakahi school, with a decile of 3, have?
CREATE TABLE table_68050 ( "Name" text, "Years" text, "Area" text, "Authority" text, "Decile" real, "Roll" real )
SELECT "Years" FROM table_68050 WHERE "Decile" = '3' AND "Name" = 'kakahi school'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What years does Kakahi school, with a decile of 3, have? ### Input: CREATE TABLE table_68050 ( "Name" text, "Years" ...
which papers in cvpr 2014 use ImageNet ?
CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE author ( authorid int, authorname...
SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset, venue WHERE dataset.datasetname = 'ImageNet' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'cvpr'
scholar
Below are sql tables 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 papers in cvpr 2014 use ImageNet ? ### Input: CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TA...
Which FCC info has a ERP W smaller than 222, and a Call sign of k297ai?
CREATE TABLE table_38061 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text )
SELECT "FCC info" FROM table_38061 WHERE "ERP W" < '222' AND "Call sign" = 'k297ai'
wikisql
Below are sql tables 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 FCC info has a ERP W smaller than 222, and a Call sign of k297ai? ### Input: CREATE TABLE table_38061 ( "Call sign...
Which 2005 has a Tournament of grand slam tournaments?
CREATE TABLE table_33909 ( "Tournament" text, "2002" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text )
SELECT "2005" FROM table_33909 WHERE "Tournament" = 'grand slam tournaments'
wikisql
Below are sql tables 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 2005 has a Tournament of grand slam tournaments? ### Input: CREATE TABLE table_33909 ( "Tournament" text, "200...
What kind of Tongan has a North Marquesan of /ha e/?
CREATE TABLE table_name_89 ( tongan VARCHAR, north_marquesan VARCHAR )
SELECT tongan FROM table_name_89 WHERE north_marquesan = "/haʔe/"
sql_create_context
Below are sql tables 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 kind of Tongan has a North Marquesan of /ha e/? ### Input: CREATE TABLE table_name_89 ( tongan VARCHAR, north_m...
For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the average of salary bin hire_date by time.
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 decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the ...
What position did Rich Manning play?
CREATE TABLE table_name_87 ( position VARCHAR, player VARCHAR )
SELECT position FROM table_name_87 WHERE player = "rich manning"
sql_create_context
Below are sql tables 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 position did Rich Manning play? ### Input: CREATE TABLE table_name_87 ( position VARCHAR, player VARCHAR ) ### ...
tell me the number of times ins spinal fusion device is done since 4 years ago?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE transfers ( row_id n...
SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'ins spinal fusion device') AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TIME(), '-4 year')
mimic_iii
Below are sql tables 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 number of times ins spinal fusion device is done since 4 years ago? ### Input: CREATE TABLE d_icd_diagnoses ( ...
What is the lowest React, when Mark is 46.26 sb, and when Lane is greater than 6?
CREATE TABLE table_name_61 ( react INTEGER, mark VARCHAR, lane VARCHAR )
SELECT MIN(react) FROM table_name_61 WHERE mark = "46.26 sb" AND lane > 6
sql_create_context
Below are sql tables 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 React, when Mark is 46.26 sb, and when Lane is greater than 6? ### Input: CREATE TABLE table_name_61 ( ...
What is the name of the car that was made in the years 1956-1958?
CREATE TABLE table_42314 ( "Country" text, "Automobile Name" text, "Manufacturer" text, "Engine Make/Capacity" text, "Year" text )
SELECT "Automobile Name" FROM table_42314 WHERE "Year" = '1956-1958'
wikisql
Below are sql tables 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 car that was made in the years 1956-1958? ### Input: CREATE TABLE table_42314 ( "Country" text, ...
what is gender and death status of subject id 32418?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT demographic.gender, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "32418"
mimicsql_data
Below are sql tables 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 gender and death status of subject id 32418? ### Input: CREATE TABLE diagnoses ( subject_id text, hadm_id te...
Which Game has a Score of 3 4?
CREATE TABLE table_name_76 ( game INTEGER, score VARCHAR )
SELECT MIN(game) FROM table_name_76 WHERE score = "3–4"
sql_create_context
Below are sql tables 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 Game has a Score of 3 4? ### Input: CREATE TABLE table_name_76 ( game INTEGER, score VARCHAR ) ### Response: S...
how may patients whose lab test category is hematology stayed in the hospital for more than 3 days?
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.days_stay > "3" AND lab."CATEGORY" = "Hematology"
mimicsql_data
Below are sql tables 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 may patients whose lab test category is hematology stayed in the hospital for more than 3 days? ### Input: CREATE TABLE ...
When the q1 time is 1:16.218 what is the highest q1 pos?
CREATE TABLE table_1924975_1 ( q1_pos INTEGER, q1_time VARCHAR )
SELECT MAX(q1_pos) FROM table_1924975_1 WHERE q1_time = "1:16.218"
sql_create_context
Below are sql tables 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 the q1 time is 1:16.218 what is the highest q1 pos? ### Input: CREATE TABLE table_1924975_1 ( q1_pos INTEGER, q...
count the number of patients who received a endotracheal tube procedure within the same month after being diagnosed with a encephalopathy - metabolic since 2103.
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, a...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'encephalopathy - metabolic' AND STRFTIME('%y', diagnosis.diagnosistime) >= '2103') AS t1 JOIN (SELECT patien...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients who received a endotracheal tube procedure within the same month after being diagnosed with a e...
Name the torque for 1986
CREATE TABLE table_20007413_3 ( torque VARCHAR, year VARCHAR )
SELECT torque FROM table_20007413_3 WHERE year = "1986"
sql_create_context
Below are sql tables 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 torque for 1986 ### Input: CREATE TABLE table_20007413_3 ( torque VARCHAR, year VARCHAR ) ### Response: SEL...
how many patients whose insurance is private and age is less than 30?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.age < "30"
mimicsql_data
Below are sql tables 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 insurance is private and age is less than 30? ### Input: CREATE TABLE diagnoses ( subject_id tex...
What are the total enrollments of universities of each affiliation type. Plot them as pie chart.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation
nvbench
Below are sql tables 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 total enrollments of universities of each affiliation type. Plot them as pie chart. ### Input: CREATE TABLE uni...
Name the college/junior club team for jimmy jones
CREATE TABLE table_1965650_2 ( college_junior_club_team VARCHAR, player VARCHAR )
SELECT college_junior_club_team FROM table_1965650_2 WHERE player = "Jimmy Jones"
sql_create_context
Below are sql tables 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/junior club team for jimmy jones ### Input: CREATE TABLE table_1965650_2 ( college_junior_club_team VAR...
What away team plays at Arden Street Oval?
CREATE TABLE table_4645 ( "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_4645 WHERE "Venue" = 'arden street oval'
wikisql
Below are sql tables 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 away team plays at Arden Street Oval? ### Input: CREATE TABLE table_4645 ( "Home team" text, "Home team score" ...
What's the total with silver being less than 0, less than 1 gold, and 3 bronze?
CREATE TABLE table_name_25 ( total INTEGER, silver VARCHAR, bronze VARCHAR, gold VARCHAR )
SELECT SUM(total) FROM table_name_25 WHERE bronze = 3 AND gold < 1 AND silver < 0
sql_create_context
Below are sql tables 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 total with silver being less than 0, less than 1 gold, and 3 bronze? ### Input: CREATE TABLE table_name_25 ( ...
What is the combined of the overalls less than 34?
CREATE TABLE table_7144 ( "Season" real, "Overall" real, "Slalom" text, "Super G" real, "Downhill" text, "Combined" text )
SELECT "Combined" FROM table_7144 WHERE "Overall" < '34'
wikisql
Below are sql tables 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 combined of the overalls less than 34? ### Input: CREATE TABLE table_7144 ( "Season" real, "Overall" rea...
What is the acreage of the Maghereen in the civil parish of Macroom?
CREATE TABLE table_31513 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text )
SELECT COUNT("Area( acres )") FROM table_31513 WHERE "Civil parish" = 'Macroom' AND "Townland" = 'Maghereen'
wikisql
Below are sql tables 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 acreage of the Maghereen in the civil parish of Macroom? ### Input: CREATE TABLE table_31513 ( "Townland" te...
I want the result for week larger than 10 for opponent of new england patriots
CREATE TABLE table_52839 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" real )
SELECT "Result" FROM table_52839 WHERE "Week" > '10' AND "Opponent" = 'new england patriots'
wikisql
Below are sql tables 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 the result for week larger than 10 for opponent of new england patriots ### Input: CREATE TABLE table_52839 ( "We...
give me the number of patients whose discharge location is snf and admission year is less than 2146?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.admityear < "2146"
mimicsql_data
Below are sql tables 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 snf and admission year is less than 2146? ### Input: CREATE TABLE...
Give me the number of the descriptions of the service types that cost more than 100, could you sort X-axis from high to low order?
CREATE TABLE Bookings ( Booking_ID INTEGER, Customer_ID INTEGER, Workshop_Group_ID VARCHAR(100), Status_Code CHAR(15), Store_ID INTEGER, Order_Date DATETIME, Planned_Delivery_Date DATETIME, Actual_Delivery_Date DATETIME, Other_Order_Details VARCHAR(255) ) CREATE TABLE Order_Items ( ...
SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description ORDER BY Service_Type_Description DESC
nvbench
Below are sql tables 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 the descriptions of the service types that cost more than 100, could you sort X-axis from high to low ...
when patient 021-25705 got his sao2 measured for the first time on last month/29?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
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 = '021-25705')) AND NOT vitalperiodic.sao2 IS NULL AND...
eicu
Below are sql tables 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 patient 021-25705 got his sao2 measured for the first time on last month/29? ### Input: CREATE TABLE diagnosis ( di...
Who wrote the episodes that had a viewership of 7.14?
CREATE TABLE table_24910737_1 ( written_by VARCHAR, us_viewers__millions_ VARCHAR )
SELECT written_by FROM table_24910737_1 WHERE us_viewers__millions_ = "7.14"
sql_create_context
Below are sql tables 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 episodes that had a viewership of 7.14? ### Input: CREATE TABLE table_24910737_1 ( written_by VARCHAR, ...
let me know the gender and location of admission for patient gwendolyn hager.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT demographic.gender, demographic.admission_location FROM demographic WHERE demographic.name = "Gwendolyn Hager"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: let me know the gender and location of admission for patient gwendolyn hager. ### Input: CREATE TABLE prescriptions ( su...
Users Last Access by Country for current month.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
SELECT COUNT(Users.Id) FROM Users WHERE Users.Reputation >= 3000 AND MONTH(Users.LastAccessDate) = MONTH(CURRENT_TIMESTAMP()) AND YEAR(Users.LastAccessDate) = YEAR(CURRENT_TIMESTAMP())
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Users Last Access by Country for current month. ### Input: CREATE TABLE PendingFlags ( Id number, FlagTypeId number,...
What is the nature of the incident in Kabul on 2004-01-28?
CREATE TABLE table_68826 ( "Date" text, "Location" text, "Nature of incident" text, "Circumstances" text, "Casualties" text )
SELECT "Nature of incident" FROM table_68826 WHERE "Location" = 'kabul' AND "Date" = '2004-01-28'
wikisql
Below are sql tables 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 nature of the incident in Kabul on 2004-01-28? ### Input: CREATE TABLE table_68826 ( "Date" text, "Locat...
Questions asked per tag per hour.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversa...
SELECT TIME_TO_STR(CreationDate, '%I') AS Hours, COUNT(*) AS Total FROM Posts WHERE Posts.Tags LIKE '%a%' GROUP BY TIME_TO_STR(CreationDate, '%I')
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions asked per tag per hour. ### Input: CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId nu...
What are the average ages for male and female students. Plot them as bar chart.
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, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGE...
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex
nvbench
Below are sql tables 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 average ages for male and female students. Plot them as bar chart. ### Input: CREATE TABLE Allergy_Type ( A...
diagnosis of type ii diabetes.
CREATE TABLE table_train_230 ( "id" int, "anemia" bool, "diabetic" string, "lactose_intolerance" bool, "hb" float, "body_mass_index_bmi" float, "NOUSE" float )
SELECT * FROM table_train_230 WHERE diabetic = 'ii'
criteria2sql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: diagnosis of type ii diabetes. ### Input: CREATE TABLE table_train_230 ( "id" int, "anemia" bool, "diabetic" str...
give me a good place in mountain view for arabic food ?
CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_n...
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
restaurants
Below are sql tables 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 good place in mountain view for arabic food ? ### Input: CREATE TABLE geographic ( city_name varchar, coun...
What is the maximum area (in acres) of the Knockacullen townland?
CREATE TABLE table_74471 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text )
SELECT MAX("Area( acres )") FROM table_74471 WHERE "Townland" = 'Knockacullen'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the maximum area (in acres) of the Knockacullen townland? ### Input: CREATE TABLE table_74471 ( "Townland" text,...
What is the BW 2013 ranking of Washington, D.C., which has an ARWU 2012 ranking greater than 51?
CREATE TABLE table_37642 ( "Location (State, City)" text, "USN 2013" real, "BW 2013" real, "Forbes 2011" real, "Ec 2013" real, "FT 2011" real, "AE 2011" real, "CNN 2011" real, "BI 2013" real, "ARWU 2012" real )
SELECT "BW 2013" FROM table_37642 WHERE "ARWU 2012" > '51' AND "Location (State, City)" = 'washington, d.c.'
wikisql
Below are sql tables 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 BW 2013 ranking of Washington, D.C., which has an ARWU 2012 ranking greater than 51? ### Input: CREATE TABLE tab...
What is the sum of Capacity, when Team is 'Denizlispor'?
CREATE TABLE table_name_58 ( capacity INTEGER, team VARCHAR )
SELECT SUM(capacity) FROM table_name_58 WHERE team = "denizlispor"
sql_create_context
Below are sql tables 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 Capacity, when Team is 'Denizlispor'? ### Input: CREATE TABLE table_name_58 ( capacity INTEGER, t...
How large is the crowd with an Away team score of 7.13 (55)?
CREATE TABLE table_54577 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT COUNT("Crowd") FROM table_54577 WHERE "Away team score" = '7.13 (55)'
wikisql
Below are sql tables 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 large is the crowd with an Away team score of 7.13 (55)? ### Input: CREATE TABLE table_54577 ( "Home team" text, ...
what is the minimum number first elected to district louisiana 5?
CREATE TABLE table_1342198_18 ( first_elected INTEGER, district VARCHAR )
SELECT MIN(first_elected) FROM table_1342198_18 WHERE district = "Louisiana 5"
sql_create_context
Below are sql tables 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 minimum number first elected to district louisiana 5? ### Input: CREATE TABLE table_1342198_18 ( first_elect...
how many episodes aired in english in the month of october ?
CREATE TABLE table_203_758 ( id number, "no." number, "dub no." number, "english dubbed title / english subbed title\noriginal japanese title" text, "original air date" text, "english air date" text )
SELECT COUNT("english dubbed title / english subbed title\noriginal japanese title") FROM table_203_758 WHERE "english air date" = 10
squall
Below are sql tables 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 episodes aired in english in the month of october ? ### Input: CREATE TABLE table_203_758 ( id number, "no....
What is the Team 1 with a Team 2 with brest hc meshkov?
CREATE TABLE table_name_69 ( team_1 VARCHAR, team_2 VARCHAR )
SELECT team_1 FROM table_name_69 WHERE team_2 = "brest hc meshkov"
sql_create_context
Below are sql tables 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 1 with a Team 2 with brest hc meshkov? ### Input: CREATE TABLE table_name_69 ( team_1 VARCHAR, team...
How many different drivers were there for the team when the manufacturer was Toyota?
CREATE TABLE table_24987 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text )
SELECT COUNT("Driver") FROM table_24987 WHERE "Manufacturer" = 'Toyota'
wikisql
Below are sql tables 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 different drivers were there for the team when the manufacturer was Toyota? ### Input: CREATE TABLE table_24987 ( ...
Count those dates for each day of the week and in which zip code was the min dew point lower than any day in zip code 94107 using a bar graph.
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE weather ( date TEX...
SELECT date, COUNT(date) FROM weather WHERE min_dew_point_f < (SELECT MIN(min_dew_point_f) FROM weather WHERE zip_code = 94107)
nvbench
Below are sql tables 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 those dates for each day of the week and in which zip code was the min dew point lower than any day in zip code 94107 ...
when did patient 017-64510 for the last time in 08/2103 receive the bedside glucose test?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT 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 = '017-64510')) AND lab.labname = 'bedside glucose' AND STRFTIME('%y-%m', lab.labresul...
eicu
Below are sql tables 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 017-64510 for the last time in 08/2103 receive the bedside glucose test? ### Input: CREATE TABLE lab ( ...
For week of top 9, what were the results?
CREATE TABLE table_22736523_1 ( result VARCHAR, week__number VARCHAR )
SELECT result FROM table_22736523_1 WHERE week__number = "Top 9"
sql_create_context
Below are sql tables 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 week of top 9, what were the results? ### Input: CREATE TABLE table_22736523_1 ( result VARCHAR, week__number VA...
What High School with a nickname of S Eagle has a Division of crest?
CREATE TABLE table_75458 ( "High School" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Nickname" text, "Division" text )
SELECT "High School" FROM table_75458 WHERE "Division" = 'crest' AND "Nickname" = 's eagle'
wikisql
Below are sql tables 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 High School with a nickname of S Eagle has a Division of crest? ### Input: CREATE TABLE table_75458 ( "High School"...
how many patients are discharged to home health care and with procedure circumcision?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.long_title = "Circumcision"
mimicsql_data
Below are sql tables 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 discharged to home health care and with procedure circumcision? ### Input: CREATE TABLE prescriptions ...
Which Uni # has a Surname of ough?
CREATE TABLE table_75191 ( "Surname" text, "First" text, "D.O.B." text, "Uni#" real, "Bats" text, "Throws" text, "Position" text )
SELECT "Uni#" FROM table_75191 WHERE "Surname" = 'ough'
wikisql
Below are sql tables 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 Uni # has a Surname of ough? ### Input: CREATE TABLE table_75191 ( "Surname" text, "First" text, "D.O.B." ...
Which Attendance has a Date of november 18, 1951?
CREATE TABLE table_11715 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT "Attendance" FROM table_11715 WHERE "Date" = 'november 18, 1951'
wikisql
Below are sql tables 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 Attendance has a Date of november 18, 1951? ### Input: CREATE TABLE table_11715 ( "Week" real, "Date" text, ...
What is the title of the episode written by daniel sackheim?
CREATE TABLE table_28368 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
SELECT "Title" FROM table_28368 WHERE "Directed by" = 'Daniel Sackheim'
wikisql
Below are sql tables 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 title of the episode written by daniel sackheim? ### Input: CREATE TABLE table_28368 ( "No. in series" real,...
Who was the GT2 winning team when the GT3 winning team was #1 PTG?
CREATE TABLE table_11875915_2 ( gt2_winning_team VARCHAR, gt3_winning_team VARCHAR )
SELECT gt2_winning_team FROM table_11875915_2 WHERE gt3_winning_team = "#1 PTG"
sql_create_context
Below are sql tables 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 GT2 winning team when the GT3 winning team was #1 PTG? ### Input: CREATE TABLE table_11875915_2 ( gt2_winnin...
how many films are in telugu ?
CREATE TABLE table_204_647 ( id number, "year" number, "film" text, "role" text, "language" text )
SELECT COUNT("film") FROM table_204_647 WHERE "language" = 'telugu'
squall
Below are sql tables 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 films are in telugu ? ### Input: CREATE TABLE table_204_647 ( id number, "year" number, "film" text, ...
Which Attendance has an Away of real juventud?
CREATE TABLE table_9469 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real )
SELECT SUM("Attendance") FROM table_9469 WHERE "Away" = 'real juventud'
wikisql
Below are sql tables 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 Attendance has an Away of real juventud? ### Input: CREATE TABLE table_9469 ( "Date" text, "Home" text, "S...
what 's the cheapest round trip fare between BOSTON and WASHINGTON
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE food_service ( mea...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
Below are sql tables 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 cheapest round trip fare between BOSTON and WASHINGTON ### Input: CREATE TABLE code_description ( code varch...
If the rings are 60.500, what is the parallel bars number?
CREATE TABLE table_18662026_1 ( parallel_bars VARCHAR, rings VARCHAR )
SELECT parallel_bars FROM table_18662026_1 WHERE rings = "60.500"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: If the rings are 60.500, what is the parallel bars number? ### Input: CREATE TABLE table_18662026_1 ( parallel_bars VARC...
what was the first diagnosis for patient 025-51980 in 2105.
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagn...
SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-51980')) AND STRFTIME('%y', diagnosis.diagnosistime) = '2105'...
eicu
Below are sql tables 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 diagnosis for patient 025-51980 in 2105. ### Input: CREATE TABLE vitalperiodic ( vitalperiodicid numb...
What was the date of the game where Geelong was the home team?
CREATE TABLE table_53784 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_53784 WHERE "Home team" = 'geelong'
wikisql
Below are sql tables 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 date of the game where Geelong was the home team? ### Input: CREATE TABLE table_53784 ( "Home team" text, ...
What is the highest number of laps completed by driver Joe Nemechek?
CREATE TABLE table_52107 ( "Driver" text, "Car #" real, "Make" text, "Points" text, "Laps" real, "Winnings" text )
SELECT MAX("Laps") FROM table_52107 WHERE "Driver" = 'joe nemechek'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number of laps completed by driver Joe Nemechek? ### Input: CREATE TABLE table_52107 ( "Driver" text...
count the number of patients whose drug route is both eyes?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "BOTH EYES"
mimicsql_data
Below are sql tables 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 drug route is both eyes? ### Input: CREATE TABLE prescriptions ( subject_id text, ...
what is the number of countries they have played ?
CREATE TABLE table_203_648 ( id number, "date" text, "opposition" text, "result" text, "score" text, "brazil scorers" text, "competition" text )
SELECT COUNT(DISTINCT "opposition") FROM table_203_648
squall
Below are sql tables 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 countries they have played ? ### Input: CREATE TABLE table_203_648 ( id number, "date" text, ...
Which institution is the author 'Matthias Blume' belong to? Give me the name of the institution.
CREATE TABLE inst ( instid number, name text, country text ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE authors ( authid number, lname text, fname text )
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Matthias" AND t1.lname = "Blume"
spider
Below are sql tables 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 institution is the author 'Matthias Blume' belong to? Give me the name of the institution. ### Input: CREATE TABLE ins...
What is the Set 3 when the Total was 98 - 92?
CREATE TABLE table_name_27 ( set_3 VARCHAR, total VARCHAR )
SELECT set_3 FROM table_name_27 WHERE total = "98 - 92"
sql_create_context
Below are sql tables 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 Set 3 when the Total was 98 - 92? ### Input: CREATE TABLE table_name_27 ( set_3 VARCHAR, total VARCHAR )...
how many hours has elapsed since the last time that patient 12775 had an intake of tpn on the current icu visit?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775) AND icustays.outtime IS NULL)...
mimic_iii
Below are sql tables 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 hours has elapsed since the last time that patient 12775 had an intake of tpn on the current icu visit? ### Input: ...
Which player is pick 64?
CREATE TABLE table_30869 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
SELECT "Player" FROM table_30869 WHERE "Pick #" = '64'
wikisql
Below are sql tables 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 is pick 64? ### Input: CREATE TABLE table_30869 ( "Pick #" real, "Player" text, "Position" text, ...
Can you tell me the Score that has the Game of 40?
CREATE TABLE table_8636 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Score" FROM table_8636 WHERE "Game" = '40'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the Score that has the Game of 40? ### Input: CREATE TABLE table_8636 ( "Game" real, "Date" text, ...
What is the Wins of the Top-25 of 1 and 7 Events?
CREATE TABLE table_76033 ( "Tournament" text, "Wins" real, "Top-25" real, "Events" real, "Cuts made" real )
SELECT "Wins" FROM table_76033 WHERE "Top-25" = '1' AND "Events" = '7'
wikisql
Below are sql tables 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 Wins of the Top-25 of 1 and 7 Events? ### Input: CREATE TABLE table_76033 ( "Tournament" text, "Wins" re...
significant unprotected left main disease ( stenosis of 50 % or greater on diagnostic angiography )
CREATE TABLE table_test_26 ( "id" int, "bleeding" int, "left_ventricular_ejection_fraction_lvef" int, "left_main_coronary_artery_disease" bool, "uncontrolled_diabetes" bool, "hiv_infection" bool, "hemoglobin_a1c_hba1c" float, "hepatitis_b_infection" bool, "renal_disease" bool, "u...
SELECT * FROM table_test_26 WHERE unprotected_left_main_disease = 1 OR stenosis >= 50
criteria2sql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: significant unprotected left main disease ( stenosis of 50 % or greater on diagnostic angiography ) ### Input: CREATE TABLE ...
how many hours has passed since the first time that patient 92846 was diagnosed with crnry athrscl natve vssl on this hospital encounter?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( ...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'crnry athrscl natve vssl') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM ad...
mimic_iii
Below are sql tables 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 hours has passed since the first time that patient 92846 was diagnosed with crnry athrscl natve vssl on this hospit...
Which genre aired on 12 feb- 9 mar?
CREATE TABLE table_name_27 ( genre VARCHAR, airing_date VARCHAR )
SELECT genre FROM table_name_27 WHERE airing_date = "12 feb- 9 mar"
sql_create_context
Below are sql tables 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 genre aired on 12 feb- 9 mar? ### Input: CREATE TABLE table_name_27 ( genre VARCHAR, airing_date VARCHAR ) ###...
What was the record of the game that went 3-5?
CREATE TABLE table_15095 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT "Record" FROM table_15095 WHERE "Score" = '3-5'
wikisql
Below are sql tables 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 of the game that went 3-5? ### Input: CREATE TABLE table_15095 ( "Date" text, "Opponent" text, ...
What is the type of video game Call of Destiny.
CREATE TABLE Video_games ( gtype VARCHAR, gname VARCHAR )
SELECT gtype FROM Video_games WHERE gname = "Call of Destiny"
sql_create_context
Below are sql tables 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 type of video game Call of Destiny. ### Input: CREATE TABLE Video_games ( gtype VARCHAR, gname VARCHAR )...
what is drug route of drug name cefepime?
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 prescriptions.route FROM prescriptions WHERE prescriptions.drug = "CefePIME"
mimicsql_data
Below are sql tables 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 drug route of drug name cefepime? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, itemid te...
What date was the game for the score L 88 79?
CREATE TABLE table_17307 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
SELECT "Date" FROM table_17307 WHERE "Score" = 'L 88–79'
wikisql
Below are sql tables 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 was the game for the score L 88 79? ### Input: CREATE TABLE table_17307 ( "Game" real, "Date" text, "T...
What is the total value for Solo, when the value of Sacks is 2, and when the Team is New York Jets?
CREATE TABLE table_name_45 ( solo VARCHAR, sacks VARCHAR, team VARCHAR )
SELECT COUNT(solo) FROM table_name_45 WHERE sacks = 2 AND team = "new york jets"
sql_create_context
Below are sql tables 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 value for Solo, when the value of Sacks is 2, and when the Team is New York Jets? ### Input: CREATE TABLE ...
How many different cities do have some airport in the country of Greenland?
CREATE TABLE airports ( city VARCHAR, country VARCHAR )
SELECT COUNT(DISTINCT city) FROM airports WHERE country = 'Greenland'
sql_create_context
Below are sql tables 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 different cities do have some airport in the country of Greenland? ### Input: CREATE TABLE airports ( city VARC...
Find all the forenames of distinct drivers who was in position 1 as standing and won?
CREATE TABLE driverstandings ( driverid VARCHAR, position VARCHAR, wins VARCHAR ) CREATE TABLE drivers ( forename VARCHAR, driverid VARCHAR )
SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find all the forenames of distinct drivers who was in position 1 as standing and won? ### Input: CREATE TABLE driverstanding...
what was the total attendance at the end of the last week ?
CREATE TABLE table_203_114 ( id number, "week" number, "date" text, "tv time" text, "opponent" text, "result" text, "game site" text, "record" text, "attendance" number, "bye" text )
SELECT "attendance" FROM table_203_114 ORDER BY id DESC LIMIT 1
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the total attendance at the end of the last week ? ### Input: CREATE TABLE table_203_114 ( id number, "week...
What was the chassis when the points were greater than 0 and the entrant was March Engineering?
CREATE TABLE table_name_74 ( chassis VARCHAR, points VARCHAR, entrant VARCHAR )
SELECT chassis FROM table_name_74 WHERE points > 0 AND entrant = "march engineering"
sql_create_context
Below are sql tables 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 chassis when the points were greater than 0 and the entrant was March Engineering? ### Input: CREATE TABLE tabl...
provide the number of patients less than 59 years of age who have jehovah's witness religious background.
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 demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "JEHOVAH'S WITNESS" AND demographic.age < "59"
mimicsql_data
Below are sql tables 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 59 years of age who have jehovah's witness religious background. ### Input: CREATE ...
when did patient 002-54808 visit the hospital for the first time until 2104?
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 patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '002-54808' AND STRFTIME('%y', patient.hospitaladmittime) <= '2104' ORDER BY patient.hospitaladmittime LIMIT 1
eicu
Below are sql tables 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 002-54808 visit the hospital for the first time until 2104? ### Input: CREATE TABLE patient ( uniquepid...
What are the department names and how many employees work in each of them Visualize by bar chart, and rank X in ascending order.
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 employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
SELECT DEPARTMENT_NAME, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY DEPARTMENT_NAME ORDER BY DEPARTMENT_NAME
nvbench
Below are sql tables 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 department names and how many employees work in each of them Visualize by bar chart, and rank X in ascending or...
How large was the crowd when Carlton was the away team?
CREATE TABLE table_name_26 ( crowd VARCHAR, away_team VARCHAR )
SELECT COUNT(crowd) FROM table_name_26 WHERE away_team = "carlton"
sql_create_context
Below are sql tables 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 large was the crowd when Carlton was the away team? ### Input: CREATE TABLE table_name_26 ( crowd VARCHAR, away_...
Find the total revenue for each manufacturer.
CREATE TABLE manufacturers ( name VARCHAR, revenue INTEGER )
SELECT SUM(revenue), name FROM manufacturers GROUP BY name
sql_create_context
Below are sql tables 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 total revenue for each manufacturer. ### Input: CREATE TABLE manufacturers ( name VARCHAR, revenue INTEGER ...
What was the production code of the episode ranked 28?
CREATE TABLE table_26200084_1 ( production_code VARCHAR, rank__week_ VARCHAR )
SELECT production_code FROM table_26200084_1 WHERE rank__week_ = "28"
sql_create_context
Below are sql tables 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 production code of the episode ranked 28? ### Input: CREATE TABLE table_26200084_1 ( production_code VARCHA...
Which goverment had a party of yisrael beiteinu?
CREATE TABLE table_name_60 ( governments VARCHAR, party VARCHAR )
SELECT governments FROM table_name_60 WHERE party = "yisrael beiteinu"
sql_create_context
Below are sql tables 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 goverment had a party of yisrael beiteinu? ### Input: CREATE TABLE table_name_60 ( governments VARCHAR, party ...
What is the earliest date for the bronze medal?
CREATE TABLE table_13994 ( "Medal" text, "Name" text, "Sport" text, "Event" text, "Date" real )
SELECT MIN("Date") FROM table_13994 WHERE "Medal" = 'bronze'
wikisql
Below are sql tables 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 earliest date for the bronze medal? ### Input: CREATE TABLE table_13994 ( "Medal" text, "Name" text, ...
What Year has an ISBN OF ISBN 4-06-182042-7?
CREATE TABLE table_name_37 ( year INTEGER, isbn VARCHAR )
SELECT AVG(year) FROM table_name_37 WHERE isbn = "isbn 4-06-182042-7"
sql_create_context
Below are sql tables 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 has an ISBN OF ISBN 4-06-182042-7? ### Input: CREATE TABLE table_name_37 ( year INTEGER, isbn VARCHAR ) ##...
WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?
CREATE TABLE table_name_74 ( ast_avg INTEGER, total_assists VARCHAR, games VARCHAR, rank VARCHAR )
SELECT AVG(ast_avg) FROM table_name_74 WHERE games > 101 AND rank = 5 AND total_assists < 331
sql_create_context
Below are sql tables 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 AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331? ### Input: CREATE TABLE table_name_74...
What is the frequency for the magazine that runs September 2, 2010?
CREATE TABLE table_name_62 ( frequency VARCHAR, magazine_run VARCHAR )
SELECT frequency FROM table_name_62 WHERE magazine_run = "september 2, 2010"
sql_create_context
Below are sql tables 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 frequency for the magazine that runs September 2, 2010? ### Input: CREATE TABLE table_name_62 ( frequency VA...
Who was the opponent when the Seattle Seahawks had a record of 0-1?
CREATE TABLE table_name_18 ( opponent VARCHAR, record VARCHAR )
SELECT opponent FROM table_name_18 WHERE record = "0-1"
sql_create_context
Below are sql tables 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 opponent when the Seattle Seahawks had a record of 0-1? ### Input: CREATE TABLE table_name_18 ( opponent VAR...
What's the number of losses where played was less than 17?
CREATE TABLE table_40994 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT COUNT("Lost") FROM table_40994 WHERE "Played" < '17'
wikisql
Below are sql tables 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 number of losses where played was less than 17? ### Input: CREATE TABLE table_40994 ( "Position" real, "T...
Which Result that is on june 5?
CREATE TABLE table_58701 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text )
SELECT "Result" FROM table_58701 WHERE "Date" = 'june 5'
wikisql
Below are sql tables 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 Result that is on june 5? ### Input: CREATE TABLE table_58701 ( "Game" text, "Date" text, "Home Team" text...
What was the country of the player at +5?
CREATE TABLE table_47514 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text )
SELECT "Country" FROM table_47514 WHERE "To par" = '+5'
wikisql
Below are sql tables 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 country of the player at +5? ### Input: CREATE TABLE table_47514 ( "Place" text, "Player" text, "Co...
When was james chester loaned out until ?
CREATE TABLE table_62205 ( "Date From" text, "Date To" text, "Pos." text, "Name" text, "Moving To" text )
SELECT "Date To" FROM table_62205 WHERE "Name" = 'james chester'
wikisql
Below are sql tables 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 james chester loaned out until ? ### Input: CREATE TABLE table_62205 ( "Date From" text, "Date To" text, ...
Return a bar chart showing the number of companies in each building, rank by the x axis from high to low.
CREATE TABLE Companies ( id int, name text, Headquarters text, Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value_billion text ) CREATE TABLE Office_locations ( building_id int, company_id int, move_in_year int ) CREATE TABLE building...
SELECT T2.name, COUNT(T2.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T2.name ORDER BY T2.name DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart showing the number of companies in each building, rank by the x axis from high to low. ### Input: CREATE ...
what ground transportation is available at the BALTIMORE airport
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, applica...
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'BALTIMORE' AND ground_service.airport_code = airport.airport_code
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what ground transportation is available at the BALTIMORE airport ### Input: CREATE TABLE flight_fare ( flight_id int, ...
What are department ids for departments with managers managing more than 3 employees?
CREATE TABLE job_history ( employee_id number, start_date time, end_date time, job_id text, department_id number ) CREATE TABLE employees ( employee_id number, first_name text, last_name text, email text, phone_number text, hire_date time, job_id text, salary number,...
SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4
spider
Below are sql tables 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 department ids for departments with managers managing more than 3 employees? ### Input: CREATE TABLE job_history ( ...
What was the results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?
CREATE TABLE table_1341577_43 ( result VARCHAR, candidates VARCHAR )
SELECT result FROM table_1341577_43 WHERE candidates = "Bart Gordon (D) 76.5% Wallace Embry (R) 23.5%"
sql_create_context
Below are sql tables 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 results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%? ### Input: CREATE TABLE tab...
provide the number of patients whose discharge location is short term hospital and age is less than 68?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.age < "68"
mimicsql_data
Below are sql tables 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 discharge location is short term hospital and age is less than 68? ### Input: CREATE TA...