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 are the top five most often ordered procedures?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, ...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 5
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 are the top five most often ordered procedures? ### Input: CREATE TABLE intakeoutput ( intakeoutputid number, p...
Who was the runner-up in 2004?
CREATE TABLE table_70189 ( "Year" text, "Venue" text, "Winners" text, "Runner-up" text, "3rd place" text )
SELECT "Runner-up" FROM table_70189 WHERE "Year" = '2004'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the runner-up in 2004? ### Input: CREATE TABLE table_70189 ( "Year" text, "Venue" text, "Winners" text, ...
how many trains are going to trivandrum ?
CREATE TABLE table_204_78 ( id number, "no." number, "train no." text, "origin" text, "destination" text, "train name" text )
SELECT COUNT("train name") FROM table_204_78 WHERE "destination" = 'trivandrum'
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 trains are going to trivandrum ? ### Input: CREATE TABLE table_204_78 ( id number, "no." number, "train...
How many parties of the time they left office, binning the left office time into Year interval, and then split by the minister's name, I want to display in ascending by the Y.
CREATE TABLE member ( Member_ID int, Member_Name text, Party_ID text, In_office text ) CREATE TABLE region ( Region_ID int, Region_name text, Date text, Label text, Format text, Catalogue text ) CREATE TABLE party ( Party_ID int, Minister text, Took_office text, ...
SELECT Left_office, COUNT(Left_office) FROM party GROUP BY Minister ORDER BY COUNT(Left_office)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many parties of the time they left office, binning the left office time into Year interval, and then split by the minist...
What is the total that had an event of +105 kg and clean & jerk less than 227.5?
CREATE TABLE table_78261 ( "Athlete" text, "Event" text, "Snatch" real, "Clean & Jerk" real, "Total" real )
SELECT COUNT("Total") FROM table_78261 WHERE "Event" = '+105 kg' AND "Clean & Jerk" < '227.5'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total that had an event of +105 kg and clean & jerk less than 227.5? ### Input: CREATE TABLE table_78261 ( "...
Who is moving from Treviso with a loan return?
CREATE TABLE table_name_42 ( name VARCHAR, moving_from VARCHAR, type VARCHAR )
SELECT name FROM table_name_42 WHERE moving_from = "treviso" AND type = "loan return"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is moving from Treviso with a loan return? ### Input: CREATE TABLE table_name_42 ( name VARCHAR, moving_from VAR...
What's the airing date for the show with 62 episodes?
CREATE TABLE table_65811 ( "Airing date" text, "English title (Chinese title)" text, "Number of episodes" real, "Genre" text, "Official website" text )
SELECT "Airing date" FROM table_65811 WHERE "Number of episodes" = '62'
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 airing date for the show with 62 episodes? ### Input: CREATE TABLE table_65811 ( "Airing date" text, "Eng...
What is the cospar ID of the Kosmos 2397 satellite, which has an operational life of 2 months?
CREATE TABLE table_18161217_2 ( cospar_id VARCHAR, estimated_operational_life VARCHAR, satellite VARCHAR )
SELECT cospar_id FROM table_18161217_2 WHERE estimated_operational_life = "2 months" AND satellite = "Kosmos 2397"
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 cospar ID of the Kosmos 2397 satellite, which has an operational life of 2 months? ### Input: CREATE TABLE table...
Which Type has a Name of edson ratinho?
CREATE TABLE table_47406 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text )
SELECT "Type" FROM table_47406 WHERE "Name" = 'edson ratinho'
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 Type has a Name of edson ratinho? ### Input: CREATE TABLE table_47406 ( "Nat." text, "Name" text, "Moving ...
Which parts have more than 2 faults? Show the part name and id in a bar chart, show by the y axis from low to high.
CREATE TABLE Assets ( asset_id INTEGER, maintenance_contract_id INTEGER, supplier_company_id INTEGER, asset_details VARCHAR(255), asset_make VARCHAR(20), asset_model VARCHAR(20), asset_acquired_date DATETIME, asset_disposed_date DATETIME, other_asset_details VARCHAR(255) ) CREATE TA...
SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id ORDER BY T1.part_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: Which parts have more than 2 faults? Show the part name and id in a bar chart, show by the y axis from low to high. ### Inpu...
Find the name of scientists who are not assigned to any project.
CREATE TABLE scientists ( ssn number, name text ) CREATE TABLE projects ( code text, name text, hours number ) CREATE TABLE assignedto ( scientist number, project text )
SELECT name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM assignedto)
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 of scientists who are not assigned to any project. ### Input: CREATE TABLE scientists ( ssn number, na...
What is the composition with an artist of Henry Purdy, a year smaller than 2002, and a mint more than 1,998?
CREATE TABLE table_54149 ( "Year" real, "Artist" text, "Composition" text, "Mintage" real, "Issue Price" text )
SELECT "Composition" FROM table_54149 WHERE "Year" < '2002' AND "Mintage" > '1,998' AND "Artist" = 'henry purdy'
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 composition with an artist of Henry Purdy, a year smaller than 2002, and a mint more than 1,998? ### Input: CREA...
What is the Took Office Date of the Presidency that Left Office Incumbent?
CREATE TABLE table_name_42 ( took_office INTEGER, left_office VARCHAR )
SELECT SUM(took_office) FROM table_name_42 WHERE left_office = "incumbent"
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 Took Office Date of the Presidency that Left Office Incumbent? ### Input: CREATE TABLE table_name_42 ( took_...
list flights from MINNEAPOLIS to PITTSBURGH on friday
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 airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, ...
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, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 25 AND date_day.month_number = 6 AN...
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: list flights from MINNEAPOLIS to PITTSBURGH on friday ### Input: CREATE TABLE flight_leg ( flight_id int, leg_number...
Which home team played in front of 18,345 people in Adelaide Oval?
CREATE TABLE table_53611 ( "Round" real, "Date" text, "Home Team" text, "Score" text, "Away Team" text, "Crowd" real, "Stadium" text, "Match Details" text )
SELECT "Home Team" FROM table_53611 WHERE "Crowd" > '18,345' AND "Stadium" = 'adelaide oval'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which home team played in front of 18,345 people in Adelaide Oval? ### Input: CREATE TABLE table_53611 ( "Round" real, ...
Which act's album has a name of All That You Can't Leave Behind?
CREATE TABLE table_name_58 ( pop_act VARCHAR, album VARCHAR )
SELECT pop_act FROM table_name_58 WHERE album = "all that you can't leave behind"
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 act's album has a name of All That You Can't Leave Behind? ### Input: CREATE TABLE table_name_58 ( pop_act VARCHAR...
Show the trend about the total average number of attendance at home games change over the years, bin year into year interval, and I want to list by the X in desc please.
CREATE TABLE manager_award_vote ( award_id TEXT, year INTEGER, league_id TEXT, player_id TEXT, points_won INTEGER, points_max INTEGER, votes_first INTEGER ) CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ...
SELECT year, AVG(attendance) FROM home_game GROUP BY year ORDER BY year DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the trend about the total average number of attendance at home games change over the years, bin year into year interval...
What is the rd number where the reg GP is 0 and the pick is 150?
CREATE TABLE table_name_24 ( rd__number VARCHAR, reg_gp VARCHAR, pick__number VARCHAR )
SELECT COUNT(rd__number) FROM table_name_24 WHERE reg_gp = 0 AND pick__number = 150
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 rd number where the reg GP is 0 and the pick is 150? ### Input: CREATE TABLE table_name_24 ( rd__number VARC...
Which Score has a Set 1 of 25 16?
CREATE TABLE table_44506 ( "Date" text, "Time" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text )
SELECT "Score" FROM table_44506 WHERE "Set 1" = '25–16'
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 Score has a Set 1 of 25 16? ### Input: CREATE TABLE table_44506 ( "Date" text, "Time" text, "Score" text, ...
get me the number of white ethnic background patients who were born before the year 2058.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.dob_year < "2058"
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 white ethnic background patients who were born before the year 2058. ### Input: CREATE TABLE procedures...
difficulty of various JS frameworks.
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId nu...
SELECT Tags.TagName FROM Tags AS tags JOIN PostTags AS postTags ON PostTags.TagId = Tags.Id JOIN Posts AS posts ON Posts.Id = PostTags.PostId WHERE Tags.TagName IN ('angularjs', 'angular2', 'vue.js', 'ember.js', 'backbone.js', 'reactjs', 'knockout.js', 'typescript') AND Posts.AcceptedAnswerId IS NULL
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: difficulty of various JS frameworks. ### Input: CREATE TABLE SuggestedEdits ( Id number, PostId number, Creation...
Does the city of moline have stereo?
CREATE TABLE table_27296 ( "Freq" real, "Call" text, "City" text, "Owner" text, "Start" real, "Day Power ( W )" real, "Night Power" real, "Nickname" text, "Format" text, "Stereo" text )
SELECT "Stereo" FROM table_27296 WHERE "City" = 'Moline'
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: Does the city of moline have stereo? ### Input: CREATE TABLE table_27296 ( "Freq" real, "Call" text, "City" text...
If I take PHARMACY 426 , what classes will I be able to take ?
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.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_1.department = 'PHARMACY' AND COURSE_1.num...
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: If I take PHARMACY 426 , what classes will I be able to take ? ### Input: CREATE TABLE course_tags_count ( course_id int...
What music is in the film before 1962?
CREATE TABLE table_55094 ( "Title" text, "Year" real, "Country" text, "Music" text, "Uncut run time" text )
SELECT "Music" FROM table_55094 WHERE "Year" = '1962'
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 music is in the film before 1962? ### Input: CREATE TABLE table_55094 ( "Title" text, "Year" real, "Country...
what is days of hospital stay and diagnoses icd9 code of subject name troy friedman?
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 demographic.days_stay, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Troy Friedman"
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 days of hospital stay and diagnoses icd9 code of subject name troy friedman? ### Input: CREATE TABLE prescriptions (...
What's the target for the brand mylotarg?
CREATE TABLE table_45022 ( "Antibody" text, "Brand name" text, "Approval date" real, "Type" text, "Target" text )
SELECT "Target" FROM table_45022 WHERE "Brand name" = 'mylotarg'
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 target for the brand mylotarg? ### Input: CREATE TABLE table_45022 ( "Antibody" text, "Brand name" text, ...
how much does it cost for nacl 0.9% bolus?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE microlab ( microl...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'nacl 0.9% bolus')
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how much does it cost for nacl 0.9% bolus? ### Input: CREATE TABLE vitalperiodic ( vitalperiodicid number, patientun...
What is the drug type and drug name of METD5?
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 prescriptions.drug_type, prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "METD5"
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 drug type and drug name of METD5? ### Input: CREATE TABLE prescriptions ( subject_id text, hadm_id text,...
Return the codes of the document types that do not have a total access count of over 10000.
CREATE TABLE users ( user_id number, role_code text, user_name text, user_login text, password text ) CREATE TABLE images ( image_id number, image_alt_text text, image_name text, image_url text ) CREATE TABLE document_sections_images ( section_id number, image_id number ) ...
SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return the codes of the document types that do not have a total access count of over 10000. ### Input: CREATE TABLE users ( ...
For those employees who do not work in departments with managers that have ids between 100 and 200, find job_id and employee_id , and visualize them by a bar chart, and display Y-axis in asc order.
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT JOB_ID, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, find job_id and employee...
how many patients are diagnosed with hx surgery to organs nec and base drug type?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx surgery to organs NEC" AND prescriptions.drug_type = "BASE"
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 hx surgery to organs nec and base drug type? ### Input: CREATE TABLE prescriptions ( ...
List the enrollment for each school that does not have 'Catholic' as denomination.
CREATE TABLE school ( school_id number, school text, location text, enrollment number, founded number, denomination text, boys_or_girls text, day_or_boarding text, year_entered_competition number, school_colors text ) CREATE TABLE school_details ( school_id number, nickn...
SELECT enrollment FROM school WHERE denomination <> "Catholic"
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 enrollment for each school that does not have 'Catholic' as denomination. ### Input: CREATE TABLE school ( scho...
What is the location of the game with a 6-11-8 record?
CREATE TABLE table_76866 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real )
SELECT "Location" FROM table_76866 WHERE "Record" = '6-11-8'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the location of the game with a 6-11-8 record? ### Input: CREATE TABLE table_76866 ( "Game" real, "Date" tex...
was there any organism found during the last month in patient 031-15666's first urine, catheter specimen test?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-15666')) AND microlab.culturesite = 'urine, catheter specimen' AND DATETIM...
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: was there any organism found during the last month in patient 031-15666's first urine, catheter specimen test? ### Input: CR...
Name the term ends for bethlehem
CREATE TABLE table_1979619_3 ( term_ends VARCHAR, residence VARCHAR )
SELECT COUNT(term_ends) FROM table_1979619_3 WHERE residence = "Bethlehem"
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 term ends for bethlehem ### Input: CREATE TABLE table_1979619_3 ( term_ends VARCHAR, residence VARCHAR ) ##...
What is the lowest number of episodes for anabel barnston?
CREATE TABLE table_name_35 ( episodes INTEGER, actor VARCHAR )
SELECT MIN(episodes) FROM table_name_35 WHERE actor = "anabel barnston"
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 number of episodes for anabel barnston? ### Input: CREATE TABLE table_name_35 ( episodes INTEGER, ...
Where is the track that opened in 1995?
CREATE TABLE table_17685 ( "Track Name" text, "Location" text, "Length" text, "Seating" real, "Year Opened" real, "Year Acquired [A ]" real )
SELECT "Location" FROM table_17685 WHERE "Year Opened" = '1995'
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 is the track that opened in 1995? ### Input: CREATE TABLE table_17685 ( "Track Name" text, "Location" text, ...
What country has a loan as the type?
CREATE TABLE table_6629 ( "Name" text, "Country" text, "Type" text, "Moving from" text, "Transfer window" text, "Ends" text, "Transfer fee" text, "Source" text )
SELECT "Country" FROM table_6629 WHERE "Type" = 'loan'
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 country has a loan as the type? ### Input: CREATE TABLE table_6629 ( "Name" text, "Country" text, "Type" te...
Which act's album has a name of All That You Can't Leave Behind?
CREATE TABLE table_6723 ( "Year" real, "Male" text, "Female" text, "Band" text, "Album" text, "Pop Act" text, "Lifetime Achievement Award" text )
SELECT "Pop Act" FROM table_6723 WHERE "Album" = 'all that you can''t leave behind'
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 act's album has a name of All That You Can't Leave Behind? ### Input: CREATE TABLE table_6723 ( "Year" real, "...
What was the result of week 13?
CREATE TABLE table_name_38 ( result VARCHAR, week VARCHAR )
SELECT result FROM table_name_38 WHERE week = 13
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 week 13? ### Input: CREATE TABLE table_name_38 ( result VARCHAR, week VARCHAR ) ### Response:...
what's the naturalisation by marriage with regbeingtration of a minor child being 114
CREATE TABLE table_11214212_1 ( naturalisation_by_marriage VARCHAR, registration_of_a_minor_child VARCHAR )
SELECT naturalisation_by_marriage FROM table_11214212_1 WHERE registration_of_a_minor_child = 114
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 naturalisation by marriage with regbeingtration of a minor child being 114 ### Input: CREATE TABLE table_11214212...
what are all the Canadian air dates where the u.s. air date is may 1, 2009
CREATE TABLE table_482 ( "Season #" real, "Series #" real, "Title" text, "Canadian airdate" text, "U.S. airdate" text, "Production code" real )
SELECT "Canadian airdate" FROM table_482 WHERE "U.S. airdate" = 'May 1, 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 are all the Canadian air dates where the u.s. air date is may 1, 2009 ### Input: CREATE TABLE table_482 ( "Season #...
Name the dominant religion for
CREATE TABLE table_2562572_22 ( dominant_religion__2002_ VARCHAR, cyrillic_name_other_names VARCHAR )
SELECT dominant_religion__2002_ FROM table_2562572_22 WHERE cyrillic_name_other_names = "Станишић"
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 dominant religion for ### Input: CREATE TABLE table_2562572_22 ( dominant_religion__2002_ VARCHAR, cyrillic...
Which county has 438 (4%) listed under R. Bacon?
CREATE TABLE table_name_92 ( county VARCHAR, r_bacon VARCHAR )
SELECT county FROM table_name_92 WHERE r_bacon = "438 (4%)"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which county has 438 (4%) listed under R. Bacon? ### Input: CREATE TABLE table_name_92 ( county VARCHAR, r_bacon VAR...
What is John Edwards, when John Kerry is '70%'?
CREATE TABLE table_name_41 ( john_edwards VARCHAR, john_kerry VARCHAR )
SELECT john_edwards FROM table_name_41 WHERE john_kerry = "70%"
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 John Edwards, when John Kerry is '70%'? ### Input: CREATE TABLE table_name_41 ( john_edwards VARCHAR, john_k...
What was the score in the match against Sanaz Marand?
CREATE TABLE table_name_54 ( score VARCHAR, opponent VARCHAR )
SELECT score FROM table_name_54 WHERE opponent = "sanaz marand"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score in the match against Sanaz Marand? ### Input: CREATE TABLE table_name_54 ( score VARCHAR, opponen...
Suggested edits voting compared to final result.
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT p.Id AS Id, p.Id AS "post_link", se.Id AS "suggested_edit_link" FROM SuggestedEdits AS se INNER JOIN SuggestedEditVotes AS sev ON sev.SuggestedEditId = se.Id INNER JOIN Posts AS p ON p.Id = se.PostId WHERE sev.UserId = '##UserId##' AND NOT se.RejectionDate IS NULL AND sev.VoteTypeId = 2
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: Suggested edits voting compared to final result. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsU...
How many picks did the College of USC wind up getting?
CREATE TABLE table_34338 ( "Pick #" real, "Round" text, "Player" text, "Position" text, "College" text )
SELECT COUNT("Pick #") FROM table_34338 WHERE "College" = 'usc'
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 picks did the College of USC wind up getting? ### Input: CREATE TABLE table_34338 ( "Pick #" real, "Round" ...
What is Money ( $ ), when Score is '75-71-72-70=288'?
CREATE TABLE table_name_35 ( money___$__ VARCHAR, score VARCHAR )
SELECT money___$__ FROM table_name_35 WHERE score = 75 - 71 - 72 - 70 = 288
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 Money ( $ ), when Score is '75-71-72-70=288'? ### Input: CREATE TABLE table_name_35 ( money___$__ VARCHAR, s...
Who had a points average with 0 extra points and 0 field goals?
CREATE TABLE table_35972 ( "Player" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
SELECT AVG("Points") FROM table_35972 WHERE "Extra points" = '0' AND "Field goals" > '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: Who had a points average with 0 extra points and 0 field goals? ### Input: CREATE TABLE table_35972 ( "Player" text, ...
what is minimum age of patients whose admission location is phys referral/normal deli and primary disease is bladder cancer/sda?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.diagnosis = "BLADDER CANCER/SDA"
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 minimum age of patients whose admission location is phys referral/normal deli and primary disease is bladder cancer/...
Which team had the attendance of 16,468 and lost?
CREATE TABLE table_69378 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text )
SELECT "Loss" FROM table_69378 WHERE "Attendance" = '16,468'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which team had the attendance of 16,468 and lost? ### Input: CREATE TABLE table_69378 ( "Date" text, "Opponent" text...
Find posts in last 60 days with 'coreclr' in title, body or tags.
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT Posts.Id AS "post_link", Title, Posts.CreationDate, PostTypeId, AnswerCount, Tags, ViewCount, Score, OwnerUserId AS "user_link", DisplayName, LastActivityDate, LastEditDate, ClosedDate, Body FROM Posts, Users WHERE Posts.OwnerUserId = Users.Id AND Posts.CreationDate >= CURRENT_TIMESTAMP() - 60 AND (Title 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: Find posts in last 60 days with 'coreclr' in title, body or tags. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes ( I...
how long was it between losing streak almbum and gnv fla in years .
CREATE TABLE table_203_661 ( id number, "year" number, "single" text, "peak chart positions\nus mod" number, "peak chart positions\nuk" number, "album" text )
SELECT ABS((SELECT "year" FROM table_203_661 WHERE "album" = 'losing streak') - (SELECT "year" FROM table_203_661 WHERE "album" = 'gnv fla'))
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 was it between losing streak almbum and gnv fla in years . ### Input: CREATE TABLE table_203_661 ( id number, ...
Which Skip has a Third of sara carlsson?
CREATE TABLE table_34916 ( "Country" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
SELECT "Skip" FROM table_34916 WHERE "Third" = 'sara carlsson'
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 Skip has a Third of sara carlsson? ### Input: CREATE TABLE table_34916 ( "Country" text, "Skip" text, "Thi...
Which player on the Bulls has a 6 May 1978 birthday?
CREATE TABLE table_name_58 ( player VARCHAR, club_province VARCHAR, date_of_birth__age_ VARCHAR )
SELECT player FROM table_name_58 WHERE club_province = "bulls" AND date_of_birth__age_ = "6 may 1978"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which player on the Bulls has a 6 May 1978 birthday? ### Input: CREATE TABLE table_name_58 ( player VARCHAR, club_pr...
List the competitor ranking with 900 defense points.
CREATE TABLE table_3049 ( "Seed" real, "Rank" real, "Player" text, "Points" real, "Points defending" text, "Points won" real, "New points" real, "Status" text )
SELECT COUNT("Seed") FROM table_3049 WHERE "Points defending" = '900'
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: List the competitor ranking with 900 defense points. ### Input: CREATE TABLE table_3049 ( "Seed" real, "Rank" real, ...
how many gold medals did this country win during these olympics ?
CREATE TABLE table_204_884 ( id number, "medal" text, "name" text, "sport" text, "event" text, "date" text )
SELECT COUNT(*) FROM table_204_884 WHERE "medal" = 'gold'
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 gold medals did this country win during these olympics ? ### Input: CREATE TABLE table_204_884 ( id number, ...
What is the branding for callsign dypv?
CREATE TABLE table_3796 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
SELECT "Branding" FROM table_3796 WHERE "Callsign" = 'DYPV'
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 branding for callsign dypv? ### Input: CREATE TABLE table_3796 ( "Branding" text, "Callsign" text, "...
Which Centre has a Rank of 42?
CREATE TABLE table_name_34 ( centre VARCHAR, rank VARCHAR )
SELECT centre FROM table_name_34 WHERE rank = 42
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 Centre has a Rank of 42? ### Input: CREATE TABLE table_name_34 ( centre VARCHAR, rank VARCHAR ) ### Response: ...
Which Position has a Player of bernard thompson?
CREATE TABLE table_name_64 ( position VARCHAR, player VARCHAR )
SELECT position FROM table_name_64 WHERE player = "bernard thompson"
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 Position has a Player of bernard thompson? ### Input: CREATE TABLE table_name_64 ( position VARCHAR, player VA...
What is the date that 4,286 attended?
CREATE TABLE table_67409 ( "Date" text, "Opponent" text, "Result" text, "Game Site" text, "Attendance" text )
SELECT "Date" FROM table_67409 WHERE "Attendance" = '4,286'
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 date that 4,286 attended? ### Input: CREATE TABLE table_67409 ( "Date" text, "Opponent" text, "Resul...
What is the fewest points for positions with under 12 losses, goals against under 50, goal difference over 11, and under 30 played?
CREATE TABLE table_name_22 ( points INTEGER, played VARCHAR, goal_difference VARCHAR, losses VARCHAR, goals_against VARCHAR )
SELECT MIN(points) FROM table_name_22 WHERE losses < 12 AND goals_against < 50 AND goal_difference > 11 AND played < 30
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 fewest points for positions with under 12 losses, goals against under 50, goal difference over 11, and under 30 ...
Name the incumbent for lost renomination republican hold
CREATE TABLE table_73140 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Incumbent" FROM table_73140 WHERE "Result" = 'Lost renomination Republican hold'
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 incumbent for lost renomination republican hold ### Input: CREATE TABLE table_73140 ( "District" text, "Inc...
when was the last time on this month/26 that patient 10855's heart rate was measured greater than 94.0?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE diagnoses_icd ( ...
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ra...
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: when was the last time on this month/26 that patient 10855's heart rate was measured greater than 94.0? ### Input: CREATE TA...
For those employees who do not work in departments with managers that have ids between 100 and 200, find phone_number and commission_pct , and visualize them by a bar chart, sort bar from high to low order please.
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 PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, find phone_number and co...
How many communes associated with over 10 cantons and an area (Square km) of 1,589?
CREATE TABLE table_57132 ( "Dep." text, "Chief town" text, "Arrondissement" text, "Population (1999)" text, "Area (Square km)" real, "Pop density" real, "Cantons" real, "Communes" real )
SELECT AVG("Communes") FROM table_57132 WHERE "Cantons" > '10' AND "Area (Square km)" = '1,589'
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 communes associated with over 10 cantons and an area (Square km) of 1,589? ### Input: CREATE TABLE table_57132 ( ...
When population is greater than 832,901 and murder and non-negligent manslaughter is 11.6, what is the smallest burglary?
CREATE TABLE table_61066 ( "State" text, "City" text, "Population" real, "Violent Crime" text, "Murder and Non-Negligent Manslaughter" real, "Forcible Rape" text, "Robbery" real, "Aggravated Assault" real, "Property Crime" text, "Burglary" real, "Larceny-Theft" text, "Mot...
SELECT MIN("Burglary") FROM table_61066 WHERE "Population" > '832,901' AND "Murder and Non-Negligent Manslaughter" = '11.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: When population is greater than 832,901 and murder and non-negligent manslaughter is 11.6, what is the smallest burglary? ##...
What is the attendance when the opponent was the Houston Oilers?
CREATE TABLE table_name_47 ( attendance VARCHAR, opponent VARCHAR )
SELECT attendance FROM table_name_47 WHERE opponent = "houston oilers"
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 attendance when the opponent was the Houston Oilers? ### Input: CREATE TABLE table_name_47 ( attendance VARC...
provide the number of patients whose diagnoses short title is subtrochanteric fx-close and drug route is left eye?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Subtrochanteric fx-close" AND prescriptions.route = "LEFT EYE"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses short title is subtrochanteric fx-close and drug route is left eye? ### Input...
provide the number of patients whose death status is 0 and primary disease is aortic insufficiency/re-do sternotomy; aortic valve replacement.
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 WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT "
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose death status is 0 and primary disease is aortic insufficiency/re-do sternotomy; aortic ...
When the Score was 4-10, what was the Attendance?
CREATE TABLE table_name_13 ( attendance VARCHAR, score VARCHAR )
SELECT attendance FROM table_name_13 WHERE score = "4-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: When the Score was 4-10, what was the Attendance? ### Input: CREATE TABLE table_name_13 ( attendance VARCHAR, score ...
What is the score for game 5?
CREATE TABLE table_33885 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Series" text )
SELECT "Score" FROM table_33885 WHERE "Game" = '5'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the score for game 5? ### Input: CREATE TABLE table_33885 ( "Game" real, "Date" text, "Opponent" text, ...
Name the opponent for 1996 at the mt smart stadium venue
CREATE TABLE table_71159 ( "Margin" real, "Score" text, "Opponent" text, "Venue" text, "Year" real )
SELECT "Opponent" FROM table_71159 WHERE "Venue" = 'mt smart stadium' AND "Year" = '1996'
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 opponent for 1996 at the mt smart stadium venue ### Input: CREATE TABLE table_71159 ( "Margin" real, "Score...
Which series with a total of 27 albums did Dargaud edit?
CREATE TABLE table_52044 ( "Series" text, "Years" text, "Magazine" text, "Albums" text, "Editor" text )
SELECT "Series" FROM table_52044 WHERE "Editor" = 'dargaud' AND "Albums" = '27'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which series with a total of 27 albums did Dargaud edit? ### Input: CREATE TABLE table_52044 ( "Series" text, "Years...
Which year had a publication of Pazz & Jop?
CREATE TABLE table_name_99 ( year VARCHAR, publication VARCHAR )
SELECT year FROM table_name_99 WHERE publication = "pazz & jop"
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 year had a publication of Pazz & Jop? ### Input: CREATE TABLE table_name_99 ( year VARCHAR, publication VARCHA...
What are the positions with both players having more than 20 points and less than 10 points.
CREATE TABLE player ( POSITION VARCHAR, Points INTEGER )
SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 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 are the positions with both players having more than 20 points and less than 10 points. ### Input: CREATE TABLE player ...
Are there any 400 -level courses in the Fall or Winter term that I can take ?
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE ta ( campus_job_id int, student_id int...
SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE ((SEM...
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: Are there any 400 -level courses in the Fall or Winter term that I can take ? ### Input: CREATE TABLE semester ( semeste...
Give me a bar chart for sum price of each name, and order y-axis in desc order.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT Name, SUM(Price) FROM Products GROUP BY Name ORDER BY SUM(Price) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a bar chart for sum price of each name, and order y-axis in desc order. ### Input: CREATE TABLE Manufacturers ( ...
Give me a bar chart for mean tonnage of each type, show by the Y in asc.
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 Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a bar chart for mean tonnage of each type, show by the Y in asc. ### Input: CREATE TABLE ship ( Ship_ID int, ...
how old is the patient josette orr?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.age FROM demographic WHERE demographic.name = "Josette Orr"
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 old is the patient josette orr? ### Input: CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code...
what is discharge location of subject name kelly gallardo?
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 demographic.discharge_location FROM demographic WHERE demographic.name = "Kelly Gallardo"
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 discharge location of subject name kelly gallardo? ### Input: CREATE TABLE prescriptions ( subject_id text, ...
how patient 8991 was admitted to hospital in the previous year for the last time?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_...
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 8991 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 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: how patient 8991 was admitted to hospital in the previous year for the last time? ### Input: CREATE TABLE diagnoses_icd ( ...
How many degrees were conferred in 'San Jose State University' in 2000?
CREATE TABLE degrees ( Id VARCHAR ) CREATE TABLE campuses ( Id VARCHAR )
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.Id = t2.campus WHERE t1.campus = "San Jose State University" AND t2.year = 2000
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 degrees were conferred in 'San Jose State University' in 2000? ### Input: CREATE TABLE degrees ( Id VARCHAR ) ...
Draw a bar chart of investor versus the total number, and could you list bars from high to low order?
CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text )
SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor ORDER BY Investor 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: Draw a bar chart of investor versus the total number, and could you list bars from high to low order? ### Input: CREATE TABL...
What was the Match Report for the Euro2008q at the Athens Olympic Stadium on November 17, 2007?
CREATE TABLE table_67793 ( "Date" text, "Venue" text, "Score" text, "Competition" text, "Match report" text )
SELECT "Match report" FROM table_67793 WHERE "Competition" = 'euro2008q' AND "Venue" = 'athens olympic stadium' AND "Date" = 'november 17, 2007'
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 Match Report for the Euro2008q at the Athens Olympic Stadium on November 17, 2007? ### Input: CREATE TABLE tabl...
What is the first prize amount of the person who has a score of 207 (-9) and a purse amount of more than 800,000?
CREATE TABLE table_58122 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real )
SELECT COUNT("1st Prize( $ )") FROM table_58122 WHERE "Score" = '207 (-9)' AND "Purse( $ )" > '800,000'
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 first prize amount of the person who has a score of 207 (-9) and a purse amount of more than 800,000? ### Input:...
Which 2nd (m) has a 1st (m) of 120.5 and Points smaller than 249.9?
CREATE TABLE table_34894 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" real, "2nd (m)" real, "Points" real, "Overall WC points (Rank)" text )
SELECT AVG("2nd (m)") FROM table_34894 WHERE "1st (m)" = '120.5' AND "Points" < '249.9'
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 2nd (m) has a 1st (m) of 120.5 and Points smaller than 249.9? ### Input: CREATE TABLE table_34894 ( "Rank" real, ...
Who was the host that garnered ratings of 9.6/26?
CREATE TABLE table_52444 ( "Year" real, "Network" text, "Lap-by-lap" text, "Color commentator(s)" text, "Pit reporters" text, "Host" text, "Ratings" text, "Viewers" text )
SELECT "Host" FROM table_52444 WHERE "Ratings" = '9.6/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: Who was the host that garnered ratings of 9.6/26? ### Input: CREATE TABLE table_52444 ( "Year" real, "Network" text,...
What was the score for the Perth Wildcats as away team?
CREATE TABLE table_9338 ( "Date" text, "Home team" text, "Score" text, "Away team" text, "Venue" text, "Box Score" text, "Report" text )
SELECT "Score" FROM table_9338 WHERE "Away team" = 'perth wildcats'
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 for the Perth Wildcats as away team? ### Input: CREATE TABLE table_9338 ( "Date" text, "Home team...
which language does patient jonathan wiggins speak?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT demographic.language FROM demographic WHERE demographic.name = "Jonathan Wiggins"
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: which language does patient jonathan wiggins speak? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, ...
What is the earliest week with an opponent of cincinnati bengals?
CREATE TABLE table_name_15 ( week INTEGER, opponent VARCHAR )
SELECT MIN(week) FROM table_name_15 WHERE opponent = "cincinnati bengals"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the earliest week with an opponent of cincinnati bengals? ### Input: CREATE TABLE table_name_15 ( week INTEGER, ...
What is the score of the game against the baltimore bullets on March 14?
CREATE TABLE table_49542 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text )
SELECT "Score" FROM table_49542 WHERE "Opponent" = 'baltimore bullets' AND "Date" = 'march 14'
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 score of the game against the baltimore bullets on March 14? ### Input: CREATE TABLE table_49542 ( "Date" te...
what is the daily maximum value of patient 59473's base excess 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_icd_procedures ( row_id number, icd9_code text, s...
SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 59473) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'base excess') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(),...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the daily maximum value of patient 59473's base excess since 6 years ago? ### Input: CREATE TABLE icustays ( row...
Which episode aired on august19,2012?
CREATE TABLE table_2284 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (in millions)" text )
SELECT "Title" FROM table_2284 WHERE "Original air date" = 'August19,2012'
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 episode aired on august19,2012? ### Input: CREATE TABLE table_2284 ( "Series #" real, "Season #" real, "Ti...
What set 2 has a total of 97 74?
CREATE TABLE table_name_85 ( set_2 VARCHAR, total VARCHAR )
SELECT set_2 FROM table_name_85 WHERE total = "97–74"
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 set 2 has a total of 97 74? ### Input: CREATE TABLE table_name_85 ( set_2 VARCHAR, total VARCHAR ) ### Response...
What is the length of the film with Burleigh Sullivan as the character?
CREATE TABLE table_name_30 ( length VARCHAR, character_name VARCHAR )
SELECT length FROM table_name_30 WHERE character_name = "burleigh sullivan"
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 length of the film with Burleigh Sullivan as the character? ### Input: CREATE TABLE table_name_30 ( length V...
how many hours have elapsed since the first time that patient 030-52327 had a continuous infusion meds intake on the current intensive care unit visit?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time )...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many hours have elapsed since the first time that patient 030-52327 had a continuous infusion meds intake on the current...
What is Place, when Weapon is '35mm fire', and when Date is '27 May 1982'?
CREATE TABLE table_name_15 ( place VARCHAR, weapon VARCHAR, date VARCHAR )
SELECT place FROM table_name_15 WHERE weapon = "35mm fire" AND date = "27 may 1982"
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 Place, when Weapon is '35mm fire', and when Date is '27 May 1982'? ### Input: CREATE TABLE table_name_15 ( place...
had patient 006-35134 in this year been admitted to an er?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '006-35134' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 006-35134 in this year been admitted to an er? ### Input: CREATE TABLE vitalperiodic ( vitalperiodicid numbe...