instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
When were the callback auditions at Hilton Riverside Hotel held?
CREATE TABLE table_29527 ( "Episode air date" text, "Audition city" text, "First audition date" text, "Audition venue" text, "Callback audition date" text, "Callback venue" text, "Golden tickets" text )
SELECT "Callback audition date" FROM table_29527 WHERE "Callback venue" = 'Hilton Riverside Hotel'
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 were the callback auditions at Hilton Riverside Hotel held? ### Input: CREATE TABLE table_29527 ( "Episode air date...
For those employees who was hired before 2002-06-21, show me about the distribution of job_id and the amount of job_id , and group by attribute job_id in a bar chart, and order y-axis from low to high order.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY COUNT(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, show me about the distribution of job_id and the amount of job_id , and...
What is the 2010 value with a 2r in 200r and a 3r in 2011?
CREATE TABLE table_68055 ( "Tournament" text, "1999" text, "2002" text, "2004" text, "2006" text, "2007" text, "2010" text, "2011" text, "2012" text )
SELECT "2010" FROM table_68055 WHERE "2004" = '2r' AND "2011" = '3r'
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 2010 value with a 2r in 200r and a 3r in 2011? ### Input: CREATE TABLE table_68055 ( "Tournament" text, ...
How many NBA years did the player from the United States who was previously on the los angeles lakers have?
CREATE TABLE table_name_58 ( nba_years_ VARCHAR, a_ VARCHAR, nationality VARCHAR, previous_team VARCHAR )
SELECT nba_years_ AS "a_" FROM table_name_58 WHERE nationality = "united states" AND previous_team = "los angeles lakers"
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 NBA years did the player from the United States who was previously on the los angeles lakers have? ### Input: CREAT...
What are Doug Davis' maximum pitching stats?
CREATE TABLE table_2174 ( "Pitcher" text, "Stats" real, "Wins" real, "Losses" real, "No decisions" real, "Winning %" text, "Seasons" text )
SELECT MAX("Stats") FROM table_2174 WHERE "Pitcher" = 'Doug Davis'
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 are Doug Davis' maximum pitching stats? ### Input: CREATE TABLE table_2174 ( "Pitcher" text, "Stats" real, ...
For those employees who was hired before 2002-06-21, find hire_date and the amount of hire_date bin hire_date by time, and visualize them by a bar chart.
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE HIRE_DATE < '2002-06-21'
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, find hire_date and the amount of hire_date bin hire_date by time, and v...
What is the smallest Silver value associated with teams having more than 0 gold, 0 bronze, and a rank of 14?
CREATE TABLE table_name_75 ( silver INTEGER, gold VARCHAR, bronze VARCHAR, rank VARCHAR )
SELECT MIN(silver) FROM table_name_75 WHERE bronze = 0 AND rank = 14 AND gold > 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 smallest Silver value associated with teams having more than 0 gold, 0 bronze, and a rank of 14? ### Input: CREA...
How many games were played against Tulane?
CREATE TABLE table_20928682_1 ( opponents VARCHAR, opponent VARCHAR )
SELECT COUNT(opponents) FROM table_20928682_1 WHERE opponent = "Tulane"
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 games were played against Tulane? ### Input: CREATE TABLE table_20928682_1 ( opponents VARCHAR, opponent VA...
What is the Man of the Match of the Competition with a Result of lost 2-5?
CREATE TABLE table_7909 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" text, "Competition" text, "Man of the Match" text )
SELECT "Man of the Match" FROM table_7909 WHERE "Result" = 'lost 2-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 is the Man of the Match of the Competition with a Result of lost 2-5? ### Input: CREATE TABLE table_7909 ( "Date" t...
count the number of hospital visits made to patient 273 since 2104.
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate...
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 273 AND STRFTIME('%y', admissions.admittime) >= '2104'
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: count the number of hospital visits made to patient 273 since 2104. ### Input: CREATE TABLE d_labitems ( row_id number, ...
Tags ordered by average answer score (including CW).
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, ...
SELECT RANK() OVER (ORDER BY AVG(CAST(a.Score AS FLOAT)) DESC) AS Rank, t.TagName, AVG(CAST(a.Score AS FLOAT)) AS "average_score", COUNT(a.Id) AS Count, SUM(a.Score) AS "total_score" FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = p...
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: Tags ordered by average answer score (including CW). ### Input: CREATE TABLE ReviewRejectionReasons ( Id number, Nam...
give me the number of patients whose ethnicity is white - russian and diagnoses icd9 code is 30501?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND diagnoses.icd9_code = "30501"
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 ethnicity is white - russian and diagnoses icd9 code is 30501? ### Input: CREATE TABLE ...
Name the winning score for 54 holes of 5 shot deficit
CREATE TABLE table_39161 ( "Year" real, "Championship" text, "54 holes" text, "Winning score" text, "Margin" text, "Runner-up" text )
SELECT "Winning score" FROM table_39161 WHERE "54 holes" = '5 shot deficit'
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: Name the winning score for 54 holes of 5 shot deficit ### Input: CREATE TABLE table_39161 ( "Year" real, "Championsh...
What position was less than 421 overall played by Matt Clark?
CREATE TABLE table_14439 ( "Player" text, "Position" text, "Round" text, "Overall" real, "MLB Team" text )
SELECT "Position" FROM table_14439 WHERE "Overall" < '421' AND "Player" = 'matt clark'
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 was less than 421 overall played by Matt Clark? ### Input: CREATE TABLE table_14439 ( "Player" text, "...
what's the first elected with incumbent being joe starnes
CREATE TABLE table_18619 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "First elected" FROM table_18619 WHERE "Incumbent" = 'Joe Starnes'
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 first elected with incumbent being joe starnes ### Input: CREATE TABLE table_18619 ( "District" text, "In...
What is the rank associated with a Height feet / m of 427 / 130?
CREATE TABLE table_14717 ( "Rank" text, "Address" text, "Height feet / m" text, "Floors" real, "Year" text )
SELECT "Rank" FROM table_14717 WHERE "Height feet / m" = '427 / 130'
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 rank associated with a Height feet / m of 427 / 130? ### Input: CREATE TABLE table_14717 ( "Rank" text, ...
uncontrolled hypertension: disease systolic blood pressure ( sbp ) > 150 , diastolic blood pressure ( dbp ) > 110
CREATE TABLE table_dev_44 ( "id" int, "gender" string, "arterial_ph" float, "systolic_blood_pressure_sbp" int, "serum_bicarbonate" int, "anion_gap" int, "diabetic" string, "diabetic_ketoacidosis" bool, "blood_glucose" int, "diastolic_blood_pressure_dbp" int, "positive_serum_k...
SELECT * FROM table_dev_44 WHERE hypertension = 1 OR systolic_blood_pressure_sbp > 150 OR diastolic_blood_pressure_dbp > 110
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: uncontrolled hypertension: disease systolic blood pressure ( sbp ) > 150 , diastolic blood pressure ( dbp ) > 110 ### Input:...
Which player has a score of 70-68-69-73=280 and a place of t4?
CREATE TABLE table_name_28 ( player VARCHAR, place VARCHAR, score VARCHAR )
SELECT player FROM table_name_28 WHERE place = "t4" AND score = 70 - 68 - 69 - 73 = 280
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 player has a score of 70-68-69-73=280 and a place of t4? ### Input: CREATE TABLE table_name_28 ( player VARCHAR, ...
Any suggestions for some easier theory classes than SAC 190 ?
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%theory%' AND program_course.workload < (SELECT MIN(PROGRAM_COURSEalias1....
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: Any suggestions for some easier theory classes than SAC 190 ? ### Input: CREATE TABLE requirement ( requirement_id int, ...
what is the maximum total cost of a hospital visit that includes tracheal suctioning since 2 years ago?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'tracheal suctioning')) AND DATETIME(cost.cha...
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 is the maximum total cost of a hospital visit that includes tracheal suctioning since 2 years ago? ### Input: CREATE TA...
what is age and days of hospital stay of subject id 2560?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.age, demographic.days_stay FROM demographic WHERE demographic.subject_id = "2560"
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 age and days of hospital stay of subject id 2560? ### Input: CREATE TABLE demographic ( subject_id text, had...
which pylon has the most remarks about it ?
CREATE TABLE table_203_375 ( id number, "name" text, "year built" text, "country" text, "town" text, "height" text, "remarks" text )
SELECT "name" FROM table_203_375 ORDER BY LENGTH("remarks") 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: which pylon has the most remarks about it ? ### Input: CREATE TABLE table_203_375 ( id number, "name" text, "yea...
How many people were in attendance on January 4, 2008?
CREATE TABLE table_77811 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
SELECT SUM("Attendance") FROM table_77811 WHERE "Date" = 'january 4, 2008'
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 people were in attendance on January 4, 2008? ### Input: CREATE TABLE table_77811 ( "Date" text, "Visitor" ...
For those employees who did not have any job in the past, give me the comparison about the sum of department_id over the hire_date bin hire_date by weekday, show by the y-axis from low to high.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(DEPARTMENT_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, give me the comparison about the sum of department_id over the hir...
What is every entry for Saturday August 27 when the entry for Thursday August 25 is 23' 56.90 94.528mph?
CREATE TABLE table_30058355_7 ( sat_27_aug VARCHAR, thurs_25_aug VARCHAR )
SELECT sat_27_aug FROM table_30058355_7 WHERE thurs_25_aug = "23' 56.90 94.528mph"
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 every entry for Saturday August 27 when the entry for Thursday August 25 is 23' 56.90 94.528mph? ### Input: CREATE T...
what is the number of patients whose admission location is clinic referral/premature and primary disease is brain mass;intracranial hemorrhage?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE"
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 admission location is clinic referral/premature and primary disease is brain mass;intra...
Which season had 'angel'?
CREATE TABLE table_28385 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
SELECT "No. in season" FROM table_28385 WHERE "Title" = 'Angel'
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 season had 'angel'? ### Input: CREATE TABLE table_28385 ( "No. in series" real, "No. in season" real, "Tit...
What is the 1993 value of the French open?
CREATE TABLE table_46228 ( "Tournament" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text )
SELECT "1993" FROM table_46228 WHERE "Tournament" = 'french open'
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 1993 value of the French open? ### Input: CREATE TABLE table_46228 ( "Tournament" text, "1990" text, ...
Which Away team has the Home team of Carlton?
CREATE TABLE table_33170 ( "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_33170 WHERE "Home team" = 'carlton'
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 Away team has the Home team of Carlton? ### Input: CREATE TABLE table_33170 ( "Home team" text, "Home team sco...
what is primary disease and diagnoses short title of subject id 14755?
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.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "14755"
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 primary disease and diagnoses short title of subject id 14755? ### Input: CREATE TABLE prescriptions ( subject_i...
give the number of patients whose diagnosis short title is epistaxis and lab test category is chemistry.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Epistaxis" AND lab."CATEGORY" = "Chemistry"
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 diagnosis short title is epistaxis and lab test category is chemistry. ### Input: CREATE T...
how many times was the surface clay ?
CREATE TABLE table_204_868 ( id number, "outcome" text, "no." number, "date" text, "tournament" text, "surface" text, "opponent" text, "score" text )
SELECT COUNT(*) FROM table_204_868 WHERE "surface" = 'clay'
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 times was the surface clay ? ### Input: CREATE TABLE table_204_868 ( id number, "outcome" text, "no." n...
What home team played at Glenferrie Oval?
CREATE TABLE table_51355 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Home team" FROM table_51355 WHERE "Venue" = 'glenferrie 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 home team played at Glenferrie Oval? ### Input: CREATE TABLE table_51355 ( "Home team" text, "Home team score" ...
Name the date with a hard surface and tournament of usa f5, brownsville
CREATE TABLE table_name_83 ( date VARCHAR, surface VARCHAR, tournament VARCHAR )
SELECT date FROM table_name_83 WHERE surface = "hard" AND tournament = "usa f5, brownsville"
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 date with a hard surface and tournament of usa f5, brownsville ### Input: CREATE TABLE table_name_83 ( date VAR...
What was the venue before 2006, with the position of 10th?
CREATE TABLE table_68810 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text )
SELECT "Venue" FROM table_68810 WHERE "Year" < '2006' AND "Position" = '10th'
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 venue before 2006, with the position of 10th? ### Input: CREATE TABLE table_68810 ( "Year" real, "Compe...
what is the giro wins when jerseys is 2, country is portugal and young rider is more than 0?
CREATE TABLE table_name_29 ( giro_wins INTEGER, young_rider VARCHAR, jerseys VARCHAR, country VARCHAR )
SELECT SUM(giro_wins) FROM table_name_29 WHERE jerseys = 2 AND country = "portugal" AND young_rider > 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 giro wins when jerseys is 2, country is portugal and young rider is more than 0? ### Input: CREATE TABLE table_n...
How many third places has a total greater than 2 and a rank less than 2?
CREATE TABLE table_61425 ( "Rank" real, "Champion" text, "Runner-up" text, "Third place" text, "Fourth place" text, "Total" real )
SELECT "Third place" FROM table_61425 WHERE "Total" > '2' AND "Rank" < '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: How many third places has a total greater than 2 and a rank less than 2? ### Input: CREATE TABLE table_61425 ( "Rank" re...
What is the max gross weight of the Robinson R-22?
CREATE TABLE table_10006830_1 ( max_gross_weight VARCHAR, aircraft VARCHAR )
SELECT max_gross_weight FROM table_10006830_1 WHERE aircraft = "Robinson R-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 the max gross weight of the Robinson R-22? ### Input: CREATE TABLE table_10006830_1 ( max_gross_weight VARCHAR, ...
What is the average earnings of a United States player who had a score of 72-68-74-72=286?
CREATE TABLE table_name_58 ( earnings___ INTEGER, country VARCHAR, score VARCHAR )
SELECT AVG(earnings___) AS $__ FROM table_name_58 WHERE country = "united states" AND score = 72 - 68 - 74 - 72 = 286
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 earnings of a United States player who had a score of 72-68-74-72=286? ### Input: CREATE TABLE table_nam...
Who was the winner of Stage 12 with a Points Classification of Francesco Moser?
CREATE TABLE table_name_85 ( winner VARCHAR, points_classification VARCHAR, stage VARCHAR )
SELECT winner FROM table_name_85 WHERE points_classification = "francesco moser" AND stage = "12"
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 winner of Stage 12 with a Points Classification of Francesco Moser? ### Input: CREATE TABLE table_name_85 ( ...
Which team won at the symmons plains raceway?
CREATE TABLE table_name_42 ( team VARCHAR, circuit VARCHAR )
SELECT team FROM table_name_42 WHERE circuit = "symmons plains raceway"
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 won at the symmons plains raceway? ### Input: CREATE TABLE table_name_42 ( team VARCHAR, circuit VARCHAR ...
What was the 3rd Party in the Election of 1922?
CREATE TABLE table_57468 ( "Election" text, "1st Member" text, "1st Party" text, "2nd Member" text, "2nd Party" text, "3rd Member" text, "3rd Party" text )
SELECT "3rd Party" FROM table_57468 WHERE "Election" = '1922'
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 3rd Party in the Election of 1922? ### Input: CREATE TABLE table_57468 ( "Election" text, "1st Member" ...
What is the serial number of the model made in 1930?
CREATE TABLE table_63993 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Serial numbers" text, "Year made" text, "Quantity made" text, "Quantity preserved" text, "Year(s) retired" text )
SELECT "Serial numbers" FROM table_63993 WHERE "Year made" = '1930'
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 serial number of the model made in 1930? ### Input: CREATE TABLE table_63993 ( "Class" text, "Wheel arra...
what was the number of the enrollment in 1967 ?
CREATE TABLE table_204_442 ( id number, "institution" text, "location" text, "enrollment" number, "nickname" text, "varsity\nsports" number, "rugby\nsince" text, "head coach" text )
SELECT "enrollment" FROM table_204_442 WHERE "rugby\nsince" = 1967
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 number of the enrollment in 1967 ? ### Input: CREATE TABLE table_204_442 ( id number, "institution" tex...
Which county team has jimmy finn as the player?
CREATE TABLE table_name_88 ( county_team VARCHAR, player VARCHAR )
SELECT county_team FROM table_name_88 WHERE player = "jimmy finn"
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 county team has jimmy finn as the player? ### Input: CREATE TABLE table_name_88 ( county_team VARCHAR, player ...
state the status of pick # 32
CREATE TABLE table_20898602_1 ( status VARCHAR, pick__number VARCHAR )
SELECT status FROM table_20898602_1 WHERE pick__number = 32
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: state the status of pick # 32 ### Input: CREATE TABLE table_20898602_1 ( status VARCHAR, pick__number VARCHAR ) ### ...
Find answers containing decorator to questions not containing decorator.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate...
SELECT answers.Id AS "post_link", answers.* FROM Posts AS questions INNER JOIN Posts AS answers ON questions.Id = answers.ParentId WHERE questions.PostTypeId = 1 AND answers.PostTypeId = 2 AND answers.Body LIKE '%strategy%' AND NOT questions.Body LIKE '%strategy%' AND questions.Score > 0 AND questions.Tags LIKE '%java%...
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: Find answers containing decorator to questions not containing decorator. ### Input: CREATE TABLE ReviewTaskStates ( Id n...
what was the five most frequent drugs that were prescribed within 2 months to a female patient of age 30s after they had been diagnosed with hypertension nos, during this year?
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_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id numbe...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
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 was the five most frequent drugs that were prescribed within 2 months to a female patient of age 30s after they had bee...
What was the Record of the game in which the Trail Blazers was the visiting team?
CREATE TABLE table_56726 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
SELECT "Record" FROM table_56726 WHERE "Visitor" = 'trail blazers'
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 in which the Trail Blazers was the visiting team? ### Input: CREATE TABLE table_56726 ( ...
what is 2008 when the tournament is year end ranking?
CREATE TABLE table_59942 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
SELECT "2008" FROM table_59942 WHERE "Tournament" = 'year end ranking'
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 2008 when the tournament is year end ranking? ### Input: CREATE TABLE table_59942 ( "Tournament" text, "2006...
How many seats does the BTC-5 model have?
CREATE TABLE table_79959 ( "Year built" text, "Builder" text, "Model" text, "Fleet ID" text, "Seats" real )
SELECT SUM("Seats") FROM table_79959 WHERE "Model" = 'btc-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: How many seats does the BTC-5 model have? ### Input: CREATE TABLE table_79959 ( "Year built" text, "Builder" text, ...
Who had 1344 points?
CREATE TABLE table_name_79 ( name VARCHAR, points VARCHAR )
SELECT name FROM table_name_79 WHERE points = 1344
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 had 1344 points? ### Input: CREATE TABLE table_name_79 ( name VARCHAR, points VARCHAR ) ### Response: SELECT nam...
What year did Bryant Heating enter?
CREATE TABLE table_name_48 ( year INTEGER, entrant VARCHAR )
SELECT SUM(year) FROM table_name_48 WHERE entrant = "bryant heating"
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 did Bryant Heating enter? ### Input: CREATE TABLE table_name_48 ( year INTEGER, entrant VARCHAR ) ### Resp...
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and manufacturer , and group by attribute name, could you sort by the X-axis in desc?
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.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: For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name an...
how many release dates were in april ?
CREATE TABLE table_204_696 ( id number, "issue" number, "volume" number, "title" text, "main feature story" text, "first/early appearance story/stories" text, "release date" text )
SELECT COUNT("release date") FROM table_204_696 WHERE "release date" = 4
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 release dates were in april ? ### Input: CREATE TABLE table_204_696 ( id number, "issue" number, "volum...
Which 20-29 had a season of 1997?
CREATE TABLE table_41472 ( "Season" text, "PAT Pct." text, "20-29" text, "30-39" text, "40-49" text, "FG-FGA" text, "FG Pct." text, "Long" real, "Points" real )
SELECT "20-29" FROM table_41472 WHERE "Season" = '1997'
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 20-29 had a season of 1997? ### Input: CREATE TABLE table_41472 ( "Season" text, "PAT Pct." text, "20-29" ...
Which Width has a Number of vehicles larger than 15, and a Type designation of k5000?
CREATE TABLE table_name_88 ( width VARCHAR, number_of_vehicles VARCHAR, type_designation VARCHAR )
SELECT width FROM table_name_88 WHERE number_of_vehicles > 15 AND type_designation = "k5000"
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 Width has a Number of vehicles larger than 15, and a Type designation of k5000? ### Input: CREATE TABLE table_name_88 ...
What is Administration of Oaths, when Rights of Audience is Yes, and when Reserved Instruments is Yes?
CREATE TABLE table_name_43 ( administration_of_oaths VARCHAR, rights_of_audience VARCHAR, reserved_instruments VARCHAR )
SELECT administration_of_oaths FROM table_name_43 WHERE rights_of_audience = "yes" AND reserved_instruments = "yes"
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 Administration of Oaths, when Rights of Audience is Yes, and when Reserved Instruments is Yes? ### Input: CREATE TAB...
Show all branch names with the number of members in each branch registered after 2015 Plot them as bar chart, and sort in descending by the Y please.
CREATE TABLE membership_register_branch ( Member_ID int, Branch_ID text, Register_Year text ) CREATE TABLE purchase ( Member_ID int, Branch_ID text, Year text, Total_pounds real ) CREATE TABLE member ( Member_ID int, Card_Number text, Name text, Hometown text, Level int...
SELECT Name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.Branch_ID = T2.Branch_ID WHERE T1.Register_Year > 2015 GROUP BY T2.Branch_ID ORDER BY COUNT(*) 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: Show all branch names with the number of members in each branch registered after 2015 Plot them as bar chart, and sort in de...
Can you tell me the Artist that has the Draw smaller than 16, and the English translation of lullaby?
CREATE TABLE table_61980 ( "Draw" real, "Language" text, "Artist" text, "English translation" text, "Place" real, "Points" real )
SELECT "Artist" FROM table_61980 WHERE "Draw" < '16' AND "English translation" = 'lullaby'
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 Artist that has the Draw smaller than 16, and the English translation of lullaby? ### Input: CREATE TABL...
what the last height of patient 18877 until 53 months ago.
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE cost ( row_id...
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18877)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'...
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 the last height of patient 18877 until 53 months ago. ### Input: CREATE TABLE d_icd_diagnoses ( row_id number, ...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the amount of hire_date bin hire_date by weekday in a bar chart, rank Y-axis from high to low order.
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COUNT(HIRE_DATE) 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: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri...
Return the ids and details corresponding to projects for which there are more than two documents Show bar chart, and show from high to low by the total number.
CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID...
SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID ORDER BY T1.Project_ID 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 the ids and details corresponding to projects for which there are more than two documents Show bar chart, and show fr...
What 2007-08 had A.S. Gubbio 1910 Club?
CREATE TABLE table_name_15 ( club VARCHAR )
SELECT 2007 AS _08_season FROM table_name_15 WHERE club = "a.s. gubbio 1910"
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 2007-08 had A.S. Gubbio 1910 Club? ### Input: CREATE TABLE table_name_15 ( club VARCHAR ) ### Response: SELECT 2007...
Who was the opposing team for the February 1 game?
CREATE TABLE table_name_70 ( team VARCHAR, date VARCHAR )
SELECT team FROM table_name_70 WHERE date = "february 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 opposing team for the February 1 game? ### Input: CREATE TABLE table_name_70 ( team VARCHAR, date VARCHA...
until 2102, what are the top five most commonly ordered lab tests for patients in the same month after being diagnosed with spinal stenosis nos?
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.i...
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: until 2102, what are the top five most commonly ordered lab tests for patients in the same month after being diagnosed with ...
what is the number of patients whose days of hospital stay is greater than 9 and drug name is ibuprofen suspension?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "9" AND prescriptions.drug = "Ibuprofen Suspension"
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 days of hospital stay is greater than 9 and drug name is ibuprofen suspension? ### Inpu...
What are the notes for Ford when the total is 5?
CREATE TABLE table_name_23 ( notes VARCHAR, builder VARCHAR, total VARCHAR )
SELECT notes FROM table_name_23 WHERE builder = "ford" AND total = "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 are the notes for Ford when the total is 5? ### Input: CREATE TABLE table_name_23 ( notes VARCHAR, builder VARC...
What is the song title sung by Sonu Nigam with lyricists of Dev Kohli/Biddu, and number over 8?
CREATE TABLE table_name_3 ( song_title VARCHAR, number VARCHAR, singer_s_ VARCHAR, lyricist VARCHAR )
SELECT song_title FROM table_name_3 WHERE singer_s_ = "sonu nigam" AND lyricist = "dev kohli/biddu" AND number > 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 is the song title sung by Sonu Nigam with lyricists of Dev Kohli/Biddu, and number over 8? ### Input: CREATE TABLE tabl...
Name the name for 15 yield
CREATE TABLE table_24670 ( "Date (GMT)" text, "Yield (megatons)" text, "Deployment" text, "Country" text, "Test Site" text, "Name or Number" text )
SELECT "Name or Number" FROM table_24670 WHERE "Yield (megatons)" = '15'
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: Name the name for 15 yield ### Input: CREATE TABLE table_24670 ( "Date (GMT)" text, "Yield (megatons)" text, "De...
what was the score previous to the benin opponent ?
CREATE TABLE table_203_504 ( id number, "#" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text )
SELECT "score" FROM table_203_504 WHERE "date" < (SELECT "date" FROM table_203_504 WHERE "opponent" = 'benin') ORDER BY "date" 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 score previous to the benin opponent ? ### Input: CREATE TABLE table_203_504 ( id number, "#" number, ...
give me the number of patients whose diagnoses icd9 code is 45620?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "45620"
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 diagnoses icd9 code is 45620? ### Input: CREATE TABLE procedures ( subject_id text,...
What is the number of games played for the team with 12 points and an against smaller than 52?
CREATE TABLE table_name_59 ( played INTEGER, points VARCHAR, against VARCHAR )
SELECT AVG(played) FROM table_name_59 WHERE points = 12 AND against < 52
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 number of games played for the team with 12 points and an against smaller than 52? ### Input: CREATE TABLE table...
what is the procedure short title of procedure icd9 code 598?
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 procedures.short_title FROM procedures WHERE procedures.icd9_code = "598"
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 procedure short title of procedure icd9 code 598? ### Input: CREATE TABLE lab ( subject_id text, hadm_id...
Give me the comparison about the sum of ID over the meter_200 , and group by attribute meter_200 by a bar chart, and show by the meter_200 in desc.
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Coun...
SELECT meter_200, SUM(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 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 comparison about the sum of ID over the meter_200 , and group by attribute meter_200 by a bar chart, and show by...
in 2104 what were the five most frequent medications prescribed in the same month to the bladder ca female patients of age 60 or above after having been diagnosed with bladder ca?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicatio...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bladder ca' AND STRFTIME('%y', diagnosis.diagnosis...
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: in 2104 what were the five most frequent medications prescribed in the same month to the bladder ca female patients of age 6...
Which Events is the highest one that has a Top-5 larger than 5, and a Top-10 larger than 28?
CREATE TABLE table_6276 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
SELECT MAX("Events") FROM table_6276 WHERE "Top-5" > '5' AND "Top-10" > '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: Which Events is the highest one that has a Top-5 larger than 5, and a Top-10 larger than 28? ### Input: CREATE TABLE table_6...
What are the titles and directors of the films were never presented in China?
CREATE TABLE film_market_estimation ( market_id VARCHAR ) CREATE TABLE film ( title VARCHAR, director VARCHAR, film_id VARCHAR, country VARCHAR ) CREATE TABLE market ( Market_ID VARCHAR )
SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.market_id WHERE country = 'China')
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 titles and directors of the films were never presented in China? ### Input: CREATE TABLE film_market_estimation...
Regex Questions With Pending Close Votes.
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDi...
SELECT pf.PostId AS "post_link", COUNT(*) AS CVs, p.ViewCount AS Views, p.Score, p.AnswerCount AS Answers, p.CreationDate AS Date, (COUNT(*) * 5 - p.Score - (p.ViewCount / 100)) AS Hatedness, AVG(pf.Id) AS ids FROM PendingFlags AS pf INNER JOIN Posts AS p ON p.Id = pf.PostId WHERE p.Tags LIKE '%regex%' AND ClosedDate 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: Regex Questions With Pending Close Votes. ### Input: CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE ...
Regarding classes with labs , which professors do not teach them ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_gradu...
SELECT DISTINCT instructor.name FROM instructor, course, course_offering, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course_offering.offering_id = offering_instructor.offering_id AND instructor.instructor_id = offering_instructor.instructor_id AND NOT instr...
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: Regarding classes with labs , which professors do not teach them ? ### Input: CREATE TABLE course_prerequisite ( pre_cou...
What was the data on November 3, if the data on January 15-16 is January 15, 2010?
CREATE TABLE table_27449 ( "June 10-11" text, "March 27-29" text, "January 15-16" text, "November 3" text, "August 21-22" text )
SELECT "November 3" FROM table_27449 WHERE "January 15-16" = 'January 15, 2010'
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 data on November 3, if the data on January 15-16 is January 15, 2010? ### Input: CREATE TABLE table_27449 ( ...
what is item id of subject id 6983?
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 lab.itemid FROM lab WHERE lab.subject_id = "6983"
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 item id of subject id 6983? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, ...
What is the high grid for osella - alfa romeo, and a Laps larger than 61?
CREATE TABLE table_52091 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT MAX("Grid") FROM table_52091 WHERE "Constructor" = 'osella - alfa romeo' AND "Laps" > '61'
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 high grid for osella - alfa romeo, and a Laps larger than 61? ### Input: CREATE TABLE table_52091 ( "Driver"...
provide the number of patients whose admission type is urgent and procedure short title is abdomen artery incision?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Abdomen artery incision"
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 admission type is urgent and procedure short title is abdomen artery incision? ### Inpu...
What is the total number of Attempts, when Touchdowns is 6?
CREATE TABLE table_name_61 ( attempts VARCHAR, touchdowns VARCHAR )
SELECT COUNT(attempts) FROM table_name_61 WHERE touchdowns = 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 total number of Attempts, when Touchdowns is 6? ### Input: CREATE TABLE table_name_61 ( attempts VARCHAR, ...
Number of questions asked by a group of users in 30 days.
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostHistory ( Id number, Po...
WITH Questions AS (SELECT Id, OwnerUserId, Score, CreationDate FROM Posts WHERE OwnerUserId IN (SELECT VALUE FROM STRING_SPLIT('##UserIDs:string##', ','))) SELECT q.Id AS "post_link", q.OwnerUserId AS "user_link", q.Score, q.CreationDate, COUNT(*) AS "# of Qs in 30 days" FROM Questions AS q INNER JOIN Questions AS q2 O...
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: Number of questions asked by a group of users in 30 days. ### Input: CREATE TABLE CloseReasonTypes ( Id number, Name...
Name the total number of games for goals against being 352
CREATE TABLE table_2509505_1 ( games VARCHAR, goals_against VARCHAR )
SELECT COUNT(games) FROM table_2509505_1 WHERE goals_against = 352
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 total number of games for goals against being 352 ### Input: CREATE TABLE table_2509505_1 ( games VARCHAR, ...
What is the total number of Game, when Attendance is '18,568'?
CREATE TABLE table_name_7 ( game VARCHAR, attendance VARCHAR )
SELECT COUNT(game) FROM table_name_7 WHERE attendance = 18 OFFSET 568
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 Game, when Attendance is '18,568'? ### Input: CREATE TABLE table_name_7 ( game VARCHAR, ...
How many match values have points under 14 and 0 draws?
CREATE TABLE table_7081 ( "Team" text, "Match" real, "Points" real, "Draw" real, "Lost" real )
SELECT COUNT("Match") FROM table_7081 WHERE "Points" < '14' AND "Draw" < '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: How many match values have points under 14 and 0 draws? ### Input: CREATE TABLE table_7081 ( "Team" text, "Match" re...
Tell me the lost with tie of 0 and drawn of 47
CREATE TABLE table_name_20 ( lost VARCHAR, tied VARCHAR, drawn VARCHAR )
SELECT lost FROM table_name_20 WHERE tied = "0" AND drawn = "47"
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: Tell me the lost with tie of 0 and drawn of 47 ### Input: CREATE TABLE table_name_20 ( lost VARCHAR, tied VARCHAR, ...
Which Overall has a College of michigan state, a Position of fb, and a Round larger than 8?
CREATE TABLE table_43946 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT SUM("Overall") FROM table_43946 WHERE "College" = 'michigan state' AND "Position" = 'fb' AND "Round" > '8'
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 Overall has a College of michigan state, a Position of fb, and a Round larger than 8? ### Input: CREATE TABLE table_43...
Name the other for chironius multiventris septentrionalis
CREATE TABLE table_1850282_7 ( other VARCHAR, species VARCHAR )
SELECT other FROM table_1850282_7 WHERE species = "Chironius multiventris septentrionalis"
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 other for chironius multiventris septentrionalis ### Input: CREATE TABLE table_1850282_7 ( other VARCHAR, s...
If the runner-up is [[|]] 151/8 (50.0 overs), what were the results?
CREATE TABLE table_25118 ( "Details" text, "Host Nation(s)" text, "Final Venue" text, "Winner" text, "Result" text, "Runner-up" text )
SELECT "Result" FROM table_25118 WHERE "Runner-up" = '[[|]] 151/8 (50.0 overs)'
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: If the runner-up is [[|]] 151/8 (50.0 overs), what were the results? ### Input: CREATE TABLE table_25118 ( "Details" tex...
Create a bar chart showing the total number across bedtype
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, COUNT(*) FROM Rooms GROUP 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: Create a bar chart showing the total number across bedtype ### Input: CREATE TABLE Reservations ( Code INTEGER, Room...
What is the Record of the game on January 31 with Visitors Detroit Red Wings?
CREATE TABLE table_name_74 ( record VARCHAR, visitor VARCHAR, date VARCHAR )
SELECT record FROM table_name_74 WHERE visitor = "detroit red wings" AND date = "january 31"
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 Record of the game on January 31 with Visitors Detroit Red Wings? ### Input: CREATE TABLE table_name_74 ( re...
What is team 1 in group h?
CREATE TABLE table_37174 ( "Date" text, "Time ( CEST )" real, "Team #1" text, "Res." text, "Team #2" text, "Round" text, "Spectators" real )
SELECT "Team #1" FROM table_37174 WHERE "Round" = 'group h'
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 team 1 in group h? ### Input: CREATE TABLE table_37174 ( "Date" text, "Time ( CEST )" real, "Team #1" te...
how many patients on esmolol prescription have been admitted for more than 29 days in hospital?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "29" AND prescriptions.drug = "Esmolol"
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 on esmolol prescription have been admitted for more than 29 days in hospital? ### Input: CREATE TABLE proc...
Is there a level 400 , 12 -credit SEAS course ?
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, countr...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE program_course.catego...
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: Is there a level 400 , 12 -credit SEAS course ? ### Input: CREATE TABLE ta ( campus_job_id int, student_id int, ...
Top 100 questions by score.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, Pos...
SELECT TOP(100) AS Title, Score, DisplayName, Reputation FROM Posts AS p JOIN Users AS u ON p.OwnerUserId = u.Id WHERE PostTypeId = 1 ORDER BY Score 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: Top 100 questions by score. ### Input: CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) ...
Find the first names of the teachers that teach first grade.
CREATE TABLE teachers ( firstname VARCHAR, classroom VARCHAR ) CREATE TABLE list ( classroom VARCHAR )
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 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 the first names of the teachers that teach first grade. ### Input: CREATE TABLE teachers ( firstname VARCHAR, c...