instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
Selecting posts with a score higher than 8.
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT Id, Title, Body, Tags FROM Posts WHERE Id < 500000 AND Score >= 8
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: Selecting posts with a score higher than 8. ### Input: CREATE TABLE Posts ( Id number, PostTypeId number, Accept...
what was the last time patient 95088 has had the hospital discharge in the previous year?
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, sh...
SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 95088 AND DATETIME(admissions.dischtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.dischtime DESC LIMIT 1
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the last time patient 95088 has had the hospital discharge in the previous year? ### Input: CREATE TABLE icustays (...
Percentage of (non-deleted) questions which get closed as duplicates, month by month.
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CRE...
SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) AS "month", CAST(COUNT(CASE WHEN (NOT Posts.ClosedDate IS NULL AND PostHistory.PostHistoryTypeId = 10 AND PostHistory.Comment IN ('1', '101')) THEN 1 ELSE NULL END) AS FLOAT) * 100 / COUNT(CASE WHEN PostHistory.PostHistoryTypeId = 1 THEN 1 ELSE NULL END) AS "Du...
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: Percentage of (non-deleted) questions which get closed as duplicates, month by month. ### Input: CREATE TABLE ReviewTasks ( ...
What bronze has tatiana ryabkina as the silver, anne margrethe hausken as the gold?
CREATE TABLE table_name_55 ( bronze VARCHAR, silver VARCHAR, gold VARCHAR )
SELECT bronze FROM table_name_55 WHERE silver = "tatiana ryabkina" AND gold = "anne margrethe hausken"
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 bronze has tatiana ryabkina as the silver, anne margrethe hausken as the gold? ### Input: CREATE TABLE table_name_55 ( ...
Name the steals for season 2007/2008
CREATE TABLE table_21498 ( "Season" text, "Games" real, "GS" real, "Points" text, "Rebounds" text, "Assists" text, "Blocks" text, "Steals" text, "Turnovers" text )
SELECT "Steals" FROM table_21498 WHERE "Season" = '2007/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: Name the steals for season 2007/2008 ### Input: CREATE TABLE table_21498 ( "Season" text, "Games" real, "GS" rea...
total population of millbrook first nation
CREATE TABLE table_204_251 ( id number, "community" text, "area" text, "location" text, "population" number, "date established" text )
SELECT "population" FROM table_204_251 WHERE "community" = 'millbrook 27'
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: total population of millbrook first nation ### Input: CREATE TABLE table_204_251 ( id number, "community" text, ...
What is the part number of athlon x2 4850e?
CREATE TABLE table_33927 ( "Model Number" text, "Stepping" text, "Frequency" text, "L2 Cache" text, "Multi 1" text, "V Core" text, "Socket" text, "Release Date" text, "Part Number(s)" text )
SELECT "Part Number(s)" FROM table_33927 WHERE "Model Number" = 'athlon x2 4850e'
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 part number of athlon x2 4850e? ### Input: CREATE TABLE table_33927 ( "Model Number" text, "Stepping" te...
What was the surface made of in the contest where Paula Ormaechea was the partner?
CREATE TABLE table_31928 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponent in the final" text, "Score" text )
SELECT "Surface" FROM table_31928 WHERE "Partner" = 'paula ormaechea'
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 surface made of in the contest where Paula Ormaechea was the partner? ### Input: CREATE TABLE table_31928 ( ...
Who is the incumbent that is listed with the candidates listed as marilyn lloyd (d) 57.4% harold w. coker (r) 42.6%?
CREATE TABLE table_18248 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Incumbent" FROM table_18248 WHERE "Candidates" = 'Marilyn Lloyd (D) 57.4% Harold W. Coker (R) 42.6%'
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 incumbent that is listed with the candidates listed as marilyn lloyd (d) 57.4% harold w. coker (r) 42.6%? ### Inp...
Show mean max(price) from each year, display in ascending by the Y.
CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE appellations ( No...
SELECT Year, AVG(MAX(Price)) FROM wine ORDER BY AVG(MAX(Price))
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 mean max(price) from each year, display in ascending by the Y. ### Input: CREATE TABLE grapes ( ID INTEGER, Gra...
Find meter_400 and meter_100 , and visualize them by a bar chart.
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
SELECT meter_400, meter_100 FROM swimmer
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 meter_400 and meter_100 , and visualize them by a bar chart. ### Input: CREATE TABLE record ( ID int, Result te...
What was the original airdate of the episode 'The Cold Turkey', which was viewed by 3.73 million viewers?
CREATE TABLE table_21731 ( "Series #" real, "Episode #" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original airdate" text, "Production Code" text )
SELECT "Original airdate" FROM table_21731 WHERE "U.S. viewers (million)" = '3.73'
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 original airdate of the episode 'The Cold Turkey', which was viewed by 3.73 million viewers? ### Input: CREATE ...
What is the 2006-2007 points minimum is the team is Overmach Parma?
CREATE TABLE table_23215145_2 ( team VARCHAR )
SELECT MIN(2006 AS _07_points) FROM table_23215145_2 WHERE team = "Overmach Parma"
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 2006-2007 points minimum is the team is Overmach Parma? ### Input: CREATE TABLE table_23215145_2 ( team VARC...
give a count of the number of intensive care unit visits of patient 027-69449 in 2105.
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )...
SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-69449') AND STRFTIME('%y', patient.unitadmittime) = '2105'
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give a count of the number of intensive care unit visits of patient 027-69449 in 2105. ### Input: CREATE TABLE intakeoutput ...
How many million U.S. viewers watched the episode with the production code 3x6004?
CREATE TABLE table_28725 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "U.S. air date" text, "Production code" text, "U.S. viewers (million)" text )
SELECT "U.S. viewers (million)" FROM table_28725 WHERE "Production code" = '3X6004'
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 million U.S. viewers watched the episode with the production code 3x6004? ### Input: CREATE TABLE table_28725 ( ...
What is the FCC info of the translator with an Irmo, South Carolina city license?
CREATE TABLE table_75354 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text )
SELECT "FCC info" FROM table_75354 WHERE "City of license" = 'irmo, south carolina'
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 FCC info of the translator with an Irmo, South Carolina city license? ### Input: CREATE TABLE table_75354 ( ...
how many patients have drug code meto25?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "METO25"
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 have drug code meto25? ### Input: CREATE TABLE demographic ( subject_id text, hadm_id text, na...
Name the opponent which has a home/away of home and date of july 27
CREATE TABLE table_name_9 ( opponent VARCHAR, home_away VARCHAR, date VARCHAR )
SELECT opponent FROM table_name_9 WHERE home_away = "home" AND date = "july 27"
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 opponent which has a home/away of home and date of july 27 ### Input: CREATE TABLE table_name_9 ( opponent VARC...
Who directed the episode with the production code of 6AKY11?
CREATE TABLE table_28027307_1 ( directed_by VARCHAR, production_code VARCHAR )
SELECT directed_by FROM table_28027307_1 WHERE production_code = "6AKY11"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who directed the episode with the production code of 6AKY11? ### Input: CREATE TABLE table_28027307_1 ( directed_by VARC...
Which average S.R. has an Average of 39.13 and Balls Faced larger than 318?
CREATE TABLE table_name_48 ( sr INTEGER, average VARCHAR, balls_faced VARCHAR )
SELECT AVG(sr) FROM table_name_48 WHERE average = 39.13 AND balls_faced > 318
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 average S.R. has an Average of 39.13 and Balls Faced larger than 318? ### Input: CREATE TABLE table_name_48 ( sr I...
What is the Score when the Home team is Chicago Black Hawks and the Record is 3-3?
CREATE TABLE table_name_8 ( score VARCHAR, home VARCHAR, record VARCHAR )
SELECT score FROM table_name_8 WHERE home = "chicago black hawks" AND record = "3-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: What is the Score when the Home team is Chicago Black Hawks and the Record is 3-3? ### Input: CREATE TABLE table_name_8 ( ...
What 's the workload like in EECS 201 ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number = 201 AND program_course.course_id = course.course_id
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 's the workload like in EECS 201 ? ### Input: CREATE TABLE course_offering ( offering_id int, course_id int, ...
what is the difference between marcellino lucchi 's points and max biaggi 's points ?
CREATE TABLE table_203_35 ( id number, "pos" text, "rider" text, "manufacturer" text, "time/retired" text, "points" number )
SELECT (SELECT "points" FROM table_203_35 WHERE "rider" = 'max biaggi') - (SELECT "points" FROM table_203_35 WHERE "rider" = 'marcellino lucchi')
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 between marcellino lucchi 's points and max biaggi 's points ? ### Input: CREATE TABLE table_203_35 (...
Which Poll source has a Peg Luksik of 9%, and Dates administered of may 12, 2010?
CREATE TABLE table_76367 ( "Poll source" text, "Dates administered" text, "Arlen Specter*" text, "Pat Toomey" text, "Tom Ridge*" text, "Peg Luksik" text )
SELECT "Poll source" FROM table_76367 WHERE "Peg Luksik" = '9%' AND "Dates administered" = 'may 12, 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: Which Poll source has a Peg Luksik of 9%, and Dates administered of may 12, 2010? ### Input: CREATE TABLE table_76367 ( ...
Show the average of account details for different statement details in a bar chart, and show by the names from low to high.
CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(255) ) CREATE TABLE Documents ( Document_ID INTEGER, Document_Type_Code CHAR(...
SELECT Statement_Details, AVG(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY Statement_Details
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the average of account details for different statement details in a bar chart, and show by the names from low to high. ...
How many rounds have an Overall larger than 17, and a Position of quarterback?
CREATE TABLE table_name_66 ( round VARCHAR, overall VARCHAR, position VARCHAR )
SELECT COUNT(round) FROM table_name_66 WHERE overall > 17 AND position = "quarterback"
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 rounds have an Overall larger than 17, and a Position of quarterback? ### Input: CREATE TABLE table_name_66 ( r...
Where the outcome is Winner and surface is Hard (i), what is the No.?
CREATE TABLE table_73917 ( "Outcome" text, "No." text, "Date" text, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
SELECT "No." FROM table_73917 WHERE "Outcome" = 'Winner' AND "Surface" = 'Hard (i)'
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: Where the outcome is Winner and surface is Hard (i), what is the No.? ### Input: CREATE TABLE table_73917 ( "Outcome" te...
List the distinct director of all films.
CREATE TABLE film_market_estimation ( estimation_id number, low_estimate number, high_estimate number, film_id number, type text, market_id number, year number ) CREATE TABLE film ( film_id number, title text, studio text, director text, gross_in_dollar number ) CREATE ...
SELECT DISTINCT director FROM film
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: List the distinct director of all films. ### Input: CREATE TABLE film_market_estimation ( estimation_id number, low_...
What was the result for the match with entry Match Reports?
CREATE TABLE table_47981 ( "Match" text, "Date" text, "Location" text, "Lineup" text, "Result" text, "Competition" text )
SELECT "Result" FROM table_47981 WHERE "Match" = 'match reports'
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 result for the match with entry Match Reports? ### Input: CREATE TABLE table_47981 ( "Match" text, "Dat...
How many people had the high points when a. webb (7) had the high assists?
CREATE TABLE table_74210 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("High points") FROM table_74210 WHERE "High assists" = 'A. Webb (7)'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many people had the high points when a. webb (7) had the high assists? ### Input: CREATE TABLE table_74210 ( "Game" ...
what is the number of patients whose diagnoses short title is neonatal thrombocytopen and lab test abnormal status is delta?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Neonatal thrombocytopen" AND lab.flag = "delta"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose diagnoses short title is neonatal thrombocytopen and lab test abnormal status is delta?...
Name the series number directed by richard thorpe written by dee johnson
CREATE TABLE table_21618 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT MAX("Series #") FROM table_21618 WHERE "Directed by" = 'Richard Thorpe' AND "Written by" = 'Dee Johnson'
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 series number directed by richard thorpe written by dee johnson ### Input: CREATE TABLE table_21618 ( "Series #...
count the number of patients whose primary disease is gastrointestinal bleed and admission year is less than 2124?
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.diagnosis = "GASTROINTESTINAL BLEED" AND demographic.admityear < "2124"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose primary disease is gastrointestinal bleed and admission year is less than 2124? ### Input...
What is the number of professors for different school Plot them as bar chart, and show by the names from high to low.
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), ...
SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE ORDER BY SCHOOL_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: What is the number of professors for different school Plot them as bar chart, and show by the names from high to low. ### In...
How many season have an average attendance league of 2.456?
CREATE TABLE table_78659 ( "Season" real, "Average Attendance Home" real, "Highest Attendance Home" text, "Average Attendance Away" real, "Highest Attendance Away" text, "Division / Section" text, "Level" text, "Average Attendance League" real )
SELECT SUM("Season") FROM table_78659 WHERE "Average Attendance League" = '2.456'
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 season have an average attendance league of 2.456? ### Input: CREATE TABLE table_78659 ( "Season" real, "Av...
What is the special notes value for years under 2009?
CREATE TABLE table_52273 ( "Year" real, "Theme" text, "Artist" text, "Issue Price" real, "Special Notes" text )
SELECT "Special Notes" FROM table_52273 WHERE "Year" < '2009'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the special notes value for years under 2009? ### Input: CREATE TABLE table_52273 ( "Year" real, "Theme" tex...
List all the distinct product names ordered by product id?
CREATE TABLE product ( product_name VARCHAR, product_id VARCHAR )
SELECT DISTINCT product_name FROM product ORDER BY product_id
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List all the distinct product names ordered by product id? ### Input: CREATE TABLE product ( product_name VARCHAR, p...
what is patient 52456's minimum value of lipase last month?
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 prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time...
SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52456) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'lipase') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CUR...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is patient 52456's minimum value of lipase last month? ### Input: CREATE TABLE chartevents ( row_id number, sub...
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, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time by a bar chart, and could you display by the total number in desc?
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(EMPLOYEE_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: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
give me the number of patients whose diagnoses short title is encephalopathy nos?
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Encephalopathy NOS"
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 short title is encephalopathy nos? ### Input: CREATE TABLE prescriptions ( ...
Bar graph to show meter_100 from different meter 400, and show in descending by the total number.
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text...
SELECT meter_400, meter_100 FROM swimmer ORDER BY meter_100 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: Bar graph to show meter_100 from different meter 400, and show in descending by the total number. ### Input: CREATE TABLE ev...
What is the listed for the bridge at Daniel in Sublette county?
CREATE TABLE table_name_86 ( listed VARCHAR, county VARCHAR, location VARCHAR )
SELECT listed FROM table_name_86 WHERE county = "sublette" AND location = "daniel"
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 listed for the bridge at Daniel in Sublette county? ### Input: CREATE TABLE table_name_86 ( listed VARCHAR, ...
What was the manner of departure for the vacancy date of 20 September 2009?
CREATE TABLE table_name_30 ( manner_of_departure VARCHAR, date_of_vacancy VARCHAR )
SELECT manner_of_departure FROM table_name_30 WHERE date_of_vacancy = "20 september 2009"
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 manner of departure for the vacancy date of 20 September 2009? ### Input: CREATE TABLE table_name_30 ( mann...
what city is brule in
CREATE TABLE table_6206 ( "Speaker" text, "Party" text, "City" text, "County" text, "Term" text )
SELECT "City" FROM table_6206 WHERE "County" = 'brule'
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 city is brule in ### Input: CREATE TABLE table_6206 ( "Speaker" text, "Party" text, "City" text, "Count...
Draw a bar chart about the distribution of middle_name and author_id .
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_o...
SELECT middle_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart about the distribution of middle_name and author_id . ### Input: CREATE TABLE Courses ( course_id INTEG...
what race name had a uci rating of cn?
CREATE TABLE table_27887723_1 ( race_name VARCHAR, uci_rating VARCHAR )
SELECT race_name FROM table_27887723_1 WHERE uci_rating = "CN"
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 race name had a uci rating of cn? ### Input: CREATE TABLE table_27887723_1 ( race_name VARCHAR, uci_rating VARC...
On what date was elimination on final night?
CREATE TABLE table_45203 ( "Name" text, "Category" text, "Eliminated" text, "Date" text, "Special Guest" text )
SELECT "Date" FROM table_45203 WHERE "Eliminated" = 'final night'
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 what date was elimination on final night? ### Input: CREATE TABLE table_45203 ( "Name" text, "Category" text, ...
Where did Bob Murphy of the United States place?
CREATE TABLE table_name_74 ( place VARCHAR, country VARCHAR, player VARCHAR )
SELECT place FROM table_name_74 WHERE country = "united states" AND player = "bob murphy"
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: Where did Bob Murphy of the United States place? ### Input: CREATE TABLE table_name_74 ( place VARCHAR, country VARC...
Which students are unaffected by allergies?
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE has_allergy ( stuid number, allergy text ) CREATE TABLE allergy_type ( allergy text, allergytype text )
SELECT stuid FROM student EXCEPT SELECT stuid FROM has_allergy
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which students are unaffected by allergies? ### Input: CREATE TABLE student ( stuid number, lname text, fname te...
Of the following [ classes ] , EECS 698 and EECS 442 , which is easiest ?
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname var...
SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 698 OR course.number = 442) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ...
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: Of the following [ classes ] , EECS 698 and EECS 442 , which is easiest ? ### Input: CREATE TABLE ta ( campus_job_id int...
how many patients are diagnosed with icd9 code e9300 and tested with main drug type?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "E9300" AND prescriptions.drug_type = "MAIN"
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 diagnosed with icd9 code e9300 and tested with main drug type? ### Input: CREATE TABLE lab ( subje...
what is the primary disease of the patient id 3343?
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.diagnosis FROM demographic WHERE demographic.subject_id = "3343"
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 primary disease of the patient id 3343? ### Input: CREATE TABLE demographic ( subject_id text, hadm_id t...
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, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, could you display in ascending by the names?
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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), CO...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
What was the grid associated with under 26 laps and a Time/Retired of +6.077?
CREATE TABLE table_52878 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT AVG("Grid") FROM table_52878 WHERE "Time/Retired" = '+6.077' AND "Laps" < '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: What was the grid associated with under 26 laps and a Time/Retired of +6.077? ### Input: CREATE TABLE table_52878 ( "Rid...
Kui palju on kasutajaid kokku?.
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text )...
SELECT COUNT(Id) FROM Posts WHERE CreationDate BETWEEN '2019-01-01' AND '2019-03-03'
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: Kui palju on kasutajaid kokku?. ### Input: CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CR...
give me the number of patients whose death status is 1 and diagnoses short title is sec neuroend tumor-liver?
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 diagnoses ( ...
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 = "Sec neuroend tumor-liver"
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 death status is 1 and diagnoses short title is sec neuroend tumor-liver? ### Input: CRE...
What is the All Home with less than 0.406% All Games?
CREATE TABLE table_12614 ( "Team" text, "B10 Conference" text, "B10 %" real, "B10 Home" text, "B10 Road" text, "All Games" text, "All Games %" real, "All Home" text, "All Road" text, "All Neutral" text )
SELECT "All Home" FROM table_12614 WHERE "All Games %" < '0.406'
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 All Home with less than 0.406% All Games? ### Input: CREATE TABLE table_12614 ( "Team" text, "B10 Confer...
When was the venue named nassau veterans memorial coliseum established??
CREATE TABLE table_76319 ( "Club" text, "League" text, "Venue" text, "Capacity" text, "Location" text, "Established" real, "Championships" real )
SELECT MAX("Established") FROM table_76319 WHERE "Venue" = 'nassau veterans memorial coliseum'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the venue named nassau veterans memorial coliseum established?? ### Input: CREATE TABLE table_76319 ( "Club" te...
What rank has 0 as the bronze, and a total less than 3, with north korea as the nation?
CREATE TABLE table_name_56 ( rank VARCHAR, nation VARCHAR, bronze VARCHAR, total VARCHAR )
SELECT rank FROM table_name_56 WHERE bronze = 0 AND total < 3 AND nation = "north korea"
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 rank has 0 as the bronze, and a total less than 3, with north korea as the nation? ### Input: CREATE TABLE table_name_5...
what is the location when the time is 3:15?
CREATE TABLE table_name_7 ( location VARCHAR, time VARCHAR )
SELECT location FROM table_name_7 WHERE time = "3:15"
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 location when the time is 3:15? ### Input: CREATE TABLE table_name_7 ( location VARCHAR, time VARCHAR ) ...
Show me Epistemology courses of 15 credits .
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id ...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Epistemology%' OR name LIKE '%Epistemology%') AND credits = 15
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: Show me Epistemology courses of 15 credits . ### Input: CREATE TABLE jobs ( job_id int, job_title varchar, descr...
What's the platform of Super Mario All-Stars?
CREATE TABLE table_63492 ( "Rank" real, "Title" text, "Release Date" text, "Franchise" text, "Developer(s)" text, "Platform" text, "Units sold (in Millions)" real )
SELECT "Platform" FROM table_63492 WHERE "Title" = 'super mario all-stars'
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 platform of Super Mario All-Stars? ### Input: CREATE TABLE table_63492 ( "Rank" real, "Title" text, "...
how many towns have a population higher than 1000 ?
CREATE TABLE table_203_568 ( id number, "town/village" text, "population" number, "postal code" text, "municipality" text, "island" text, "location" text )
SELECT COUNT("town/village") FROM table_203_568 WHERE "population" > 1000
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 towns have a population higher than 1000 ? ### Input: CREATE TABLE table_203_568 ( id number, "town/village...
What is the title and director for the movie with highest worldwide gross in the year 2000 or before?
CREATE TABLE culture_company ( company_name text, type text, incorporated_in text, group_equity_shareholding number, book_club_id text, movie_id text ) CREATE TABLE book_club ( book_club_id number, year number, author_or_editor text, book_title text, publisher text, cate...
SELECT title, director FROM movie WHERE year <= 2000 ORDER BY gross_worldwide 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 title and director for the movie with highest worldwide gross in the year 2000 or before? ### Input: CREATE TABL...
When was the Lakeside race where Paul Morris won?
CREATE TABLE table_49566 ( "Race" real, "Race Title" text, "Circuit" text, "City / State" text, "Date" text, "Winner" text, "Team" text )
SELECT "Date" FROM table_49566 WHERE "Race Title" = 'lakeside' AND "Winner" = 'paul morris'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the Lakeside race where Paul Morris won? ### Input: CREATE TABLE table_49566 ( "Race" real, "Race Title" te...
what is the total land area of saint lucia -lrb- in square kilometers -rrb- ?
CREATE TABLE table_203_212 ( id number, "#" number, "district" text, "land area (km2)" number, "population\n(2010 census)" number, "density (persons/km2)" number )
SELECT "land area (km2)" FROM table_203_212 WHERE "district" = 'saint lucia'
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 total land area of saint lucia -lrb- in square kilometers -rrb- ? ### Input: CREATE TABLE table_203_212 ( id...
Where is the Cagayan de Oro city located?
CREATE TABLE table_name_98 ( province_region VARCHAR, location VARCHAR )
SELECT province_region FROM table_name_98 WHERE location = "cagayan de oro city"
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: Where is the Cagayan de Oro city located? ### Input: CREATE TABLE table_name_98 ( province_region VARCHAR, location ...
What club had 404 points against?
CREATE TABLE table_13741576_6 ( club VARCHAR, points_against VARCHAR )
SELECT club FROM table_13741576_6 WHERE points_against = "404"
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 club had 404 points against? ### Input: CREATE TABLE table_13741576_6 ( club VARCHAR, points_against VARCHAR ) ...
What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.
CREATE TABLE subjects ( subject_id number, subject_name text ) CREATE TABLE course_authors_and_tutors ( author_id number, author_tutor_atb text, login_name text, password text, personal_name text, middle_name text, family_name text, gender_mf text, address_line_1 text ) CRE...
SELECT personal_name, family_name FROM students ORDER BY family_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 personal names and family names of the students? Sort the result in alphabetical order of the family name. ### ...
Which event did he win with a method of submission (triangle choke) and a time of n/a?
CREATE TABLE table_7978 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT "Event" FROM table_7978 WHERE "Res." = 'win' AND "Time" = 'n/a' AND "Method" = 'submission (triangle choke)'
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 event did he win with a method of submission (triangle choke) and a time of n/a? ### Input: CREATE TABLE table_7978 ( ...
What's the highest series number ?
CREATE TABLE table_27823058_1 ( series__number INTEGER )
SELECT MAX(series__number) FROM table_27823058_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's the highest series number ? ### Input: CREATE TABLE table_27823058_1 ( series__number INTEGER ) ### Response: SEL...
What is the set 5 with a 19-25 set 1?
CREATE TABLE table_40023 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
SELECT "Set 5" FROM table_40023 WHERE "Set 1" = '19-25'
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 set 5 with a 19-25 set 1? ### Input: CREATE TABLE table_40023 ( "Date" text, "Score" text, "Set 1" t...
Which country has a density (per km ) of 6,814?
CREATE TABLE table_63216 ( "Island" text, "Country" text, "Population" text, "Area km\u00b2" text, "Density (per km\u00b2)" text )
SELECT "Country" FROM table_63216 WHERE "Density (per km\u00b2)" = '6,814'
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 country has a density (per km ) of 6,814? ### Input: CREATE TABLE table_63216 ( "Island" text, "Country" text,...
What are names of customers who never ordered product Latte.
CREATE TABLE order_items ( order_id number, product_id number, order_quantity text ) CREATE TABLE customer_addresses ( customer_id number, address_id number, date_address_from time, address_type text, date_address_to time ) CREATE TABLE customer_contact_channels ( customer_id numbe...
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'
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 names of customers who never ordered product Latte. ### Input: CREATE TABLE order_items ( order_id number, ...
How many members gained university status in 1900?
CREATE TABLE table_19222 ( "Institution" text, "Location" text, "Established" real, "Gained university status" real, "Vice-chancellor" text, "Total Number of Students" real, "Research Funding (\u00a3,000)" real )
SELECT COUNT("Research Funding (\u00a3,000)") FROM table_19222 WHERE "Gained university status" = '1900'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many members gained university status in 1900? ### Input: CREATE TABLE table_19222 ( "Institution" text, "Locati...
For each phone, show its names and total number of stocks Visualize by bar chart, rank by the Y-axis in ascending please.
CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price...
SELECT Name, SUM(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name ORDER BY SUM(T1.Num_of_stock)
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 each phone, show its names and total number of stocks Visualize by bar chart, rank by the Y-axis in ascending please. ##...
Who won when the presenter was Tatiana Stefanidou?
CREATE TABLE table_15001 ( "Series" text, "TV Channel" text, "Launch Date" text, "Finale Date" text, "Days" real, "The Winner" text, "The Prize" text, "The Presenter" text )
SELECT "The Winner" FROM table_15001 WHERE "The Presenter" = 'tatiana stefanidou'
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 won when the presenter was Tatiana Stefanidou? ### Input: CREATE TABLE table_15001 ( "Series" text, "TV Channel"...
What is the long figure when gain is less than 0?
CREATE TABLE table_name_28 ( long INTEGER, gain INTEGER )
SELECT AVG(long) FROM table_name_28 WHERE gain < 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 long figure when gain is less than 0? ### Input: CREATE TABLE table_name_28 ( long INTEGER, gain INTEGER...
how many quarries opened before 1892 ?
CREATE TABLE table_203_2 ( id number, "name" text, "mineral" text, "opened" text, "closed" text, "years connected" text, "notes" text )
SELECT COUNT(*) FROM table_203_2 WHERE "opened" <= 1892
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 quarries opened before 1892 ? ### Input: CREATE TABLE table_203_2 ( id number, "name" text, "mineral" t...
When was successor George E. Harris (R) seated?
CREATE TABLE table_2417345_4 ( date_successor_seated VARCHAR, successor VARCHAR )
SELECT date_successor_seated FROM table_2417345_4 WHERE successor = "George E. Harris (R)"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was successor George E. Harris (R) seated? ### Input: CREATE TABLE table_2417345_4 ( date_successor_seated VARCHAR,...
What is the highest draw number when there are more than 31 points, a rank greater than 6, and the English translation is listen to me?
CREATE TABLE table_63594 ( "Draw" real, "Language" text, "Artist" text, "English translation" text, "Place" real, "Points" real )
SELECT MAX("Draw") FROM table_63594 WHERE "Points" > '31' AND "Place" > '6' AND "English translation" = 'listen to me'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest draw number when there are more than 31 points, a rank greater than 6, and the English translation is li...
count the number of people who were prescribed vancomycin hcl during the same month following a diagnosis of ac vasc insuff intestine since 6 years ago.
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label te...
SELECT COUNT(DISTINCT t1.subject_id) 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 d_icd_diagnoses.short_title = 'ac vasc insuff int...
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 people who were prescribed vancomycin hcl during the same month following a diagnosis of ac vasc insuff ...
select * from Users where Id= 113.
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedb...
SELECT * FROM Users WHERE Id = 113
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: select * from Users where Id= 113. ### Input: CREATE TABLE PostLinks ( Id number, CreationDate time, PostId numb...
What's the series number of the episode titled 'The Quest'?
CREATE TABLE table_17622 ( "Number in series" real, "Broadcast Order" text, "Title" text, "Villain/s" text, "U.S. Air Date" text, "Production Code" text )
SELECT MAX("Number in series") FROM table_17622 WHERE "Title" = 'The Quest'
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 series number of the episode titled 'The Quest'? ### Input: CREATE TABLE table_17622 ( "Number in series" rea...
What game has jones (10) as the high rebounds?
CREATE TABLE table_name_94 ( game VARCHAR, high_rebounds VARCHAR )
SELECT game FROM table_name_94 WHERE high_rebounds = "jones (10)"
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 game has jones (10) as the high rebounds? ### Input: CREATE TABLE table_name_94 ( game VARCHAR, high_rebounds V...
how many patients are born before 2056 and administered with si drug route?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2056" AND prescriptions.route = "SL"
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 born before 2056 and administered with si drug route? ### Input: CREATE TABLE prescriptions ( subj...
What was the result of the game on October 6, 1974?
CREATE TABLE table_19712 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real )
SELECT "Result" FROM table_19712 WHERE "Date" = 'October 6, 1974'
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 result of the game on October 6, 1974? ### Input: CREATE TABLE table_19712 ( "Week" real, "Date" text, ...
WHAT IS THE 2010 WITH 2012 OF 2R AT MIAMI MASTERS?
CREATE TABLE table_name_93 ( tournament VARCHAR )
SELECT 2010 FROM table_name_93 WHERE 2012 = "2r" AND tournament = "miami masters"
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 2010 WITH 2012 OF 2R AT MIAMI MASTERS? ### Input: CREATE TABLE table_name_93 ( tournament VARCHAR ) ### Resp...
give me a list of the morning flights from ATLANTA to BOSTON
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE fare_basis ( fare_basis_cod...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTO...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me a list of the morning flights from ATLANTA to BOSTON ### Input: CREATE TABLE airport_service ( city_code varchar...
what division was the team most commonly found in ?
CREATE TABLE table_202_160 ( id number, "season" number, "level" text, "division" text, "section" text, "position" text, "movements" text )
SELECT "division" FROM table_202_160 GROUP BY "division" ORDER BY COUNT(*) 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 division was the team most commonly found in ? ### Input: CREATE TABLE table_202_160 ( id number, "season" numb...
Who won in 2003?
CREATE TABLE table_58095 ( "Year" real, "Winner" text, "Jockey" text, "Trainer" text, "Owner" text, "Time" text )
SELECT "Winner" FROM table_58095 WHERE "Year" = '2003'
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 won in 2003? ### Input: CREATE TABLE table_58095 ( "Year" real, "Winner" text, "Jockey" text, "Trainer" ...
Which Song has a Weeks at number one larger than 2, and an Issue date(s) of 17 april - 8 may?
CREATE TABLE table_name_52 ( song VARCHAR, weeks_at_number_one VARCHAR, issue_date_s_ VARCHAR )
SELECT song FROM table_name_52 WHERE weeks_at_number_one > 2 AND issue_date_s_ = "17 april - 8 may"
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 Song has a Weeks at number one larger than 2, and an Issue date(s) of 17 april - 8 may? ### Input: CREATE TABLE table_...
Name the player for chicago black hawks
CREATE TABLE table_72576 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
SELECT "Player" FROM table_72576 WHERE "NHL team" = 'Chicago Black Hawks'
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 player for chicago black hawks ### Input: CREATE TABLE table_72576 ( "Pick #" real, "Player" text, "Pos...
i need a flight from NEW YORK to TORONTO THURSDAY 5 24 arriving by 1200
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days AS DAYS_0, days AS DAYS_1, flight WHERE (((DAYS_1.day_name = 'THURSDAY' AND flight.arrival_time <= 1200 AND flight.flight_days = DAYS_1.days_code) AND date_day...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i need a flight from NEW YORK to TORONTO THURSDAY 5 24 arriving by 1200 ### Input: CREATE TABLE flight_leg ( flight_id i...
Questions counted by vote range.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE T...
SELECT COUNT(CASE WHEN UPPER(Posts.Tags) LIKE '%<OPEN-ENDED>%' THEN 1 END) AS OpenEndedCount FROM Posts JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE PostTypes.Name = 'Question'
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions counted by vote range. ### Input: CREATE TABLE ReviewTaskStates ( Id number, Name text, Description te...
How many floors does the address 1828 jay street have?
CREATE TABLE table_name_44 ( floors VARCHAR, street_address_in_detroit VARCHAR )
SELECT floors FROM table_name_44 WHERE street_address_in_detroit = "1828 jay street"
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 floors does the address 1828 jay street have? ### Input: CREATE TABLE table_name_44 ( floors VARCHAR, stree...
Find the number of booking start date for the apartments that have more than two bedrooms for each weekday in a bar chart, display total number from high to low order please.
CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_start_date DATETIME, booking_end_date DATETIME ) CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_las...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 ORDER BY COUNT(booking_start_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: Find the number of booking start date for the apartments that have more than two bedrooms for each weekday in a bar chart, d...
Who had a run 2 of 50.67?
CREATE TABLE table_36315 ( "Athlete" text, "Country" text, "Run 1" real, "Run 2" real, "Run 3" real )
SELECT "Athlete" FROM table_36315 WHERE "Run 2" = '50.67'
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 had a run 2 of 50.67? ### Input: CREATE TABLE table_36315 ( "Athlete" text, "Country" text, "Run 1" real, ...
How much ht does the model with 10x mult. 1 have?
CREATE TABLE table_27277284_28 ( ht VARCHAR, mult_1 VARCHAR )
SELECT ht FROM table_27277284_28 WHERE mult_1 = "10x"
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 much ht does the model with 10x mult. 1 have? ### Input: CREATE TABLE table_27277284_28 ( ht VARCHAR, mult_1 VAR...
How low was the income where services is 72.5?
CREATE TABLE table_13618358_1 ( income_poverty_f VARCHAR, services_ VARCHAR, _cons_truction_b VARCHAR )
SELECT income_poverty_f FROM table_13618358_1 WHERE services_ & _cons_truction_b = "72.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: How low was the income where services is 72.5? ### Input: CREATE TABLE table_13618358_1 ( income_poverty_f VARCHAR, ...