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 Score with a Home with hornets?
CREATE TABLE table_name_54 ( score VARCHAR, home VARCHAR )
SELECT score FROM table_name_54 WHERE home = "hornets"
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 with a Home with hornets? ### Input: CREATE TABLE table_name_54 ( score VARCHAR, home VARCHAR ) ##...
what is the number of patients whose diagnoses long title is surgical operation with anastomosis, bypass, or graft, with natural or artificial tissues used as implant causing abnormal patient reaction, or later complication, without mention of misadventure at time of operation and drug type is base?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Surgical operation with anastomosis, bypass, or graft, with natural or artificial tissues u...
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 diagnoses long title is surgical operation with anastomosis, bypass, or graft, with nat...
Which team classification has malaysian team classification of mncf continental team?
CREATE TABLE table_2615 ( "Stage" real, "Stage winner" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Malaysian rider classification" text, "Team classification" text, "Malaysian team classification" text )
SELECT "Team classification" FROM table_2615 WHERE "Malaysian team classification" = 'MNCF Continental Team'
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 team classification has malaysian team classification of mncf continental team? ### Input: CREATE TABLE table_2615 ( ...
How many cuts were made when there weren't any wins but had a top-5 of 1 and a top 10 larger than 4?
CREATE TABLE table_name_62 ( cuts_made INTEGER, top_10 VARCHAR, wins VARCHAR, top_5 VARCHAR )
SELECT SUM(cuts_made) FROM table_name_62 WHERE wins < 1 AND top_5 = 1 AND top_10 > 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: How many cuts were made when there weren't any wins but had a top-5 of 1 and a top 10 larger than 4? ### Input: CREATE TABLE...
Give me a histogram, that simply displays the last name of the employee and the corresponding manager id, could you show by the x-axis in asc?
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END...
SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY LAST_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: Give me a histogram, that simply displays the last name of the employee and the corresponding manager id, could you show by ...
Which Wins has Podiums of 0, and a Series of masters of formula 3?
CREATE TABLE table_name_40 ( wins VARCHAR, podiums VARCHAR, series VARCHAR )
SELECT wins FROM table_name_40 WHERE podiums = "0" AND series = "masters of formula 3"
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 Wins has Podiums of 0, and a Series of masters of formula 3? ### Input: CREATE TABLE table_name_40 ( wins VARCHAR,...
What team picked 80?
CREATE TABLE table_name_94 ( team VARCHAR, pick VARCHAR )
SELECT team FROM table_name_94 WHERE pick = 80
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 team picked 80? ### Input: CREATE TABLE table_name_94 ( team VARCHAR, pick VARCHAR ) ### Response: SELECT team ...
what are the three most frequent drugs that were prescribed to female patients of the 50s within 2 months after having been diagnosed with drug-induced delirium?
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text,...
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 are the three most frequent drugs that were prescribed to female patients of the 50s within 2 months after having been ...
Who directed the episode with production code 177605?
CREATE TABLE table_73969 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Patient Portrayer" text, "Original air date" text, "Production code" real )
SELECT "Directed by" FROM table_73969 WHERE "Production code" = '177605'
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 directed the episode with production code 177605? ### Input: CREATE TABLE table_73969 ( "No." real, "#" real, ...
How many enrolment students in each month? Return a bar chart binning date of enrolment by month interval, and I want to order in asc by the y-axis.
CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_enrolment)
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: How many enrolment students in each month? Return a bar chart binning date of enrolment by month interval, and I want to ord...
how much does norepinephrine 4 mg/250 ml ns cost to take?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartr...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'norepinephrine 4 mg/250 ml ns')
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: how much does norepinephrine 4 mg/250 ml ns cost to take? ### Input: CREATE TABLE intakeoutput ( intakeoutputid number, ...
give me the number of patients whose primary disease is liver transplant and days of hospital stay is greater than 8?
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.diagnosis = "LIVER TRANSPLANT" AND demographic.days_stay > "8"
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 primary disease is liver transplant and days of hospital stay is greater than 8? ### In...
R/A Flags Before and After HNQ.
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId numb...
SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 4 AND CreationDate > '2018-10-18 00:00:00.000'
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: R/A Flags Before and After HNQ. ### Input: CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, ...
What was the margin of victory for the Mississippi Gulf Resort Classic?
CREATE TABLE table_68002 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "Margin of victory" FROM table_68002 WHERE "Tournament" = 'mississippi gulf resort classic'
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 margin of victory for the Mississippi Gulf Resort Classic? ### Input: CREATE TABLE table_68002 ( "Date" tex...
who was the last ranked competitor in group a ?
CREATE TABLE table_204_741 ( id number, "rank" number, "name" text, "nationality" text, "1,62" text, "1,67" text, "1,72" text, "1,75" text, "notes" text )
SELECT "name" FROM table_204_741 ORDER BY "rank" 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: who was the last ranked competitor in group a ? ### Input: CREATE TABLE table_204_741 ( id number, "rank" number, ...
How many events resulted in a top-25 less than 2?
CREATE TABLE table_38401 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
SELECT COUNT("Events") FROM table_38401 WHERE "Top-25" < '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 events resulted in a top-25 less than 2? ### Input: CREATE TABLE table_38401 ( "Tournament" text, "Wins" re...
What are the names of all genres in alphabetical order, combined with its ratings?
CREATE TABLE files ( f_id number, artist_name text, file_size text, duration text, formats text ) CREATE TABLE genre ( g_name text, rating text, most_popular_in text ) CREATE TABLE song ( song_name text, artist_name text, country text, f_id number, genre_is text, ...
SELECT g_name, rating FROM genre ORDER BY g_name
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 names of all genres in alphabetical order, combined with its ratings? ### Input: CREATE TABLE files ( f_id ...
What is the name of the driver in 1955?
CREATE TABLE table_57940 ( "Year" text, "Driver" text, "Constructor" text, "Category" text, "Location" text, "Report" text )
SELECT "Driver" FROM table_57940 WHERE "Year" = '1955'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the driver in 1955? ### Input: CREATE TABLE table_57940 ( "Year" text, "Driver" text, "Const...
until 09/2103 has patient 3118 had any drain out #1 jackson pratt output?
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttim...
SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3118)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'drain out #1 ja...
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 09/2103 has patient 3118 had any drain out #1 jackson pratt output? ### Input: CREATE TABLE chartevents ( row_id n...
what was the last baekje temple ?
CREATE TABLE table_204_465 ( id number, "#" number, "temple name" text, "hangul" text, "hanja" text, "period of reign" text, "personal name" text, "relationship" text, "note" text )
SELECT "temple name" FROM table_204_465 ORDER BY "period of reign" 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 last baekje temple ? ### Input: CREATE TABLE table_204_465 ( id number, "#" number, "temple name" t...
What was the record in the game against Eskimos?
CREATE TABLE table_23685152_2 ( record VARCHAR, opponent VARCHAR )
SELECT record FROM table_23685152_2 WHERE opponent = "Eskimos"
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 record in the game against Eskimos? ### Input: CREATE TABLE table_23685152_2 ( record VARCHAR, opponent...
What courses I am required to take before MUSED 370 ?
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requi...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
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 courses I am required to take before MUSED 370 ? ### Input: CREATE TABLE area ( course_id int, area varchar ) ...
what is the date when the opponent# is iowa?
CREATE TABLE table_name_42 ( date VARCHAR, opponent_number VARCHAR )
SELECT date FROM table_name_42 WHERE opponent_number = "iowa"
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 date when the opponent# is iowa? ### Input: CREATE TABLE table_name_42 ( date VARCHAR, opponent_number V...
Return a bar chart on how many hours do the students spend studying in each department?, could you sort in descending by the sum stu hrs please?
CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIG...
SELECT DEPT_CODE, SUM(STU_HRS) FROM STUDENT GROUP BY DEPT_CODE ORDER BY SUM(STU_HRS) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart on how many hours do the students spend studying in each department?, could you sort in descending by the...
Show id from each meter 400, and sort y-axis in ascending order.
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 event ( ID int, Name text, Stadium_ID int, Year text ) CREATE...
SELECT meter_400, ID FROM swimmer ORDER BY 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: Show id from each meter 400, and sort y-axis in ascending order. ### Input: CREATE TABLE swimmer ( ID int, name text...
What class in the word with part 4 'giheizan'?
CREATE TABLE table_1745843_8 ( class VARCHAR, part_4 VARCHAR )
SELECT class FROM table_1745843_8 WHERE part_4 = "giheizan"
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 class in the word with part 4 'giheizan'? ### Input: CREATE TABLE table_1745843_8 ( class VARCHAR, part_4 VARCH...
What was the score with the opponent being New Zealand Warriors?
CREATE TABLE table_name_67 ( score VARCHAR, opponent VARCHAR )
SELECT score FROM table_name_67 WHERE opponent = "new zealand warriors"
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 with the opponent being New Zealand Warriors? ### Input: CREATE TABLE table_name_67 ( score VARCHAR, ...
What shooter has wc munich as the event, and 8 as the rank points?
CREATE TABLE table_name_43 ( shooter VARCHAR, event VARCHAR, rank_points VARCHAR )
SELECT shooter FROM table_name_43 WHERE event = "wc munich" AND rank_points = "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 shooter has wc munich as the event, and 8 as the rank points? ### Input: CREATE TABLE table_name_43 ( shooter VARCH...
What was the percentage for T. Papadopoulos when I. Kasoulidis was 27.1%?
CREATE TABLE table_69604 ( "Polling Firm" text, "Date Published" text, "T. Papadopoulos" text, "D. Christofias" text, "I. Kasoulidis" text, "K. Themistokleous" text )
SELECT "T. Papadopoulos" FROM table_69604 WHERE "I. Kasoulidis" = '27.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: What was the percentage for T. Papadopoulos when I. Kasoulidis was 27.1%? ### Input: CREATE TABLE table_69604 ( "Polling...
Give the maximum product price for each product type in a pie chart.
CREATE TABLE Supplier_Addresses ( supplier_id INTEGER, address_id INTEGER, date_from DATETIME, date_to DATETIME ) CREATE TABLE Staff_Department_Assignments ( staff_id INTEGER, department_id INTEGER, date_assigned_from DATETIME, job_title_code VARCHAR(10), date_assigned_to DATETIME )...
SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code
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 the maximum product price for each product type in a pie chart. ### Input: CREATE TABLE Supplier_Addresses ( suppli...
What is the average top-25 value for majors that have more than 0 wins?
CREATE TABLE table_51787 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
SELECT AVG("Top-25") FROM table_51787 WHERE "Wins" > '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 average top-25 value for majors that have more than 0 wins? ### Input: CREATE TABLE table_51787 ( "Tournamen...
were patient 018-47575 in the emergency room?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number...
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '018-47575' AND patient.hospitaladmitsource = 'emergency department'
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: were patient 018-47575 in the emergency room? ### Input: CREATE TABLE allergy ( allergyid number, patientunitstayid ...
What team played in front of 28,536 at an away stadium?
CREATE TABLE table_name_34 ( away_team VARCHAR, crowd INTEGER )
SELECT away_team AS score FROM table_name_34 WHERE crowd > 28 OFFSET 536
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 team played in front of 28,536 at an away stadium? ### Input: CREATE TABLE table_name_34 ( away_team VARCHAR, c...
which nationality is top on the chart
CREATE TABLE table_204_866 ( id number, "name" text, "lifetime" text, "nationality" text, "notable as" text, "notes" text )
SELECT "nationality" FROM table_204_866 WHERE id = 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 nationality is top on the chart ### Input: CREATE TABLE table_204_866 ( id number, "name" text, "lifetime"...
What is the number of bronze when the total is smaller than 1?
CREATE TABLE table_name_58 ( bronze INTEGER, total INTEGER )
SELECT AVG(bronze) FROM table_name_58 WHERE total < 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 number of bronze when the total is smaller than 1? ### Input: CREATE TABLE table_name_58 ( bronze INTEGER, ...
which club had a total of only four wins ?
CREATE TABLE table_204_135 ( id number, "position" number, "club" text, "played" number, "points" number, "wins" number, "draws" number, "losses" number, "goals for" number, "goals against" number, "goal difference" number )
SELECT "club" FROM table_204_135 WHERE "wins" = 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: which club had a total of only four wins ? ### Input: CREATE TABLE table_204_135 ( id number, "position" number, ...
What is the average cap number in scotland in 1986 1998 leass than 69?
CREATE TABLE table_54656 ( "Name" text, "Scotland career" text, "Caps" real, "Goals" real, "Average" real )
SELECT COUNT("Average") FROM table_54656 WHERE "Caps" < '69' AND "Scotland career" = '1986–1998'
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 average cap number in scotland in 1986 1998 leass than 69? ### Input: CREATE TABLE table_54656 ( "Name" text...
What school has rebels as their mascot?
CREATE TABLE table_name_8 ( school VARCHAR, mascot VARCHAR )
SELECT school FROM table_name_8 WHERE mascot = "rebels"
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 school has rebels as their mascot? ### Input: CREATE TABLE table_name_8 ( school VARCHAR, mascot VARCHAR ) ### ...
Stacked bar of date in locaton to and the number of date in locaton to colored by Location_Code, order by the Y in ascending.
CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Description VARCHAR(255) )...
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Locaton_To)
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: Stacked bar of date in locaton to and the number of date in locaton to colored by Location_Code, order by the Y in ascending...
Gold of 0, and a Bronze smaller than 0 and what is the sum of the silver?
CREATE TABLE table_name_69 ( silver INTEGER, gold VARCHAR, bronze VARCHAR )
SELECT SUM(silver) FROM table_name_69 WHERE gold = 0 AND bronze < 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: Gold of 0, and a Bronze smaller than 0 and what is the sum of the silver? ### Input: CREATE TABLE table_name_69 ( silver...
Who is the candidate that had 10 fired in week 2 (1-27-2005)?
CREATE TABLE table_name_45 ( candidate VARCHAR, result VARCHAR )
SELECT candidate FROM table_name_45 WHERE result = "10 fired in week 2 (1-27-2005)"
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 is the candidate that had 10 fired in week 2 (1-27-2005)? ### Input: CREATE TABLE table_name_45 ( candidate VARCHAR,...
List the last name of the students who do not have any food type allergy and count them in a bart chart.
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 LName, COUNT(LName) FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.AllergyType = "food") GROUP BY LName
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: List the last name of the students who do not have any food type allergy and count them in a bart chart. ### Input: CREATE T...
provide the number of patients who died primarily due to fall on stair/step nec.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Fall on stair/step NEC"
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 who died primarily due to fall on stair/step nec. ### Input: CREATE TABLE procedures ( su...
Bronze smaller than 5, and a Silver larger than 0 is which nation?
CREATE TABLE table_name_66 ( nation VARCHAR, bronze VARCHAR, silver VARCHAR )
SELECT nation FROM table_name_66 WHERE bronze < 5 AND silver > 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bronze smaller than 5, and a Silver larger than 0 is which nation? ### Input: CREATE TABLE table_name_66 ( nation VARCHA...
Who was the constructor when Eugenio Castellotti was the pole position and the race had a C tyre?
CREATE TABLE table_57592 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text )
SELECT "Constructor" FROM table_57592 WHERE "Tyre" = 'c' AND "Pole position" = 'eugenio castellotti'
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 constructor when Eugenio Castellotti was the pole position and the race had a C tyre? ### Input: CREATE TABLE ta...
tell me the price of a procedure called agent specific therapy - calcium channel blockers overdose?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'treatment' AND cost.eventid IN (SELECT treatment.treatmentid FROM treatment WHERE treatment.treatmentname = 'agent specific therapy - calcium channel blockers overdose')
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: tell me the price of a procedure called agent specific therapy - calcium channel blockers overdose? ### Input: CREATE TABLE ...
Which years had a jersey number 55
CREATE TABLE table_17156 ( "Player" text, "No.(s)" text, "Height in Ft." text, "Position" text, "Years for Rockets" text, "School/Club Team/Country" text )
SELECT "Years for Rockets" FROM table_17156 WHERE "No.(s)" = '55'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which years had a jersey number 55 ### Input: CREATE TABLE table_17156 ( "Player" text, "No.(s)" text, "Height i...
What is the earliest year with less than 3 points and Parmalat Forti Ford was the entrant?
CREATE TABLE table_name_40 ( year INTEGER, points VARCHAR, entrant VARCHAR )
SELECT MIN(year) FROM table_name_40 WHERE points < 3 AND entrant = "parmalat forti ford"
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 earliest year with less than 3 points and Parmalat Forti Ford was the entrant? ### Input: CREATE TABLE table_nam...
out of all their times , which one was fastest ?
CREATE TABLE table_204_547 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" number, "notes" text )
SELECT "time" FROM table_204_547 ORDER BY "time" 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: out of all their times , which one was fastest ? ### Input: CREATE TABLE table_204_547 ( id number, "rank" number, ...
Which flight had an aircraft of vickers viscount type 794?
CREATE TABLE table_47704 ( "Date" text, "Flight" text, "Aircraft" text, "Registration" text, "Location" text, "Fatalities" real )
SELECT "Flight" FROM table_47704 WHERE "Aircraft" = 'vickers viscount type 794'
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 flight had an aircraft of vickers viscount type 794? ### Input: CREATE TABLE table_47704 ( "Date" text, "Fligh...
Who held the Communications Rep position in 2011?
CREATE TABLE table_name_65 ( position VARCHAR )
SELECT 2011 FROM table_name_65 WHERE position = "communications rep"
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 held the Communications Rep position in 2011? ### Input: CREATE TABLE table_name_65 ( position VARCHAR ) ### Respons...
What is the latitude that has a sqmi smaller than 34.401, a Geo ID smaller than 3807157722, and a Longitude of -98.475995?
CREATE TABLE table_64769 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" real, "Water (sqmi)" real, "Latitude" real, "Longitude" real, "GEO ID" real, "ANSI code" real )
SELECT "Latitude" FROM table_64769 WHERE "Land ( sqmi )" < '34.401' AND "GEO ID" < '3807157722' AND "Longitude" = '-98.475995'
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 latitude that has a sqmi smaller than 34.401, a Geo ID smaller than 3807157722, and a Longitude of -98.475995? #...
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the headquarter , and group by attribute headquarter, display y axis from high to low order.
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 T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T1.Code 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, give me the comparison about the sum of code over the h...
Who was the runner up the season that Sagawa Express came in fourth?
CREATE TABLE table_31143 ( "Season" real, "Winner" text, "Runner-up" text, "Third place" text, "Fourth place" text )
SELECT "Runner-up" FROM table_31143 WHERE "Fourth place" = 'Sagawa Express'
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 runner up the season that Sagawa Express came in fourth? ### Input: CREATE TABLE table_31143 ( "Season" real...
when is the first time that patient 002-52932 has had a heartrate measured until 03/10/2100?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-52932')) AND NOT vitalperiodic.heartrate IS NUL...
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 is the first time that patient 002-52932 has had a heartrate measured until 03/10/2100? ### Input: CREATE TABLE microla...
Name the women's doubles for frederik kj rholm elsner
CREATE TABLE table_15026 ( "Year" real, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text )
SELECT "Women's doubles" FROM table_15026 WHERE "Men's singles" = 'frederik kjærholm elsner'
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 women's doubles for frederik kj rholm elsner ### Input: CREATE TABLE table_15026 ( "Year" real, "Men's sing...
On February 26, who was the leading scorer?
CREATE TABLE table_56464 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Record" text )
SELECT "Leading scorer" FROM table_56464 WHERE "Date" = 'february 26'
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: On February 26, who was the leading scorer? ### Input: CREATE TABLE table_56464 ( "Date" text, "Visitor" text, "...
how many patients are below 49 years of age and admitted under the year 2198?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "49" AND demographic.admityear < "2198"
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 below 49 years of age and admitted under the year 2198? ### Input: CREATE TABLE lab ( subject_id t...
What's the sum of Top-10 that has Events that's larger than 16, and has a Top-5 that's also larger than 5?
CREATE TABLE table_name_87 ( top_10 VARCHAR, events VARCHAR, top_5 VARCHAR )
SELECT COUNT(top_10) FROM table_name_87 WHERE events > 16 AND top_5 > 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's the sum of Top-10 that has Events that's larger than 16, and has a Top-5 that's also larger than 5? ### Input: CREATE...
give me the number of patients whose days of hospital stay is greater than 26 and diagnoses short title is joint replaced knee?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "26" AND diagnoses.short_title = "Joint replaced knee"
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 days of hospital stay is greater than 26 and diagnoses short title is joint replaced kn...
In the election earlier than 2012 how many Inhabitants had a Party of five star movement?
CREATE TABLE table_name_57 ( inhabitants INTEGER, party VARCHAR, election VARCHAR )
SELECT SUM(inhabitants) FROM table_name_57 WHERE party = "five star movement" AND election < 2012
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: In the election earlier than 2012 how many Inhabitants had a Party of five star movement? ### Input: CREATE TABLE table_name...
In what Distance has a Venue of sale?
CREATE TABLE table_name_36 ( distance VARCHAR, venue VARCHAR )
SELECT distance FROM table_name_36 WHERE venue = "sale"
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: In what Distance has a Venue of sale? ### Input: CREATE TABLE table_name_36 ( distance VARCHAR, venue VARCHAR ) ### ...
List the number of the phone numbers of all employees.
CREATE TABLE Playlist ( PlaylistId integer, Name varchar(120) ) CREATE TABLE Artist ( ArtistId integer, Name varchar(120) ) CREATE TABLE MediaType ( MediaTypeId integer, Name varchar(120) ) CREATE TABLE Invoice ( InvoiceId integer, CustomerId integer, InvoiceDate datetime, Bil...
SELECT Phone, COUNT(Phone) FROM Employee GROUP BY Phone
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: List the number of the phone numbers of all employees. ### Input: CREATE TABLE Playlist ( PlaylistId integer, Name v...
what is the difference in percentage of lead shot at 25 yards between cylinder and skeet 1 barrels ?
CREATE TABLE table_203_112 ( id number, "choke" text, "constriction (inch)" number, "percentage of lead shot in 30-inch circle at 40 yards" text, "identification (notches)" number, "identification (stars)\n(spanish shotguns)" number )
SELECT ABS((SELECT "percentage of lead shot in 30-inch circle at 40 yards" FROM table_203_112 WHERE "choke" = 'cylinder') - (SELECT "percentage of lead shot in 30-inch circle at 40 yards" FROM table_203_112 WHERE "choke" = 'skeet 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 is the difference in percentage of lead shot at 25 yards between cylinder and skeet 1 barrels ? ### Input: CREATE TABLE...
What is the record of game 42, which had a clemmensen decision?
CREATE TABLE table_44824 ( "Game" real, "Date" real, "Opponent" text, "Score" text, "Decision" text, "Location/Attendance" text, "Record" text )
SELECT "Record" FROM table_44824 WHERE "Decision" = 'clemmensen' AND "Game" = '42'
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 record of game 42, which had a clemmensen decision? ### Input: CREATE TABLE table_44824 ( "Game" real, "...
give me the number of patients whose ethnicity is asian and age is less than 80?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "80"
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 asian and age is less than 80? ### Input: CREATE TABLE prescriptions ( ...
Find the enrollment date for all the tests that have 'Pass' result, and count them by a bar chart, sort by the Y from low to high please.
CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Courses ( course_id INTEGER, author_...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" ORDER BY COUNT(date_of_enrolment)
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: Find the enrollment date for all the tests that have 'Pass' result, and count them by a bar chart, sort by the Y from low to...
What is the description and code of the type of service that is performed the most often?
CREATE TABLE products ( product_id text, product_name text, product_price number, product_description text, other_product_service_details text ) CREATE TABLE performers_in_bookings ( order_id number, performer_id number ) CREATE TABLE clients ( client_id number, address_id number, ...
SELECT T1.service_type_description, T1.service_type_code FROM ref_service_types AS T1 JOIN services AS T2 ON T1.service_type_code = T2.service_type_code GROUP BY T1.service_type_code ORDER BY COUNT(*) DESC 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 is the description and code of the type of service that is performed the most often? ### Input: CREATE TABLE products (...
What is the Attendance of New Zealand Scores in bold?
CREATE TABLE table_65097 ( "Date" text, "Opponent" text, "Score" text, "Venue" text, "Attendance" text )
SELECT "Attendance" FROM table_65097 WHERE "Date" = 'new zealand scores in bold'
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 Attendance of New Zealand Scores in bold? ### Input: CREATE TABLE table_65097 ( "Date" text, "Opponent" ...
What code is used to represent the currency of Croatian Kuna?
CREATE TABLE table_name_34 ( code VARCHAR, currency VARCHAR )
SELECT code FROM table_name_34 WHERE currency = "croatian kuna"
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 code is used to represent the currency of Croatian Kuna? ### Input: CREATE TABLE table_name_34 ( code VARCHAR, ...
Give me a bar chart for mean max(score) of each year, and sort by the y-axis in ascending.
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
SELECT Year, AVG(MAX(Score)) FROM wine ORDER BY AVG(MAX(Score))
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 a bar chart for mean max(score) of each year, and sort by the y-axis in ascending. ### Input: CREATE TABLE appellati...
what is the name of a procedure that patient 73713 has been given for two times since 70 months ago?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id numbe...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 737...
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 the name of a procedure that patient 73713 has been given for two times since 70 months ago? ### Input: CREATE TABLE...
What is the number of tries for that has 30 tries against?
CREATE TABLE table_69514 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT "Tries for" FROM table_69514 WHERE "Tries against" = '30'
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 number of tries for that has 30 tries against? ### Input: CREATE TABLE table_69514 ( "Club" text, "Playe...
Who is the player who had more than 1,052 points?
CREATE TABLE table_34511 ( "Rank" text, "Player" text, "Position" text, "Career" text, "Points" real )
SELECT "Player" FROM table_34511 WHERE "Points" > '1,052'
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 is the player who had more than 1,052 points? ### Input: CREATE TABLE table_34511 ( "Rank" text, "Player" text, ...
how long did it take the german team to finish the race ?
CREATE TABLE table_203_160 ( id number, "rank" number, "heat" number, "nation" text, "competitors" text, "time" text, "notes" text )
SELECT "time" FROM table_203_160 WHERE "nation" = 'germany'
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 long did it take the german team to finish the race ? ### Input: CREATE TABLE table_203_160 ( id number, "rank" ...
When Connie Shaw took GREEK 695 , who was the teacher ?
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_ti...
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id INNER JOIN course_...
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: When Connie Shaw took GREEK 695 , who was the teacher ? ### Input: CREATE TABLE program ( program_id int, name varch...
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 bar chart about the distribution of job_id and the sum of salary , and group by attribute job_id, and rank sum salary from high to low 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 jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLO...
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(SALARY) 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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
what is the game when on november 27?
CREATE TABLE table_77372 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Record" text )
SELECT SUM("Game") FROM table_77372 WHERE "November" = '27'
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 game when on november 27? ### Input: CREATE TABLE table_77372 ( "Game" real, "November" real, "Oppon...
What is the proportion of the number of schools in different counties?
CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollment int, IHSAA_Class text, IHSAA_Football_Class text, County text ) CREATE TABLE budget ...
SELECT County, COUNT(*) FROM School GROUP BY County
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 proportion of the number of schools in different counties? ### Input: CREATE TABLE endowment ( endowment_id ...
provide the number of patients whose gender is f and drug name is phenytoin sodium?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.drug = "Phenytoin Sodium"
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 gender is f and drug name is phenytoin sodium? ### Input: CREATE TABLE lab ( subjec...
what was year was the first arizona license plate made ?
CREATE TABLE table_203_82 ( id number, "first issued" number, "design" text, "slogan" text, "serial format" text, "serials issued" text, "notes" text )
SELECT MIN("first issued") FROM table_203_82
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 year was the first arizona license plate made ? ### Input: CREATE TABLE table_203_82 ( id number, "first is...
Which Lead has a Nation of switzerland?
CREATE TABLE table_name_15 ( lead VARCHAR, nation VARCHAR )
SELECT lead FROM table_name_15 WHERE nation = "switzerland"
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 Lead has a Nation of switzerland? ### Input: CREATE TABLE table_name_15 ( lead VARCHAR, nation VARCHAR ) ### R...
What is the smallest draws for a player larger than 2 with a 100% wins?
CREATE TABLE table_name_83 ( drawn INTEGER, played VARCHAR, _percentage_won VARCHAR )
SELECT MIN(drawn) FROM table_name_83 WHERE played > 2 AND _percentage_won > 100
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 draws for a player larger than 2 with a 100% wins? ### Input: CREATE TABLE table_name_83 ( drawn IN...
How many students that has a GPA lower than average? Show me a pie chart grouping by student's first name.
CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE...
SELECT STU_FNAME, COUNT(STU_FNAME) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME
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: How many students that has a GPA lower than average? Show me a pie chart grouping by student's first name. ### Input: CREATE...
Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.
CREATE TABLE customers ( customer_id number, customer_details text ) CREATE TABLE settlements ( settlement_id number, claim_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number, customer_policy_id number ) CREATE TABLE payments ( ...
SELECT amount_settled, amount_claimed FROM claims ORDER BY amount_settled 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: Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount. ### In...
What machine has 5 as the place?
CREATE TABLE table_40931 ( "Place" real, "Rider" text, "Country" text, "Machine" text, "Speed" text, "Time" text, "Points" real )
SELECT "Machine" FROM table_40931 WHERE "Place" = '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 machine has 5 as the place? ### Input: CREATE TABLE table_40931 ( "Place" real, "Rider" text, "Country" tex...
How many students participated in tryouts for each college by descennding count?
CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE college ( cname text, state text, enr number )
SELECT COUNT(*), cname FROM tryout GROUP BY cname ORDER BY COUNT(*) DESC
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: How many students participated in tryouts for each college by descennding count? ### Input: CREATE TABLE player ( pid nu...
When momoiro clover z is the vocalist how many japanese titles are there?
CREATE TABLE table_2460 ( "#" real, "Japanese title" text, "R\u014dmaji" text, "Japanese translation" text, "Vocalist" text, "Episodes used" text )
SELECT COUNT("Japanese title") FROM table_2460 WHERE "Vocalist" = 'Momoiro Clover Z'
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 momoiro clover z is the vocalist how many japanese titles are there? ### Input: CREATE TABLE table_2460 ( "#" real,...
What was the attendance at war memorial stadium?
CREATE TABLE table_4855 ( "Week" real, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attenmdance" text )
SELECT "Attenmdance" FROM table_4855 WHERE "Stadium" = 'war memorial stadium'
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 attendance at war memorial stadium? ### Input: CREATE TABLE table_4855 ( "Week" real, "Opponent" text, ...
What's the total amount of USSR that has more than 0 gold, less than 85 silver and more than 6 bronze?
CREATE TABLE table_14012 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MIN("Total") FROM table_14012 WHERE "Gold" > '0' AND "Bronze" > '6' AND "Nation" = 'ussr' AND "Silver" < '85'
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 total amount of USSR that has more than 0 gold, less than 85 silver and more than 6 bronze? ### Input: CREATE TAB...
What is the position of the team that played at the venue, Central, Gomel?
CREATE TABLE table_name_71 ( position_in_1999 VARCHAR, venue VARCHAR )
SELECT position_in_1999 FROM table_name_71 WHERE venue = "central, gomel"
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 position of the team that played at the venue, Central, Gomel? ### Input: CREATE TABLE table_name_71 ( posit...
Which player had a total of 152?
CREATE TABLE table_name_60 ( player VARCHAR, total VARCHAR )
SELECT player FROM table_name_60 WHERE total = "152"
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 had a total of 152? ### Input: CREATE TABLE table_name_60 ( player VARCHAR, total VARCHAR ) ### Respons...
For patient Kurt Buczek, specify the location he was admitted to and his death status
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.expire_flag, demographic.admission_location FROM demographic WHERE demographic.name = "Kurt Buczek"
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: For patient Kurt Buczek, specify the location he was admitted to and his death status ### Input: CREATE TABLE diagnoses ( ...
Who had the fastest lap when the winning driver was kristian ghedina?
CREATE TABLE table_26920192_5 ( fastest_lap VARCHAR, winning_driver VARCHAR )
SELECT fastest_lap FROM table_26920192_5 WHERE winning_driver = "Kristian Ghedina"
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 the fastest lap when the winning driver was kristian ghedina? ### Input: CREATE TABLE table_26920192_5 ( fastest...
In what district was the successor seated August 31, 1943?
CREATE TABLE table_24498 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
SELECT "District" FROM table_24498 WHERE "Date successor seated" = 'August 31, 1943'
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: In what district was the successor seated August 31, 1943? ### Input: CREATE TABLE table_24498 ( "District" text, "V...
How many silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26?
CREATE TABLE table_42700 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT COUNT("Silver") FROM table_42700 WHERE "Gold" > '2' AND "Bronze" < '35' AND "Nation" = 'china' AND "Total" > '26'
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 silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26? ### I...
What are all the distinct payment types?
CREATE TABLE products_for_hire ( product_id number, product_type_code text, daily_hire_cost number, product_name text, product_description text ) CREATE TABLE customers ( customer_id number, coupon_id number, good_or_bad_customer text, first_name text, last_name text, gender...
SELECT DISTINCT payment_type_code FROM payments
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 all the distinct payment types? ### Input: CREATE TABLE products_for_hire ( product_id number, product_type...
what is the name of the drug which patient 012-4131 was prescribed during the same day after having received a therapeutic antibacterials - third generation cephalosporin procedure until 08/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 l...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-4131') AND treatment.treatmen...
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 name of the drug which patient 012-4131 was prescribed during the same day after having received a therapeutic a...
What year was the 4th Place Team of the Wyoming Angus, Johnstown, Co?
CREATE TABLE table_64334 ( "Year" real, "1st Place Team" text, "2nd Place Team" text, "3rd Place Team" text, "4th Place Team" text, "Host Location" text )
SELECT COUNT("Year") FROM table_64334 WHERE "4th Place Team" = 'wyoming angus, johnstown, co'
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 year was the 4th Place Team of the Wyoming Angus, Johnstown, Co? ### Input: CREATE TABLE table_64334 ( "Year" real,...
TOP 50 users from Bangladesh. Lists the top 50 users (ranked by reputation) that are located in Calicut/Kozhikode, Kerala, India according to their profile information. Thanks to http://data.stackexchange.com/stackoverflow/qe/1157/top-100-users-from-greece
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location, LastAccessDate FROM Users WHERE Location LIKE '%Bangladesh%' ORDER BY Reputation DESC LIMIT 150
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 Bangladesh. Lists the top 50 users (ranked by reputation) that are located in Calicut/Kozhikode, Kerala, I...