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 circuit did Juan Manuel Fangio have the fastest lap at the german grand prix?
CREATE TABLE table_name_16 ( circuit VARCHAR, fastest_lap VARCHAR, race VARCHAR )
SELECT circuit FROM table_name_16 WHERE fastest_lap = "juan manuel fangio" AND race = "german grand prix"
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 circuit did Juan Manuel Fangio have the fastest lap at the german grand prix? ### Input: CREATE TABLE table_name_16 ( ...
What Country is Gene Littler from?
CREATE TABLE table_name_60 ( country VARCHAR, player VARCHAR )
SELECT country FROM table_name_60 WHERE player = "gene littler"
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 Country is Gene Littler from? ### Input: CREATE TABLE table_name_60 ( country VARCHAR, player VARCHAR ) ### Res...
What are the number of the names of all the Japanese constructors that have earned more than 5 points?, and could you show in ascending by the Y?
CREATE TABLE qualifying ( qualifyId INTEGER, raceId INTEGER, driverId INTEGER, constructorId INTEGER, number INTEGER, position INTEGER, q1 TEXT, q2 TEXT, q3 TEXT ) CREATE TABLE results ( resultId INTEGER, raceId INTEGER, driverId INTEGER, constructorId INTEGER, n...
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY COUNT(name)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the number of the names of all the Japanese constructors that have earned more than 5 points?, and could you show i...
Find the names of all distinct wines that have appellations in North Coast area.
CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE appellations ( no number, appelation text, county text, state text, area text, isava text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text,...
SELECT DISTINCT T2.name FROM appellations AS T1 JOIN wine AS T2 ON T1.appelation = T2.appelation WHERE T1.area = "North Coast"
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 names of all distinct wines that have appellations in North Coast area. ### Input: CREATE TABLE grapes ( id num...
in this year, when did patient 1784 get admitted to the hospital for the last time?
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 1784 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime 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: in this year, when did patient 1784 get admitted to the hospital for the last time? ### Input: CREATE TABLE admissions ( ...
Who is the GamePlan when Arabella Lazenby is the RolePlay actor?
CREATE TABLE table_62573 ( "Actor in original production" text, "Actor required" text, "GamePlan" text, "FlatSpin" text, "RolePlay" text )
SELECT "GamePlan" FROM table_62573 WHERE "RolePlay" = 'arabella lazenby'
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 GamePlan when Arabella Lazenby is the RolePlay actor? ### Input: CREATE TABLE table_62573 ( "Actor in origina...
How many high points were there in the game 67?
CREATE TABLE table_11960944_7 ( high_points VARCHAR, game VARCHAR )
SELECT COUNT(high_points) FROM table_11960944_7 WHERE game = 67
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 high points were there in the game 67? ### Input: CREATE TABLE table_11960944_7 ( high_points VARCHAR, game...
What is the highest number of points scored when Acadie-Bathurst had 4 tied games, less than 257 goals, and over 72 games played?
CREATE TABLE table_name_10 ( points INTEGER, games VARCHAR, tied VARCHAR, goals_for VARCHAR )
SELECT MAX(points) FROM table_name_10 WHERE tied = "4" AND goals_for < 257 AND games > 72
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number of points scored when Acadie-Bathurst had 4 tied games, less than 257 goals, and over 72 games pl...
how many seeds above villanova is marquette ?
CREATE TABLE table_204_898 ( id number, "seed" text, "school" text, "conf (overall)" text, "tiebreaker" text )
SELECT (SELECT "seed" FROM table_204_898 WHERE "school" = 'villanova') - (SELECT "seed" FROM table_204_898 WHERE "school" = 'marquette')
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 seeds above villanova is marquette ? ### Input: CREATE TABLE table_204_898 ( id number, "seed" text, "s...
What MLB draft has Shaun Boyd?
CREATE TABLE table_58032 ( "Player" text, "Position" text, "School" text, "Hometown" text, "MLB Draft" text )
SELECT "MLB Draft" FROM table_58032 WHERE "Player" = 'shaun boyd'
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 MLB draft has Shaun Boyd? ### Input: CREATE TABLE table_58032 ( "Player" text, "Position" text, "School" te...
Which institution's nickname is the Polar Bears?
CREATE TABLE table_28401 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Founding Religious Affiliation" text, "Enrollment" real, "Joined" real )
SELECT "Institution" FROM table_28401 WHERE "Nickname" = 'Polar Bears'
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 institution's nickname is the Polar Bears? ### Input: CREATE TABLE table_28401 ( "Institution" text, "Location...
On what Date was Wales the Opponent?
CREATE TABLE table_36441 ( "Date" text, "City" text, "Opponent" text, "Results\u00b9" text, "Type of game" text )
SELECT "Date" FROM table_36441 WHERE "Opponent" = 'wales'
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 Wales the Opponent? ### Input: CREATE TABLE table_36441 ( "Date" text, "City" text, "Opponent" ...
what was the drug that was prescribed to patient 013-33898 after receiving reintubation in 02/last year in the same day?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text,...
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 = '013-33898') AND treatment.treatme...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the drug that was prescribed to patient 013-33898 after receiving reintubation in 02/last year in the same day? ###...
Who was No. 9 when Ava was No. 4 and Addison was No. 6?
CREATE TABLE table_name_37 ( no_9 VARCHAR, no_4 VARCHAR, no_6 VARCHAR )
SELECT no_9 FROM table_name_37 WHERE no_4 = "ava" AND no_6 = "addison"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was No. 9 when Ava was No. 4 and Addison was No. 6? ### Input: CREATE TABLE table_name_37 ( no_9 VARCHAR, no_4 V...
What is the maac when the overall is 26-8?
CREATE TABLE table_21756039_1 ( maac VARCHAR, overall VARCHAR )
SELECT maac FROM table_21756039_1 WHERE overall = "26-8"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the maac when the overall is 26-8? ### Input: CREATE TABLE table_21756039_1 ( maac VARCHAR, overall VARCHAR ...
What is the venue of teh carfax 250 race?
CREATE TABLE table_name_62 ( venue VARCHAR, race VARCHAR )
SELECT venue FROM table_name_62 WHERE race = "carfax 250"
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 venue of teh carfax 250 race? ### Input: CREATE TABLE table_name_62 ( venue VARCHAR, race VARCHAR ) ### ...
What is the rank for less than 6 plays?
CREATE TABLE table_47587 ( "Rank" real, "Team" text, "Played" real, "Wins" real, "Losses" real, "Points" real )
SELECT SUM("Rank") FROM table_47587 WHERE "Played" < '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: What is the rank for less than 6 plays? ### Input: CREATE TABLE table_47587 ( "Rank" real, "Team" text, "Played"...
how many patients whose gender is m and diagnoses icd9 code is 5845?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "5845"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose gender is m and diagnoses icd9 code is 5845? ### Input: CREATE TABLE prescriptions ( subject_id ...
A stacked bar chart shows the total number of ships with different nationalities and split by ship type, could you show by the names in desc?
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text )
SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY Nationality 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: A stacked bar chart shows the total number of ships with different nationalities and split by ship type, could you show by t...
Find the names of the top 10 airlines that operate the most number of routes.
CREATE TABLE airlines ( name VARCHAR, alid VARCHAR ) CREATE TABLE routes ( alid VARCHAR )
SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 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: Find the names of the top 10 airlines that operate the most number of routes. ### Input: CREATE TABLE airlines ( name VA...
What is the Venue before 2003 with Notes of 57.73 m?
CREATE TABLE table_15497 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text )
SELECT "Venue" FROM table_15497 WHERE "Year" < '2003' AND "Notes" = '57.73 m'
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 Venue before 2003 with Notes of 57.73 m? ### Input: CREATE TABLE table_15497 ( "Year" real, "Competition...
Give the class of races that is most common.
CREATE TABLE race ( race_id number, name text, class text, date text, track_id text ) CREATE TABLE track ( track_id number, name text, location text, seating number, year_opened number )
SELECT class FROM race GROUP BY class 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: Give the class of races that is most common. ### Input: CREATE TABLE race ( race_id number, name text, class tex...
Show all calendar dates and day Numbers Plot them as line chart, list by the X-axis in asc please.
CREATE TABLE Roles ( Role_Code CHAR(15), Role_Name VARCHAR(255), Role_Description VARCHAR(255) ) CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) )...
SELECT Calendar_Date, Day_Number FROM Ref_Calendar ORDER BY Calendar_Date
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show all calendar dates and day Numbers Plot them as line chart, list by the X-axis in asc please. ### Input: CREATE TABLE R...
how long has fc shakhtyor salihorsk been playing in europe ?
CREATE TABLE table_203_242 ( id number, "season" text, "competition" text, "round" text, "club" text, "1st leg" text, "2nd leg" text )
SELECT MAX("season") - MIN("season") + 1 FROM table_203_242
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 has fc shakhtyor salihorsk been playing in europe ? ### Input: CREATE TABLE table_203_242 ( id number, "sea...
have blood pressure > 100 mmhg systolic or > 70 mmhg diastolic
CREATE TABLE table_train_154 ( "id" int, "systolic_blood_pressure_sbp" int, "fpg" float, "hemoglobin_a1c_hba1c" float, "creatinine_clearance_cl" float, "diastolic_blood_pressure_dbp" int, "NOUSE" float )
SELECT * FROM table_train_154 WHERE systolic_blood_pressure_sbp > 100 OR diastolic_blood_pressure_dbp > 70
criteria2sql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: have blood pressure > 100 mmhg systolic or > 70 mmhg diastolic ### Input: CREATE TABLE table_train_154 ( "id" int, "...
What Position did the Hamilton Tiger-Cats (via Ottawa) pick in the 2006 Draft.
CREATE TABLE table_10812938_4 ( position VARCHAR, cfl_team VARCHAR )
SELECT position FROM table_10812938_4 WHERE cfl_team = "Hamilton Tiger-Cats (via Ottawa)"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Position did the Hamilton Tiger-Cats (via Ottawa) pick in the 2006 Draft. ### Input: CREATE TABLE table_10812938_4 ( ...
Which Adelaide has Perth no, Gold Coast no, and Sydney yes?
CREATE TABLE table_name_13 ( adelaide VARCHAR, sydney VARCHAR, perth VARCHAR, gold_coast VARCHAR )
SELECT adelaide FROM table_name_13 WHERE perth = "no" AND gold_coast = "yes" AND sydney = "yes"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Adelaide has Perth no, Gold Coast no, and Sydney yes? ### Input: CREATE TABLE table_name_13 ( adelaide VARCHAR, ...
what are the total number of courthouses located in biloxi ?
CREATE TABLE table_204_87 ( id number, "courthouse" text, "city" text, "street address" text, "jurisdiction" text, "dates of use" text, "named for" text )
SELECT COUNT("courthouse") FROM table_204_87 WHERE "city" = 'biloxi'
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 are the total number of courthouses located in biloxi ? ### Input: CREATE TABLE table_204_87 ( id number, "cour...
List the main industry with highest total market value and its number of companies.
CREATE TABLE company ( company_id number, rank number, company text, headquarters text, main_industry text, sales_billion number, profits_billion number, assets_billion number, market_value number ) CREATE TABLE gas_station ( station_id number, open_year number, location...
SELECT main_industry, COUNT(*) FROM company GROUP BY main_industry ORDER BY SUM(market_value) 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: List the main industry with highest total market value and its number of companies. ### Input: CREATE TABLE company ( co...
what was the score when goran ivani evi was runner up and the tournament was in algarve?
CREATE TABLE table_58070 ( "Tournament" text, "Winner" text, "Runner-up" text, "Score" text, "Third Place" text )
SELECT "Score" FROM table_58070 WHERE "Runner-up" = 'goran ivanišević' AND "Tournament" = 'algarve'
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 score when goran ivani evi was runner up and the tournament was in algarve? ### Input: CREATE TABLE table_58070...
What's listed for the Turnout % with a Raila of 519,180?
CREATE TABLE table_35711 ( "Province" text, "Kibaki" text, "Raila" text, "Wamalwa" text, "Ngilu" text, "Others" text, "Registered Voters" text, "Turnout %" text )
SELECT "Turnout %" FROM table_35711 WHERE "Raila" = '519,180'
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 listed for the Turnout % with a Raila of 519,180? ### Input: CREATE TABLE table_35711 ( "Province" text, "Kib...
Which country had a contestant that was 1.76 meters tall?
CREATE TABLE table_26124 ( "Represent" text, "Contestant" text, "Age" real, "Height (ft.)" text, "Height (mtr.)" text, "Hometown" text )
SELECT "Represent" FROM table_26124 WHERE "Height (mtr.)" = '1.76'
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 had a contestant that was 1.76 meters tall? ### Input: CREATE TABLE table_26124 ( "Represent" text, "C...
What course prerequisites does GEOSCI 452 have ?
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE requirement (...
SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_0.department = 'GEOSCI' AND COURSE_0.numbe...
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 course prerequisites does GEOSCI 452 have ? ### Input: CREATE TABLE gsi ( course_offering_id int, student_id in...
Find the number of male students (with sex M) from each city in a bar chart, display from high to low by the X.
CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, ci...
SELECT city_code, COUNT(*) FROM Student WHERE Sex = 'M' GROUP BY city_code ORDER BY city_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: Find the number of male students (with sex M) from each city in a bar chart, display from high to low by the X. ### Input: C...
Where did the episode rank that was written by thomas l. moran?
CREATE TABLE table_28026156_1 ( rank__week_ VARCHAR, written_by VARCHAR )
SELECT rank__week_ FROM table_28026156_1 WHERE written_by = "Thomas L. Moran"
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 the episode rank that was written by thomas l. moran? ### Input: CREATE TABLE table_28026156_1 ( rank__week_ V...
how many patients admission location is transferred within this facility with the birth year before 2089?
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.dob_year < "2089"
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 admission location is transferred within this facility with the birth year before 2089? ### Input: CREATE ...
What is the branding for cbxp-fm?
CREATE TABLE table_name_15 ( branding VARCHAR, call_sign VARCHAR )
SELECT branding FROM table_name_15 WHERE call_sign = "cbxp-fm"
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 branding for cbxp-fm? ### Input: CREATE TABLE table_name_15 ( branding VARCHAR, call_sign VARCHAR ) ### ...
Edits that removed the mathematical-physics tag.
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskResults ( Id number, Review...
SELECT edits.PostId AS "post_link", edits.CreationDate, edits.Text AS "Edited tags", originalTags.Text AS "Original tags" FROM PostHistory AS edits JOIN PostHistory AS originalTags ON originalTags.PostId = edits.PostId WHERE edits.PostHistoryTypeId = 6 AND originalTags.PostHistoryTypeId = 3 AND originalTags.Text LIKE '...
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: Edits that removed the mathematical-physics tag. ### Input: CREATE TABLE TagSynonyms ( Id number, SourceTagName text...
What is the 2010 entry for the row that has a 2009 entry of 270?
CREATE TABLE table_12922 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
SELECT "2010" FROM table_12922 WHERE "2009" = '270'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the 2010 entry for the row that has a 2009 entry of 270? ### Input: CREATE TABLE table_12922 ( "Tournament" text...
what was the total amount of urine output that patient 027-149724 had a day before?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wa...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-149724')) AND intakeoutput.celllabel = 'urin...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the total amount of urine output that patient 027-149724 had a day before? ### Input: CREATE TABLE treatment ( ...
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, find hire_date and the average of department_id bin hire_date by weekday, and visualize them by a bar chart, and rank from high to low by the y axis.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(DEPARTMENT_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 ...
What is the title of the show with director Paul Annett?
CREATE TABLE table_28148 ( "Total #" real, "Series #" real, "Title" text, "Director" text, "Writer(s)" text, "Original airdate" text )
SELECT "Title" FROM table_28148 WHERE "Director" = 'Paul Annett'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the title of the show with director Paul Annett? ### Input: CREATE TABLE table_28148 ( "Total #" real, "Seri...
How many silver for rank 22 when gold count was more than 0 and Bronze count was less than 5?
CREATE TABLE table_name_45 ( silver INTEGER, rank VARCHAR, bronze VARCHAR, gold VARCHAR )
SELECT SUM(silver) FROM table_name_45 WHERE bronze < 5 AND gold > 0 AND rank = "22"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many silver for rank 22 when gold count was more than 0 and Bronze count was less than 5? ### Input: CREATE TABLE table_...
is there a flight on EA from BOSTON to DENVER
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time...
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON...
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: is there a flight on EA from BOSTON to DENVER ### Input: CREATE TABLE state ( state_code text, state_name text, ...
What year was the brabham bt46 bt48 bt49 Chassis common?
CREATE TABLE table_15707 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Tyres" text, "Points" real )
SELECT AVG("Year") FROM table_15707 WHERE "Chassis" = 'brabham bt46 bt48 bt49'
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 brabham bt46 bt48 bt49 Chassis common? ### Input: CREATE TABLE table_15707 ( "Year" real, "Entrant...
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, and I want to display in descending by the X.
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_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_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 who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum...
What nation has 1 bronze and 3 silvers?
CREATE TABLE table_11683 ( "Nation" text, "Gold" text, "Silver" text, "Bronze" text, "Total" real )
SELECT "Nation" FROM table_11683 WHERE "Bronze" = '1' AND "Silver" = '3'
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 nation has 1 bronze and 3 silvers? ### Input: CREATE TABLE table_11683 ( "Nation" text, "Gold" text, "Silve...
What is the sum of the total apps of player benayoun, who has a PL G greater than 0 and more than 9 CL apps?
CREATE TABLE table_name_28 ( total_apps INTEGER, cl_apps VARCHAR, pl_g VARCHAR, player VARCHAR )
SELECT SUM(total_apps) FROM table_name_28 WHERE pl_g > 0 AND player = "benayoun" AND cl_apps > 9
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of the total apps of player benayoun, who has a PL G greater than 0 and more than 9 CL apps? ### Input: CREA...
What is the call sign for channel 6?
CREATE TABLE table_2638104_1 ( callsign VARCHAR, channel VARCHAR )
SELECT callsign FROM table_2638104_1 WHERE channel = 6
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the call sign for channel 6? ### Input: CREATE TABLE table_2638104_1 ( callsign VARCHAR, channel VARCHAR ) #...
Can you tell me the sum of Grid that has the Manufacturer of aprilia, and the sandro cortese?
CREATE TABLE table_47913 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real )
SELECT SUM("Grid") FROM table_47913 WHERE "Manufacturer" = 'aprilia' AND "Rider" = 'sandro cortese'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the sum of Grid that has the Manufacturer of aprilia, and the sandro cortese? ### Input: CREATE TABLE table_...
What is teh stage with Daniele Bennati as the points classification and Giovanni VIsconti as the general classification?
CREATE TABLE table_name_36 ( stage VARCHAR, points_classification VARCHAR, general_classification VARCHAR )
SELECT stage FROM table_name_36 WHERE points_classification = "daniele bennati" AND general_classification = "giovanni visconti"
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 teh stage with Daniele Bennati as the points classification and Giovanni VIsconti as the general classification? ###...
What is the Area of the Allardville Parish with a Population smaller than 2,151?
CREATE TABLE table_77208 ( "Official Name" text, "Status" text, "Area km 2" real, "Population" real, "Census Ranking" text )
SELECT SUM("Area km 2") FROM table_77208 WHERE "Official Name" = 'allardville' AND "Population" < '2,151'
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 Area of the Allardville Parish with a Population smaller than 2,151? ### Input: CREATE TABLE table_77208 ( "...
Which ride opened after the 2000 Peeking Heights?
CREATE TABLE table_name_32 ( type VARCHAR, opened_in VARCHAR, ride_name VARCHAR )
SELECT type FROM table_name_32 WHERE opened_in > 2000 AND ride_name = "peeking heights"
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 ride opened after the 2000 Peeking Heights? ### Input: CREATE TABLE table_name_32 ( type VARCHAR, opened_in VA...
What was the result of the Tennessee 2 district election?
CREATE TABLE table_1342270_42 ( result VARCHAR, district VARCHAR )
SELECT result FROM table_1342270_42 WHERE district = "Tennessee 2"
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 result of the Tennessee 2 district election? ### Input: CREATE TABLE table_1342270_42 ( result VARCHAR, ...
What team has a location and attendance at the Seattle Center Coliseum 12,591?
CREATE TABLE table_name_22 ( team VARCHAR, location_attendance VARCHAR )
SELECT team FROM table_name_22 WHERE location_attendance = "seattle center coliseum 12,591"
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 has a location and attendance at the Seattle Center Coliseum 12,591? ### Input: CREATE TABLE table_name_22 ( t...
Find the name and account balance of the customers who have loans with a total amount of more than 5000.
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text ) CREATE TABLE ...
SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000
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 name and account balance of the customers who have loans with a total amount of more than 5000. ### Input: CREATE T...
what is the competition on 10 august 2011?
CREATE TABLE table_62923 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Competition" FROM table_62923 WHERE "Date" = '10 august 2011'
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 competition on 10 august 2011? ### Input: CREATE TABLE table_62923 ( "Date" text, "Venue" text, "Sco...
What venue did group g play at on Mar 8, 1998?
CREATE TABLE table_58273 ( "Competition" text, "Stage" text, "Venue" text, "Date" text, "Result" text )
SELECT "Venue" FROM table_58273 WHERE "Stage" = 'group g' AND "Date" = 'mar 8, 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 venue did group g play at on Mar 8, 1998? ### Input: CREATE TABLE table_58273 ( "Competition" text, "Stage" tex...
What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?
CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine ( id number, name text, trade_name text, fda_approved text ) CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, me...
SELECT MAX(omim) FROM enzyme
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 maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes? ### Input: CREATE TABLE enzyme ( id...
Which week held a tournament in Rome?
CREATE TABLE table_name_49 ( week VARCHAR, tournament VARCHAR )
SELECT week FROM table_name_49 WHERE tournament = "rome"
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 week held a tournament in Rome? ### Input: CREATE TABLE table_name_49 ( week VARCHAR, tournament VARCHAR ) ###...
What are the average points White made with 0 extra points?
CREATE TABLE table_4968 ( "Player" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
SELECT AVG("Points") FROM table_4968 WHERE "Extra points" = '0' AND "Player" = 'white'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the average points White made with 0 extra points? ### Input: CREATE TABLE table_4968 ( "Player" text, "Tou...
what was the yearly average value of the lactate of patient 2482?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ...
SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2482) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'lactate') GROUP BY STRFTIME('%y', labevents.charttime)
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 yearly average value of the lactate of patient 2482? ### Input: CREATE TABLE d_icd_procedures ( row_id numb...
what number of patients got vte prophylaxis - compression stockings in the same hospital encounter after they had been diagnosed with intracranial injury - with intracerebral hemorrhage in 2105?
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'intracranial injury - with intracerebral hemorrhage' AND STRFTIME('%y', d...
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 number of patients got vte prophylaxis - compression stockings in the same hospital encounter after they had been diagn...
when the last time patient 010-16627 had a hct lab test until 06/2105?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-16627')) AND lab.labname = 'hct' AND STRFTIME('%y-%m', lab.labresulttime) <= '2...
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 the last time patient 010-16627 had a hct lab test until 06/2105? ### Input: CREATE TABLE allergy ( allergyid numbe...
Who had the most high assists from Milwaukee?
CREATE TABLE table_38306 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "High assists" FROM table_38306 WHERE "Team" = 'milwaukee'
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 the most high assists from Milwaukee? ### Input: CREATE TABLE table_38306 ( "Game" real, "Date" text, "T...
What are the title and director of each film?
CREATE TABLE schedule ( cinema_id number, film_id number, date text, show_times_per_day number, price number ) CREATE TABLE cinema ( cinema_id number, name text, openning_year number, capacity number, location text ) CREATE TABLE film ( film_id number, rank_in_series nu...
SELECT title, directed_by 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: What are the title and director of each film? ### Input: CREATE TABLE schedule ( cinema_id number, film_id number, ...
What is the resurrection of 144,000 date with a Christ made king date in 1914, a separting sheep & goats date during Christ's presence, and a judgment of religion date in 1878?
CREATE TABLE table_7479 ( "LastDays begin" text, "Startof Christ's Presence" text, "Christ madeKing" text, "Resurrection of144,000" text, "Judgmentof Religion" text, "Separating Sheep &Goats" text, "Great Tribulation" text )
SELECT "Resurrection of144,000" FROM table_7479 WHERE "Christ madeKing" = '1914' AND "Separating Sheep &Goats" = 'during christ''s presence' AND "Judgmentof Religion" = '1878'
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 resurrection of 144,000 date with a Christ made king date in 1914, a separting sheep & goats date during Christ'...
What is the highest value for Other that has CONCACAF value of 0 a U.S. Open Cup larger than 0?
CREATE TABLE table_62218 ( "Name" text, "Years" text, "MLS Cup" real, "U.S. Open Cup" real, "CONCACAF" real, "Other" real, "Total" real )
SELECT MAX("Other") FROM table_62218 WHERE "U.S. Open Cup" > '0' AND "CONCACAF" = '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 highest value for Other that has CONCACAF value of 0 a U.S. Open Cup larger than 0? ### Input: CREATE TABLE tabl...
show me all flights from BALTIMORE to PHILADELPHIA
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service...
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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHIL...
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: show me all flights from BALTIMORE to PHILADELPHIA ### Input: CREATE TABLE state ( state_code text, state_name text,...
Name the author for 6y/ae
CREATE TABLE table_20616 ( "#" real, "Series Sorted" text, "Title" text, "Author" text, "Doctor" text, "Featuring" text, "Released" text )
SELECT "Author" FROM table_20616 WHERE "Series Sorted" = '6Y/AE'
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 author for 6y/ae ### Input: CREATE TABLE table_20616 ( "#" real, "Series Sorted" text, "Title" text, ...
For those records from the products and each product's manufacturer, give me the comparison about the average of manufacturer over the name , and group by attribute name by a bar chart, and could you list from high to low by the bars please?
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, give me the comparison about the average of manufacture...
When was the Little Tavern completed?
CREATE TABLE table_name_55 ( date_completed VARCHAR, nickname VARCHAR )
SELECT date_completed FROM table_name_55 WHERE nickname = "little tavern"
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 the Little Tavern completed? ### Input: CREATE TABLE table_name_55 ( date_completed VARCHAR, nickname VARCH...
Show the country name and capital of all countries.
CREATE TABLE country ( Country_name VARCHAR, Capital VARCHAR )
SELECT Country_name, Capital FROM country
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: Show the country name and capital of all countries. ### Input: CREATE TABLE country ( Country_name VARCHAR, Capital ...
Count the number of accounts corresponding to each customer id in a scatter chart
CREATE TABLE Orders ( order_id INTEGER, customer_id INTEGER, date_order_placed DATETIME, order_details VARCHAR(255) ) CREATE TABLE Invoice_Line_Items ( order_item_id INTEGER, invoice_number INTEGER, product_id INTEGER, product_title VARCHAR(80), product_quantity VARCHAR(50), pro...
SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_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: Count the number of accounts corresponding to each customer id in a scatter chart ### Input: CREATE TABLE Orders ( order...
what is the lowest year with the result is nominated for the work title is love bites?
CREATE TABLE table_name_99 ( year INTEGER, result VARCHAR, nominated_work_title VARCHAR )
SELECT MIN(year) FROM table_name_99 WHERE result = "nominated" AND nominated_work_title = "love bites"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the lowest year with the result is nominated for the work title is love bites? ### Input: CREATE TABLE table_name_99...
What is the Inns of 435 Runs?
CREATE TABLE table_41160 ( "Player" text, "Team" text, "Inns" real, "Runs" real, "Balls" real )
SELECT "Inns" FROM table_41160 WHERE "Runs" = '435'
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 Inns of 435 Runs? ### Input: CREATE TABLE table_41160 ( "Player" text, "Team" text, "Inns" real, ...
Name the to par for colin montgomerie
CREATE TABLE table_name_30 ( to_par VARCHAR, player VARCHAR )
SELECT to_par FROM table_name_30 WHERE player = "colin montgomerie"
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 to par for colin montgomerie ### Input: CREATE TABLE table_name_30 ( to_par VARCHAR, player VARCHAR ) ### R...
Who was the visitor for Chicago Black Hawks on May 6?
CREATE TABLE table_name_7 ( visitor VARCHAR, home VARCHAR, date VARCHAR )
SELECT visitor FROM table_name_7 WHERE home = "chicago black hawks" AND date = "may 6"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the visitor for Chicago Black Hawks on May 6? ### Input: CREATE TABLE table_name_7 ( visitor VARCHAR, home V...
What was the score in Kathmandu?
CREATE TABLE table_5264 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Score" FROM table_5264 WHERE "Venue" = 'kathmandu'
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 score in Kathmandu? ### Input: CREATE TABLE table_5264 ( "Date" text, "Venue" text, "Score" text, ...
When the network mask is 255.255.255.128 what is the lowest available subnet?
CREATE TABLE table_149426_4 ( available_subnets INTEGER, network_mask VARCHAR )
SELECT MIN(available_subnets) FROM table_149426_4 WHERE network_mask = "255.255.255.128"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When the network mask is 255.255.255.128 what is the lowest available subnet? ### Input: CREATE TABLE table_149426_4 ( a...
Which class has a year prior to 2011 and audi r15 tdi as the chassis?
CREATE TABLE table_name_72 ( class VARCHAR, year VARCHAR, chassis VARCHAR )
SELECT class FROM table_name_72 WHERE year < 2011 AND chassis = "audi r15 tdi"
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 class has a year prior to 2011 and audi r15 tdi as the chassis? ### Input: CREATE TABLE table_name_72 ( class VARC...
count the number of people that died after being diagnosed with chronic renal insufficiency during the same hospital visit.
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of people that died after being diagnosed with chronic renal insufficiency during the same hospital visit. ...
What is the total number of females where the total population is less than 2,195?
CREATE TABLE table_65019 ( "District" text, "Number of Households" real, "Total Population" real, "Male" real, "Female" real )
SELECT COUNT("Female") FROM table_65019 WHERE "Total Population" < '2,195'
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 total number of females where the total population is less than 2,195? ### Input: CREATE TABLE table_65019 ( ...
get me the number of patients admitted before 2139 with lab test item id 50911.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.itemid = "50911"
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: get me the number of patients admitted before 2139 with lab test item id 50911. ### Input: CREATE TABLE procedures ( sub...
how many patients whose discharge location is home health care and lab test name is amylase?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND lab.label = "Amylase"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose discharge location is home health care and lab test name is amylase? ### Input: CREATE TABLE demogra...
how many patients had abdomen artery incision procedure and had sepsis primary disease?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "SEPSIS" AND procedures.short_title = "Abdomen artery incision"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients had abdomen artery incision procedure and had sepsis primary disease? ### Input: CREATE TABLE diagnoses ( ...
What was Zona Sur's result after being considered for nomination?
CREATE TABLE table_76395 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Language(s)" text, "Director" text, "Result" text )
SELECT "Result" FROM table_76395 WHERE "Original title" = 'zona sur'
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 Zona Sur's result after being considered for nomination? ### Input: CREATE TABLE table_76395 ( "Year (Ceremony)...
What is the method when the time is 5:00, and the record is 14 6 1?
CREATE TABLE table_48060 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT "Method" FROM table_48060 WHERE "Time" = '5:00' AND "Record" = '14–6–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 is the method when the time is 5:00, and the record is 14 6 1? ### Input: CREATE TABLE table_48060 ( "Res." text, ...
What event had a tko (punches) method and jason macdonald as the opponent?
CREATE TABLE table_45135 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Location" text )
SELECT "Event" FROM table_45135 WHERE "Method" = 'tko (punches)' AND "Opponent" = 'jason macdonald'
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 event had a tko (punches) method and jason macdonald as the opponent? ### Input: CREATE TABLE table_45135 ( "Res." ...
Which institution has an endowment of $25.9m?
CREATE TABLE table_74150 ( "Institution" text, "Team" text, "City" text, "Province" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Endowment" text, "Football stadium" text, "Capacity" real )
SELECT "Institution" FROM table_74150 WHERE "Endowment" = '$25.9M'
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 institution has an endowment of $25.9m? ### Input: CREATE TABLE table_74150 ( "Institution" text, "Team" text,...
What date did 'the eye of the phoenix' originally air?
CREATE TABLE table_30930 ( "No. overall" real, "No. for series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "UK viewers (million)" text )
SELECT "Original air date" FROM table_30930 WHERE "Title" = 'The Eye of the Phoenix'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date did 'the eye of the phoenix' originally air? ### Input: CREATE TABLE table_30930 ( "No. overall" real, "No...
What is every record for game 13?
CREATE TABLE table_74133 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Points" real )
SELECT "Record" FROM table_74133 WHERE "Game" = '13'
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 every record for game 13? ### Input: CREATE TABLE table_74133 ( "Game" real, "November" real, "Opponent"...
how many male patients of white ethnicity are born before 2103?
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 WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2103"
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 male patients of white ethnicity are born before 2103? ### Input: CREATE TABLE prescriptions ( subject_id text,...
Who was elected in 1972
CREATE TABLE table_1341423_35 ( incumbent VARCHAR, first_elected VARCHAR )
SELECT incumbent FROM table_1341423_35 WHERE first_elected = 1972
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was elected in 1972 ### Input: CREATE TABLE table_1341423_35 ( incumbent VARCHAR, first_elected VARCHAR ) ### Re...
Show the minimum room count of apartments in different type with a bar chart, display by the bars in ascending.
CREATE TABLE View_Unit_Status ( apt_id INTEGER, apt_booking_id INTEGER, status_date DATETIME, available_yn BIT ) CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE Apartments ...
SELECT apt_type_code, MIN(room_count) FROM Apartments GROUP BY apt_type_code ORDER BY apt_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: Show the minimum room count of apartments in different type with a bar chart, display by the bars in ascending. ### Input: C...
Name the score for opponent in the final being paul baccanello
CREATE TABLE table_name_46 ( score VARCHAR, opponent_in_the_final VARCHAR )
SELECT score FROM table_name_46 WHERE opponent_in_the_final = "paul baccanello"
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 score for opponent in the final being paul baccanello ### Input: CREATE TABLE table_name_46 ( score VARCHAR, ...
Name the surface for australian open for winner
CREATE TABLE table_2009095_2 ( surface VARCHAR, championship VARCHAR, outcome VARCHAR )
SELECT surface FROM table_2009095_2 WHERE championship = "Australian Open" AND outcome = "Winner"
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 surface for australian open for winner ### Input: CREATE TABLE table_2009095_2 ( surface VARCHAR, champions...
Show names of ships involved in a mission launched after 1928.
CREATE TABLE ship ( ship_id number, name text, type text, nationality text, tonnage number ) CREATE TABLE mission ( mission_id number, ship_id number, code text, launched_year number, location text, speed_knots number, fate text )
SELECT T2.name FROM mission AS T1 JOIN ship AS T2 ON T1.ship_id = T2.ship_id WHERE T1.launched_year > 1928
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show names of ships involved in a mission launched after 1928. ### Input: CREATE TABLE ship ( ship_id number, name t...
count the number of patients whose year of birth is less than 2107 and diagnoses short title is elev transaminase/ldh?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "2107" AND diagnoses.short_title = "Elev transaminase/ldh"
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 year of birth is less than 2107 and diagnoses short title is elev transaminase/ldh? ### I...
how many answers for tag.
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDi...
SELECT TagName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 WHERE Posts.OwnerUserId = @UserId GROUP BY TagName ORDER BY UpVotes DESC
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many answers for tag. ### Input: CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostsWithD...