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 is the team 2 with a 0-0 2nd leg?
CREATE TABLE table_70654 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
SELECT "Team 2" FROM table_70654 WHERE "2nd leg" = '0-0'
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 team 2 with a 0-0 2nd leg? ### Input: CREATE TABLE table_70654 ( "Team 1" text, "Agg." text, "Team 2...
Who has taught CHEMBIO 995 most recently ?
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int,...
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course_offeri...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who has taught CHEMBIO 995 most recently ? ### Input: CREATE TABLE comment_instructor ( instructor_id int, student_i...
how many songs were released after 1977 ?
CREATE TABLE table_203_830 ( id number, "year" number, "song" text, "chart positions\nus country" number, "chart positions\ncan country" number, "album" text )
SELECT COUNT("song") FROM table_203_830 WHERE "year" > 1977
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 songs were released after 1977 ? ### Input: CREATE TABLE table_203_830 ( id number, "year" number, "son...
what are the number of patients who have had a cholesterol ratio (total/hdl) test until 2101?
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, ...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'cholesterol ratio (total/hdl)') AND STRFTIME('%y', labevents.charttime) <= '2101')
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: what are the number of patients who have had a cholesterol ratio (total/hdl) test until 2101? ### Input: CREATE TABLE patien...
What are the profits (in billions) where the assets are 192.8 billion?
CREATE TABLE table_1682026_3 ( profits__billion_$_ VARCHAR, assets__billion_$_ VARCHAR )
SELECT profits__billion_$_ FROM table_1682026_3 WHERE assets__billion_$_ = "192.8"
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 are the profits (in billions) where the assets are 192.8 billion? ### Input: CREATE TABLE table_1682026_3 ( profits...
give the number of patients whose primary disease is aortic valve insufficiency/aortic valve replacement/sda and were born before the year 2074.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND demographic.dob_year < "2074"
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 the number of patients whose primary disease is aortic valve insufficiency/aortic valve replacement/sda and were born b...
Who was on the pole position in the Texaco/Havoline 200 race?
CREATE TABLE table_19908651_3 ( pole_position VARCHAR, race_name VARCHAR )
SELECT pole_position FROM table_19908651_3 WHERE race_name = "Texaco/Havoline 200"
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 on the pole position in the Texaco/Havoline 200 race? ### Input: CREATE TABLE table_19908651_3 ( pole_position V...
What is the first name of each student who is not allergic to any type of food? Count them in a bar chart, sort from high to low by the x axis.
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER...
SELECT Fname, COUNT(Fname) 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 Fname ORDER BY Fname 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: What is the first name of each student who is not allergic to any type of food? Count them in a bar chart, sort from high to...
How old is Darryll Holland's horse
CREATE TABLE table_13498403_1 ( barrier VARCHAR, jockey VARCHAR )
SELECT barrier FROM table_13498403_1 WHERE jockey = "Darryll Holland"
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 old is Darryll Holland's horse ### Input: CREATE TABLE table_13498403_1 ( barrier VARCHAR, jockey VARCHAR ) ### ...
What is Record, when Date is 'November 22'?
CREATE TABLE table_name_72 ( record VARCHAR, date VARCHAR )
SELECT record FROM table_name_72 WHERE date = "november 22"
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 Record, when Date is 'November 22'? ### Input: CREATE TABLE table_name_72 ( record VARCHAR, date VARCHAR ) #...
when did patient 030-8973 the first time had ventric output since 12/25/2103?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutpu...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-8973')) AND intakeoutput.cellpath LIKE '%output%'...
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 030-8973 the first time had ventric output since 12/25/2103? ### Input: CREATE TABLE diagnosis ( diagno...
How many matches did Bet365 gives higher home win odds than Pinnacle?
CREATE TABLE betfront ( year number, datetime time, country text, competion text, match text, home_opening number, draw_opening number, away_opening number, home_closing number, draw_closing number, away_closing number ) CREATE TABLE football_data ( season text, date...
SELECT COUNT(*) FROM football_data WHERE b365h > psh
worldsoccerdatabase
Below are sql tables 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 matches did Bet365 gives higher home win odds than Pinnacle? ### Input: CREATE TABLE betfront ( year number, ...
What was the name for the locomotive with a type of 2-8-0 and a number of 20?
CREATE TABLE table_name_23 ( name VARCHAR, type VARCHAR, number VARCHAR )
SELECT name FROM table_name_23 WHERE type = "2-8-0" AND number = 20
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 name for the locomotive with a type of 2-8-0 and a number of 20? ### Input: CREATE TABLE table_name_23 ( na...
List the name of film studio that have the most number of films.
CREATE TABLE film ( Studio VARCHAR )
SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 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: List the name of film studio that have the most number of films. ### Input: CREATE TABLE film ( Studio VARCHAR ) ### Res...
What is the minimum rnd at Laguna Seca?
CREATE TABLE table_29641 ( "Rnd" real, "Circuit" text, "Sports +2.0 Winning Team" text, "Sports 2.0 Winning Team" text, "GT +2.0 Winning Team" text, "GT 2.0 Winning Team" text, "Results" text )
SELECT MIN("Rnd") FROM table_29641 WHERE "Circuit" = 'Laguna Seca'
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 minimum rnd at Laguna Seca? ### Input: CREATE TABLE table_29641 ( "Rnd" real, "Circuit" text, "Sport...
tell me the number of juniors on the team .
CREATE TABLE table_204_534 ( id number, "#" number, "name" text, "height" text, "weight (lbs.)" number, "position" text, "class" text, "hometown" text, "previous team(s)" text )
SELECT COUNT(*) FROM table_204_534 WHERE "class" = 'jr'
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: tell me the number of juniors on the team . ### Input: CREATE TABLE table_204_534 ( id number, "#" number, "name...
What is the Circuit in the ATCC Round 1 Series with Winner Jim Richards?
CREATE TABLE table_name_34 ( circuit VARCHAR, winner VARCHAR, series VARCHAR )
SELECT circuit FROM table_name_34 WHERE winner = "jim richards" AND series = "atcc round 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: What is the Circuit in the ATCC Round 1 Series with Winner Jim Richards? ### Input: CREATE TABLE table_name_34 ( circuit...
What was the greatest number of laps run?
CREATE TABLE table_27940569_1 ( laps INTEGER )
SELECT MAX(laps) FROM table_27940569_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: What was the greatest number of laps run? ### Input: CREATE TABLE table_27940569_1 ( laps INTEGER ) ### Response: SELECT...
What is the pick number if the player is Gary Kubiak?
CREATE TABLE table_2508633_8 ( pick__number VARCHAR, player VARCHAR )
SELECT pick__number FROM table_2508633_8 WHERE player = "Gary Kubiak"
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 pick number if the player is Gary Kubiak? ### Input: CREATE TABLE table_2508633_8 ( pick__number VARCHAR, ...
how many patients are admitted before the year 2178 and test results from lab shows abnormal status?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2178" AND lab.flag = "delta"
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 admitted before the year 2178 and test results from lab shows abnormal status? ### Input: CREATE TABLE...
What was the score for south melbourne at home?
CREATE TABLE table_name_2 ( home_team VARCHAR )
SELECT home_team AS score FROM table_name_2 WHERE home_team = "south melbourne"
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 score for south melbourne at home? ### Input: CREATE TABLE table_name_2 ( home_team VARCHAR ) ### Response:...
What was the production code for 'down to earth'?
CREATE TABLE table_23548 ( "#" text, "Original title" text, "Directed by" text, "Written by" text, "Original airdate" text, "Production code" text )
SELECT "Production code" FROM table_23548 WHERE "Original title" = 'Down to Earth'
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 production code for 'down to earth'? ### Input: CREATE TABLE table_23548 ( "#" text, "Original title" t...
Draw a bar chart for how many patients do each physician take care of? List their names and number of patients they take care of, and I want to display in asc by the X.
CREATE TABLE Patient ( SSN INTEGER, Name VARCHAR(30), Address VARCHAR(30), Phone VARCHAR(30), InsuranceID INTEGER, PCP INTEGER ) CREATE TABLE Appointment ( AppointmentID INTEGER, Patient INTEGER, PrepNurse INTEGER, Physician INTEGER, Start DATETIME, End DATETIME, Exa...
SELECT T1.Name, COUNT(*) FROM Physician AS T1 JOIN Patient AS T2 ON T1.EmployeeID = T2.PCP GROUP BY T1.EmployeeID ORDER BY T1.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: Draw a bar chart for how many patients do each physician take care of? List their names and number of patients they take car...
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, I want to display X-axis from low to high order.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID
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 was hired before 2002-06-21, return a bar chart about the distribution of job_id and the average of ...
What results has a week smaller than 2?
CREATE TABLE table_34873 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" real )
SELECT "Result" FROM table_34873 WHERE "Week" < '2'
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 results has a week smaller than 2? ### Input: CREATE TABLE table_34873 ( "Week" real, "Date" text, "Opponen...
Which classes have been or will be taught by Prof. Sonya Lewis ?
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday v...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Sonya Lewis%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = c...
advising
Below are sql tables 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 classes have been or will be taught by Prof. Sonya Lewis ? ### Input: CREATE TABLE program_course ( program_id int...
What was the pick # for round 11?
CREATE TABLE table_47831 ( "Round" real, "Pick #" real, "Player" text, "Position" text, "College" text )
SELECT "Pick #" FROM table_47831 WHERE "Round" = '11'
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 pick # for round 11? ### Input: CREATE TABLE table_47831 ( "Round" real, "Pick #" real, "Player" te...
What are the name and id of the team offering the lowest average salary?
CREATE TABLE hall_of_fame ( player_id text, yearid number, votedby text, ballots number, needed number, votes number, inducted text, category text, needed_note text ) CREATE TABLE pitching_postseason ( player_id text, year number, round text, team_id text, league...
SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1
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 the name and id of the team offering the lowest average salary? ### Input: CREATE TABLE hall_of_fame ( player_i...
User profiles with ##Tag## ##Badge Class# in EMEA.
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, C...
SELECT u.Id AS "user_link", u.DisplayName, u.Location, u.Reputation, u.WebsiteUrl FROM Users AS u, Badges AS B WHERE (u.Location LIKE ('%nited%ingdom%') OR u.Location LIKE ('%UK%') OR u.Location LIKE ('%uk%') OR u.Location LIKE ('%ondon%') OR u.Location LIKE ('%anchester%') OR u.Location LIKE ('%dinburgh%') OR u.Locati...
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: User profiles with ##Tag## ##Badge Class# in EMEA. ### Input: CREATE TABLE ReviewTaskTypes ( Id number, Name text, ...
Which 1956 has a County of v lcea, and a 2011 smaller than 371714?
CREATE TABLE table_39345 ( "County" text, "1948" real, "1956" real, "1966" real, "1977" real, "1992" real, "2002" real, "2011" real )
SELECT SUM("1956") FROM table_39345 WHERE "County" = 'vâlcea' AND "2011" < '371714'
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 1956 has a County of v lcea, and a 2011 smaller than 371714? ### Input: CREATE TABLE table_39345 ( "County" text, ...
What poll source claimed that Republican: Kenny Hulshof had 43%?
CREATE TABLE table_21794 ( "Poll Source" text, "Dates administered" text, "Democrat: Jay Nixon" text, "Republican: Kenny Hulshof" text, "Lead Margin" text )
SELECT "Poll Source" FROM table_21794 WHERE "Republican: Kenny Hulshof" = '43%'
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 poll source claimed that Republican: Kenny Hulshof had 43%? ### Input: CREATE TABLE table_21794 ( "Poll Source" tex...
For those employees who did not have any job in the past, draw a bar chart about the distribution of job_id and the average of manager_id , and group by attribute job_id.
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID
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, draw a bar chart about the distribution of job_id and the average ...
Which is the most recent game with an attendance larger than 65,042?
CREATE TABLE table_11660 ( "Game" real, "Date" text, "Location" text, "Time" text, "Attendance" real )
SELECT MAX("Game") FROM table_11660 WHERE "Attendance" > '65,042'
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 is the most recent game with an attendance larger than 65,042? ### Input: CREATE TABLE table_11660 ( "Game" real, ...
this year what was the four most commonly ordered specimen test?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( row_id number, subject_id num...
SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t...
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: this year what was the four most commonly ordered specimen test? ### Input: CREATE TABLE d_items ( row_id number, it...
what is the number of patients whose discharge location is disc-tran cancer/chldrn h and procedure long title is incision of vessel, abdominal arteries?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.long_title = "Incision of vessel, abdominal arteries"
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 the number of patients whose discharge location is disc-tran cancer/chldrn h and procedure long title is incision of...
Cobden has more than 1487 against and what average of losses?
CREATE TABLE table_name_77 ( losses INTEGER, club VARCHAR, against VARCHAR )
SELECT AVG(losses) FROM table_name_77 WHERE club = "cobden" AND against > 1487
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: Cobden has more than 1487 against and what average of losses? ### Input: CREATE TABLE table_name_77 ( losses INTEGER, ...
What is the average Start term with a 1912 end term?
CREATE TABLE table_name_58 ( start_term INTEGER, end_term VARCHAR )
SELECT AVG(start_term) FROM table_name_58 WHERE end_term = 1912
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 average Start term with a 1912 end term? ### Input: CREATE TABLE table_name_58 ( start_term INTEGER, end...
Who directed the movie The Star Packer?
CREATE TABLE table_name_79 ( director VARCHAR, title VARCHAR )
SELECT director FROM table_name_79 WHERE title = "the star packer"
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 directed the movie The Star Packer? ### Input: CREATE TABLE table_name_79 ( director VARCHAR, title VARCHAR ) ##...
Bar chart x axis publication date y axis how many publication date, could you order by the x-axis in ascending?
CREATE TABLE book ( Book_ID int, Title text, Issues real, Writer text ) CREATE TABLE publication ( Publication_ID int, Book_ID int, Publisher text, Publication_Date text, Price real )
SELECT Publication_Date, COUNT(Publication_Date) FROM publication GROUP BY Publication_Date ORDER BY Publication_Date
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: Bar chart x axis publication date y axis how many publication date, could you order by the x-axis in ascending? ### Input: C...
Which Tie has a Score of 5 1?
CREATE TABLE table_7605 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT "Tie no" FROM table_7605 WHERE "Score" = '5–1'
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 Tie has a Score of 5 1? ### Input: CREATE TABLE table_7605 ( "Tie no" text, "Home team" text, "Score" text...
Who wrote the episode where the original air date is july20,2007?
CREATE TABLE table_25716399_1 ( written_by VARCHAR, original_air_date VARCHAR )
SELECT written_by FROM table_25716399_1 WHERE original_air_date = "July20,2007"
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 episode where the original air date is july20,2007? ### Input: CREATE TABLE table_25716399_1 ( written_by ...
What is the total number of byes that has 13 losses and wins less than 5?
CREATE TABLE table_name_41 ( byes VARCHAR, losses VARCHAR, wins VARCHAR )
SELECT COUNT(byes) FROM table_name_41 WHERE losses = 13 AND wins < 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 total number of byes that has 13 losses and wins less than 5? ### Input: CREATE TABLE table_name_41 ( byes V...
what is the lowest position when the name is esv t rkheim, and Drawn more than 0?
CREATE TABLE table_name_12 ( position INTEGER, name VARCHAR, drawn VARCHAR )
SELECT MIN(position) FROM table_name_12 WHERE name = "esv türkheim" AND drawn > 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 is the lowest position when the name is esv t rkheim, and Drawn more than 0? ### Input: CREATE TABLE table_name_12 ( ...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a scatter chart about the correlation between commission_pct and manager_id .
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,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 regions ( REGION_...
SELECT COMMISSION_PCT, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
Name the average week for result of l 28 17
CREATE TABLE table_name_56 ( week INTEGER, result VARCHAR )
SELECT AVG(week) FROM table_name_56 WHERE result = "l 28–17"
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 average week for result of l 28 17 ### Input: CREATE TABLE table_name_56 ( week INTEGER, result VARCHAR ) #...
What is the description of the intact software?
CREATE TABLE table_25474825_1 ( description VARCHAR, software VARCHAR )
SELECT description FROM table_25474825_1 WHERE software = "IntAct"
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 description of the intact software? ### Input: CREATE TABLE table_25474825_1 ( description VARCHAR, soft...
What is the Surface when Todd Woodbridge was the runner-up, and a Date of 24 february 1997?
CREATE TABLE table_name_77 ( surface VARCHAR, outcome VARCHAR, date VARCHAR )
SELECT surface FROM table_name_77 WHERE outcome = "runner-up" AND date = "24 february 1997"
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 Surface when Todd Woodbridge was the runner-up, and a Date of 24 february 1997? ### Input: CREATE TABLE table_na...
count the number of patients for whom lorazepam 2 mg/1 ml 1 ml inj was prescribed within 2 months after having been diagnosed with primary lung cancer - small cell ca since 2105.
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE a...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'primary lung cancer - small cell ca' AND STRFTIME('%y', diagnosis.diagnosistime) >= '2105') AS t1 JOIN (SELE...
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 for whom lorazepam 2 mg/1 ml 1 ml inj was prescribed within 2 months after having been diagnose...
Which Streak has a Game larger than 49?
CREATE TABLE table_name_56 ( streak VARCHAR, game INTEGER )
SELECT streak FROM table_name_56 WHERE game > 49
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 Streak has a Game larger than 49? ### Input: CREATE TABLE table_name_56 ( streak VARCHAR, game INTEGER ) ### R...
What is Chep n's average UBIGEO?
CREATE TABLE table_name_34 ( ubigeo INTEGER, province VARCHAR )
SELECT AVG(ubigeo) FROM table_name_34 WHERE province = "chepén"
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 Chep n's average UBIGEO? ### Input: CREATE TABLE table_name_34 ( ubigeo INTEGER, province VARCHAR ) ### Resp...
What is Played, when Tries Against is '63'?
CREATE TABLE table_name_81 ( played VARCHAR, tries_against VARCHAR )
SELECT played FROM table_name_81 WHERE tries_against = "63"
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 Played, when Tries Against is '63'? ### Input: CREATE TABLE table_name_81 ( played VARCHAR, tries_against VA...
List the torque possible when the stroke is 88.4mm?
CREATE TABLE table_21021796_1 ( torque VARCHAR, stroke VARCHAR )
SELECT torque FROM table_21021796_1 WHERE stroke = "88.4mm"
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: List the torque possible when the stroke is 88.4mm? ### Input: CREATE TABLE table_21021796_1 ( torque VARCHAR, strok...
Which Parish (Prestegjeld) was built in 1907?
CREATE TABLE table_62469 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
SELECT "Parish (Prestegjeld)" FROM table_62469 WHERE "Year Built" = '1907'
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 Parish (Prestegjeld) was built in 1907? ### Input: CREATE TABLE table_62469 ( "Parish (Prestegjeld)" text, "Su...
Name the builder for 4/1906 and works number more than 199
CREATE TABLE table_name_90 ( builder VARCHAR, works_number VARCHAR, date VARCHAR )
SELECT builder FROM table_name_90 WHERE works_number > 199 AND date = "4/1906"
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 builder for 4/1906 and works number more than 199 ### Input: CREATE TABLE table_name_90 ( builder VARCHAR, ...
Find the number of records of each policy type and its type code.
CREATE TABLE policies ( policy_type_code VARCHAR )
SELECT policy_type_code, COUNT(*) FROM policies GROUP BY policy_type_code
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 number of records of each policy type and its type code. ### Input: CREATE TABLE policies ( policy_type_code VA...
How many members arrived on the main island in week 4?
CREATE TABLE table_72226 ( "Member" text, "Week Arrived On Main Island" text, "Week Sent To Third Island" text, "Original Tribe" text, "Tribe They Chose To Win" text )
SELECT COUNT("Member") FROM table_72226 WHERE "Week Arrived On Main Island" = '4'
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 members arrived on the main island in week 4? ### Input: CREATE TABLE table_72226 ( "Member" text, "Week Ar...
Return a bar chart on how many musicals has each nominee been nominated for?
CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int )
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee
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 on how many musicals has each nominee been nominated for? ### Input: CREATE TABLE musical ( Musical_I...
what is patient 15257's last careunit when they visited the hospital first time?
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15257 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND NOT transfers.careunit IS NULL ORDER BY transfers.intime DESC LIMIT 1
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: what is patient 15257's last careunit when they visited the hospital first time? ### Input: CREATE TABLE admissions ( ro...
Who was the winner at Milan Circuit Race?
CREATE TABLE table_64847 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text )
SELECT "Winner" FROM table_64847 WHERE "Course" = 'milan circuit race'
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: Who was the winner at Milan Circuit Race? ### Input: CREATE TABLE table_64847 ( "Date" text, "Course" text, "Dis...
WHAT IS THE HIGHEST WINS WITH AGAINST SMALLER THAN 924, LOSSES SMALLER THAN 2?
CREATE TABLE table_12119 ( "Mininera DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
SELECT MAX("Wins") FROM table_12119 WHERE "Against" < '924' AND "Losses" < '2'
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 WINS WITH AGAINST SMALLER THAN 924, LOSSES SMALLER THAN 2? ### Input: CREATE TABLE table_12119 ( "Mi...
Users by number of famous question badges.
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate tim...
SELECT DisplayName, COUNT(*) AS number FROM Posts INNER JOIN Users ON Posts.OwnerUserId = Users.Id GROUP BY DisplayName ORDER BY number DESC
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 by number of famous question badges. ### Input: CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId numbe...
list each player drafted from canada .
CREATE TABLE table_203_305 ( id number, "round" number, "#" number, "player" text, "nationality" text, "college/junior/club team (league)" text )
SELECT "player" FROM table_203_305 WHERE "nationality" = 'canada'
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: list each player drafted from canada . ### Input: CREATE TABLE table_203_305 ( id number, "round" number, "#" nu...
What was the Series in 2009?
CREATE TABLE table_42156 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Points" text, "Position" text )
SELECT "Series" FROM table_42156 WHERE "Season" = '2009'
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 Series in 2009? ### Input: CREATE TABLE table_42156 ( "Season" real, "Series" text, "Team" text, ...
What was the date when the away team was carlisle united?
CREATE TABLE table_name_50 ( date VARCHAR, away_team VARCHAR )
SELECT date FROM table_name_50 WHERE away_team = "carlisle united"
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 date when the away team was carlisle united? ### Input: CREATE TABLE table_name_50 ( date VARCHAR, away...
What nationality is listed when the college/junior/club team is oshawa generals (ohl)?
CREATE TABLE table_30578 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
SELECT "Nationality" FROM table_30578 WHERE "College/junior/club team" = 'Oshawa Generals (OHL)'
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 nationality is listed when the college/junior/club team is oshawa generals (ohl)? ### Input: CREATE TABLE table_30578 (...
What is the score of the away team that played home team Geelong?
CREATE TABLE table_name_18 ( away_team VARCHAR, home_team VARCHAR )
SELECT away_team AS score FROM table_name_18 WHERE home_team = "geelong"
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 score of the away team that played home team Geelong? ### Input: CREATE TABLE table_name_18 ( away_team VARC...
count the amount of hospital visits for patient 029-27704 during this year.
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, ...
SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '029-27704' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
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 amount of hospital visits for patient 029-27704 during this year. ### Input: CREATE TABLE intakeoutput ( intak...
Which country has the Narita International Airport?
CREATE TABLE table_name_20 ( country VARCHAR, airport VARCHAR )
SELECT country FROM table_name_20 WHERE airport = "narita international airport"
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 country has the Narita International Airport? ### Input: CREATE TABLE table_name_20 ( country VARCHAR, airport...
Which city has an IATA of tsa?
CREATE TABLE table_14655 ( "City" text, "Province/Region" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
SELECT "City" FROM table_14655 WHERE "IATA" = 'tsa'
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 city has an IATA of tsa? ### Input: CREATE TABLE table_14655 ( "City" text, "Province/Region" text, "Count...
What is the highest number played when there were less than 13 losses and a goal difference of +46?
CREATE TABLE table_name_89 ( played INTEGER, lost VARCHAR, goal_difference VARCHAR )
SELECT MAX(played) FROM table_name_89 WHERE lost < 13 AND goal_difference = "+46"
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 highest number played when there were less than 13 losses and a goal difference of +46? ### Input: CREATE TABLE ...
find all dependent names who have a spouse relation with some employee.
CREATE TABLE dependent ( Dependent_name VARCHAR, relationship VARCHAR )
SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse'
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 dependent names who have a spouse relation with some employee. ### Input: CREATE TABLE dependent ( Dependent_na...
What constructor has an engine of cosworth cr-2 and a driver of luciano burti?
CREATE TABLE table_name_52 ( constructor VARCHAR, engine_† VARCHAR, driver VARCHAR )
SELECT constructor FROM table_name_52 WHERE engine_† = "cosworth cr-2" AND driver = "luciano burti"
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 constructor has an engine of cosworth cr-2 and a driver of luciano burti? ### Input: CREATE TABLE table_name_52 ( c...
how many competitors from venezuela qualified for the final ?
CREATE TABLE table_204_886 ( id number, "rank" number, "swimmer" text, "country" text, "time" text, "note" text )
SELECT COUNT("swimmer") FROM table_204_886 WHERE "country" = 'venezuela'
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 competitors from venezuela qualified for the final ? ### Input: CREATE TABLE table_204_886 ( id number, "ra...
Draw a bar chart for what is the average base price of rooms, for each bed type?, display x axis in asc order.
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 bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY bedType
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: Draw a bar chart for what is the average base price of rooms, for each bed type?, display x axis in asc order. ### Input: CR...
what is the nhl team for the player john maclean?
CREATE TABLE table_29005 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
SELECT "NHL team" FROM table_29005 WHERE "Player" = 'John MacLean'
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 nhl team for the player john maclean? ### Input: CREATE TABLE table_29005 ( "Pick #" real, "Player" text...
What was the original name for the song performed by Brad Kavanagh?
CREATE TABLE table_name_42 ( original_name VARCHAR, singer_s_ VARCHAR )
SELECT original_name FROM table_name_42 WHERE singer_s_ = "brad kavanagh"
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 original name for the song performed by Brad Kavanagh? ### Input: CREATE TABLE table_name_42 ( original_nam...
the first time patient 011-55939 was diagnosed during the last year with hyperglycemia - stress related?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CRE...
SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-55939')) AND diagnosis.diagnosisname = 'hyperglycemia - stres...
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: the first time patient 011-55939 was diagnosed during the last year with hyperglycemia - stress related? ### Input: CREATE T...
what is the mountain peak when the location is 37.5775 n 105.4856 w?
CREATE TABLE table_name_73 ( mountain_peak VARCHAR, location VARCHAR )
SELECT mountain_peak FROM table_name_73 WHERE location = "37.5775°n 105.4856°w"
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 mountain peak when the location is 37.5775 n 105.4856 w? ### Input: CREATE TABLE table_name_73 ( mountain_pe...
Which the highest Round has a Player of mike williams, and a Pick # larger than 4?
CREATE TABLE table_46332 ( "Round" real, "Pick #" real, "Player" text, "Position" text, "College" text )
SELECT MAX("Round") FROM table_46332 WHERE "Player" = 'mike williams' AND "Pick #" > '4'
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 the highest Round has a Player of mike williams, and a Pick # larger than 4? ### Input: CREATE TABLE table_46332 ( ...
Top 50 users from France.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%france%' OR UPPER(Location) LIKE '%france' ORDER BY Reputation DESC LIMIT 2500
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: Top 50 users from France. ### Input: CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) C...
What are characteristic names used at least twice across all products?
CREATE TABLE ref_colors ( color_code text, color_description text ) CREATE TABLE characteristics ( characteristic_id number, characteristic_type_code text, characteristic_data_type text, characteristic_name text, other_characteristic_details text ) CREATE TABLE ref_characteristic_types ( ...
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING COUNT(*) >= 2
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 characteristic names used at least twice across all products? ### Input: CREATE TABLE ref_colors ( color_code t...
What position does Mario Kasun play?
CREATE TABLE table_80283 ( "Player" text, "Height" real, "Position" text, "Year born" real, "Current Club" text )
SELECT "Position" FROM table_80283 WHERE "Player" = 'mario kasun'
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 position does Mario Kasun play? ### Input: CREATE TABLE table_80283 ( "Player" text, "Height" real, "Positi...
What Other classes will be offered over the Winter ?
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester i...
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 INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour...
advising
Below are sql tables 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 Other classes will be offered over the Winter ? ### Input: CREATE TABLE program ( program_id int, name varchar,...
Who was the batting team in the 2006 season?
CREATE TABLE table_45684 ( "Wicket" text, "Runs" text, "Batting partners" text, "Batting team" text, "Fielding team" text, "Venue" text, "Season" text )
SELECT "Batting team" FROM table_45684 WHERE "Season" = '2006'
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: Who was the batting team in the 2006 season? ### Input: CREATE TABLE table_45684 ( "Wicket" text, "Runs" text, "...
Which round was Robert Deciantis taken in?
CREATE TABLE table_35054 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team" text )
SELECT "Round" FROM table_35054 WHERE "Player" = 'robert deciantis'
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 round was Robert Deciantis taken in? ### Input: CREATE TABLE table_35054 ( "Round" real, "Player" text, "P...
Show the shortest duration and lowest rating of songs grouped by genre using a bar chart.
CREATE TABLE artist ( artist_name varchar2(50), country varchar2(20), gender varchar2(20), preferred_genre varchar2(50) ) CREATE TABLE song ( song_name varchar2(50), artist_name varchar2(50), country varchar2(20), f_id number(10), genre_is varchar2(20), rating number(10), la...
SELECT MIN(T1.duration), MIN(T2.rating) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY MIN(T1.duration)
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: Show the shortest duration and lowest rating of songs grouped by genre using a bar chart. ### Input: CREATE TABLE artist ( ...
what is the number of patients whose language is span and year of birth is less than 2074?
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 WHERE demographic.language = "SPAN" AND demographic.dob_year < "2074"
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 the number of patients whose language is span and year of birth is less than 2074? ### Input: CREATE TABLE demograph...
Show all video game types.
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE plays_games ( stuid number, gameid number, hours_played number ) CREATE TABLE video_games ( gameid number, gname text, ...
SELECT DISTINCT gtype FROM video_games
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: Show all video game types. ### Input: CREATE TABLE student ( stuid number, lname text, fname text, age numbe...
Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.
CREATE TABLE College ( cName VARCHAR, enr VARCHAR, state VARCHAR )
SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"
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 names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. ### Inp...
what were the five most common medications prescribed to male patients in the 30s during the same hospital visit after they had been diagnosed with hyperlipidemia nec/nos in 2105?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_co...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_...
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: what were the five most common medications prescribed to male patients in the 30s during the same hospital visit after they ...
Plot how many booking start date by grouped by booking start date as a bar graph, order Y in ascending order.
CREATE TABLE Apartment_Buildings ( building_id INTEGER, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80) ) CREATE TABLE Apartments ( apt_id INTEGER, ...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings ORDER BY COUNT(booking_start_date)
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: Plot how many booking start date by grouped by booking start date as a bar graph, order Y in ascending order. ### Input: CRE...
What was the score on the episode that had Russell Kane and Louise Redknapp on Sean's team?
CREATE TABLE table_23292220_13 ( scores VARCHAR, seans_team VARCHAR )
SELECT scores FROM table_23292220_13 WHERE seans_team = "Russell Kane and Louise Redknapp"
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 score on the episode that had Russell Kane and Louise Redknapp on Sean's team? ### Input: CREATE TABLE table_23...
Which team had an average of 20.4?
CREATE TABLE table_2208838_4 ( team VARCHAR, average VARCHAR )
SELECT team FROM table_2208838_4 WHERE average = "20.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 team had an average of 20.4? ### Input: CREATE TABLE table_2208838_4 ( team VARCHAR, average VARCHAR ) ### Res...
Name the fate in 1832 for pembrokeshire
CREATE TABLE table_24329520_4 ( fate_in_1832 VARCHAR, county VARCHAR )
SELECT fate_in_1832 FROM table_24329520_4 WHERE county = "Pembrokeshire"
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 fate in 1832 for pembrokeshire ### Input: CREATE TABLE table_24329520_4 ( fate_in_1832 VARCHAR, county VARC...
Return the name of the team and the acc during the regular season for the school that was founded the earliest.
CREATE TABLE basketball_match ( team_id number, school_id number, team_name text, acc_regular_season text, acc_percent text, acc_home text, acc_road text, all_games text, all_games_percent number, all_home text, all_road text, all_neutral text ) CREATE TABLE university (...
SELECT t2.team_name, t2.acc_regular_season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1
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: Return the name of the team and the acc during the regular season for the school that was founded the earliest. ### Input: C...
What is the build date for PRR Class gf30a?
CREATE TABLE table_name_80 ( build_date VARCHAR, prr_class VARCHAR )
SELECT build_date FROM table_name_80 WHERE prr_class = "gf30a"
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 build date for PRR Class gf30a? ### Input: CREATE TABLE table_name_80 ( build_date VARCHAR, prr_class VA...
What was the distance in the Manikato Stakes race?
CREATE TABLE table_2581397_4 ( distance VARCHAR, race VARCHAR )
SELECT distance FROM table_2581397_4 WHERE race = "Manikato Stakes"
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 distance in the Manikato Stakes race? ### Input: CREATE TABLE table_2581397_4 ( distance VARCHAR, race ...
How many acres does the area of Lissagroom with Bandon as its poor law union cover?
CREATE TABLE table_31507 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text )
SELECT "Area( acres )" FROM table_31507 WHERE "Poor law union" = 'Bandon' AND "Townland" = 'Lissagroom'
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 acres does the area of Lissagroom with Bandon as its poor law union cover? ### Input: CREATE TABLE table_31507 ( ...
Return the first names and last names of all guests
CREATE TABLE Guests ( guest_first_name VARCHAR, guest_last_name VARCHAR )
SELECT guest_first_name, guest_last_name FROM Guests
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: Return the first names and last names of all guests ### Input: CREATE TABLE Guests ( guest_first_name VARCHAR, guest...
Which season is it when Milouska was the show's mole ?
CREATE TABLE table_178242_7 ( season VARCHAR, the_mole VARCHAR )
SELECT season FROM table_178242_7 WHERE the_mole = "Milouska"
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 season is it when Milouska was the show's mole ? ### Input: CREATE TABLE table_178242_7 ( season VARCHAR, the_...