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's the agency of the member born on 1998.11.09?
CREATE TABLE table_name_32 ( agency VARCHAR, birthday VARCHAR )
SELECT agency FROM table_name_32 WHERE birthday = "1998.11.09"
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 agency of the member born on 1998.11.09? ### Input: CREATE TABLE table_name_32 ( agency VARCHAR, birthday...
What is the sum of losses when wins is more than 6, club is camperdown and against is more than 1238?
CREATE TABLE table_name_6 ( losses INTEGER, against VARCHAR, wins VARCHAR, club VARCHAR )
SELECT SUM(losses) FROM table_name_6 WHERE wins > 6 AND club = "camperdown" AND against > 1238
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 losses when wins is more than 6, club is camperdown and against is more than 1238? ### Input: CREATE TABL...
Who were all the pictorials when the centerfold model was Rebekka Armstrong?
CREATE TABLE table_1566848_7 ( pictorials VARCHAR, centerfold_model VARCHAR )
SELECT COUNT(pictorials) FROM table_1566848_7 WHERE centerfold_model = "Rebekka Armstrong"
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 were all the pictorials when the centerfold model was Rebekka Armstrong? ### Input: CREATE TABLE table_1566848_7 ( p...
Name the period for south korea with peak position of #1
CREATE TABLE table_name_90 ( period VARCHAR, country VARCHAR, peak_position VARCHAR )
SELECT period FROM table_name_90 WHERE country = "south korea" AND peak_position = "#1"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the period for south korea with peak position of #1 ### Input: CREATE TABLE table_name_90 ( period VARCHAR, cou...
What Week 4 has a Week 2 of samantha speer?
CREATE TABLE table_12982 ( "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text )
SELECT "Week 4" FROM table_12982 WHERE "Week 2" = 'samantha speer'
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 Week 4 has a Week 2 of samantha speer? ### Input: CREATE TABLE table_12982 ( "Week 1" text, "Week 2" text, ...
EECS 487 and EECS 521 , which one is easier ?
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 487 OR course.number = 521) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: EECS 487 and EECS 521 , which one is easier ? ### Input: CREATE TABLE student ( student_id int, lastname varchar, ...
which Copa Libertadores 1996 has round 1 Supercopa 1995 and argentinos juniors team ?
CREATE TABLE table_38605 ( "Team" text, "Recopa 1995" text, "Supercopa 1995" text, "CONMEBOL 1995" text, "Copa Libertadores 1996" text )
SELECT "Copa Libertadores 1996" FROM table_38605 WHERE "Supercopa 1995" = 'round 1' AND "Team" = 'argentinos juniors'
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 Copa Libertadores 1996 has round 1 Supercopa 1995 and argentinos juniors team ? ### Input: CREATE TABLE table_38605 ( ...
Name the date for visiting team of denver broncos
CREATE TABLE table_67107 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
SELECT "Date" FROM table_67107 WHERE "Visiting Team" = 'denver broncos'
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 date for visiting team of denver broncos ### Input: CREATE TABLE table_67107 ( "Date" text, "Visiting Team"...
What was the game number of the game played against Charlotte?
CREATE TABLE table_7818 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Game") FROM table_7818 WHERE "Team" = 'charlotte'
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 game number of the game played against Charlotte? ### Input: CREATE TABLE table_7818 ( "Game" real, "Da...
Compare the total number of different job titles for all those jobs in department 80 using a bar chart.
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_TITLE, COUNT(JOB_TITLE) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID WHERE T1.DEPARTMENT_ID = 80 GROUP BY JOB_TITLE
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: Compare the total number of different job titles for all those jobs in department 80 using a bar chart. ### Input: CREATE TA...
What was Fuzzy Zoeller's score in the United States?
CREATE TABLE table_9624 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT "Score" FROM table_9624 WHERE "Country" = 'united states' AND "Player" = 'fuzzy zoeller'
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 Fuzzy Zoeller's score in the United States? ### Input: CREATE TABLE table_9624 ( "Place" text, "Player" tex...
what is the number of live action american superhero movies released in 1978 ?
CREATE TABLE table_203_79 ( id number, "year" number, "film" text, "publisher" text, "director" text, "distributor" text, "worldwide gross" text, "notes" text )
SELECT COUNT("film") FROM table_203_79 WHERE "year" = 1978
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of live action american superhero movies released in 1978 ? ### Input: CREATE TABLE table_203_79 ( id...
what are the four most common medicines that patients were prescribed during the same month after they were prescribed rufinamide until 2101?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod tim...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'rufinamide' AND STRFTIME('%y', prescriptions.startdate) <= '2101'...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the four most common medicines that patients were prescribed during the same month after they were prescribed rufin...
name the total number of timeslot for number 1
CREATE TABLE table_19834691_4 ( timeslot VARCHAR, _number VARCHAR )
SELECT COUNT(timeslot) FROM table_19834691_4 WHERE _number = 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: name the total number of timeslot for number 1 ### Input: CREATE TABLE table_19834691_4 ( timeslot VARCHAR, _number ...
What is the low bronze total for the team with 4 total and under 1 gold?
CREATE TABLE table_name_66 ( bronze INTEGER, total VARCHAR, gold VARCHAR )
SELECT MIN(bronze) FROM table_name_66 WHERE total = 4 AND gold < 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the low bronze total for the team with 4 total and under 1 gold? ### Input: CREATE TABLE table_name_66 ( bronze ...
Bar chart of minimal salary from each dept name, order dept_name in ascending order please.
CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE student ( ID varchar(5), name varchar(20), dept_name varchar(20), tot_cred numeric(3,0) ) CRE...
SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY dept_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: Bar chart of minimal salary from each dept name, order dept_name in ascending order please. ### Input: CREATE TABLE instruct...
What was the B segmint for Netlix S03E01?
CREATE TABLE table_35545 ( "Series Ep." text, "Episode" real, "Netflix" text, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
SELECT "Segment B" FROM table_35545 WHERE "Netflix" = 's03e01'
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 B segmint for Netlix S03E01? ### Input: CREATE TABLE table_35545 ( "Series Ep." text, "Episode" real, ...
in ATLANTA i would like information on ground transportation
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_re...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'ATLANTA' AND ground_service.city_code = city.city_code
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: in ATLANTA i would like information on ground transportation ### Input: CREATE TABLE flight_leg ( flight_id int, leg...
GENERATE HTML PAGE SHOWING (mostly) ANIMATED GIFS posted in specified # of days. Creates HTML to paste into blank .html file showing .GIF images (mostly animated GIFs) linked to Q&A posts within 'the past number of days specified'. Looks for the first occurrence of `.gif` in the post body and searches backwards for `ht...
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT SUBSTRING(Body, CHARINDEX(@stEnd, Body) + LEN(@stStart) - (CHARINDEX(REVERSE(@stStart), REVERSE(LEFT(Body, CHARINDEX(@stEnd, Body) + LEN(@stStart) - 1))) + LEN(@stStart) - 1), CHARINDEX(REVERSE(@stStart), REVERSE(LEFT(Body, CHARINDEX(@stEnd, Body) + LEN(@stStart) - 1))) + LEN(@stStart) - 1) AS "gif_url", CASE WH...
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: GENERATE HTML PAGE SHOWING (mostly) ANIMATED GIFS posted in specified # of days. Creates HTML to paste into blank .html file...
Who was the arranger of ' '?
CREATE TABLE table_76990 ( "Title" text, "Lyricist(s)" text, "Composer(s)" text, "Arranger(s)" text, "Length" text )
SELECT "Arranger(s)" FROM table_76990 WHERE "Title" = 'ขอโทษ'
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 arranger of ' '? ### Input: CREATE TABLE table_76990 ( "Title" text, "Lyricist(s)" text, "Composer(s...
Which highest number of Seats has votes of 244,867?
CREATE TABLE table_52371 ( "Party" text, "Leader" text, "Votes" real, "Percentage" text, "Seats" real )
SELECT MAX("Seats") FROM table_52371 WHERE "Votes" = '244,867'
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 highest number of Seats has votes of 244,867? ### Input: CREATE TABLE table_52371 ( "Party" text, "Leader" tex...
When did the peterborough phantoms play at a venue of home?
CREATE TABLE table_62049 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Competition" text )
SELECT "Date" FROM table_62049 WHERE "Venue" = 'home' AND "Opponent" = 'peterborough phantoms'
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 did the peterborough phantoms play at a venue of home? ### Input: CREATE TABLE table_62049 ( "Date" text, "Oppo...
How many rooms does each block floor have?
CREATE TABLE patient ( ssn number, name text, address text, phone text, insuranceid number, pcp number ) CREATE TABLE medication ( code number, name text, brand text, description text ) CREATE TABLE prescribes ( physician number, patient number, medication number, ...
SELECT COUNT(*), T1.blockfloor FROM block AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many rooms does each block floor have? ### Input: CREATE TABLE patient ( ssn number, name text, address text...
When is 511 offered next semester ?
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_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When is 511 offered next semester ? ### Input: CREATE TABLE course_tags_count ( course_id int, clear_grading int, ...
What name ran for the Prohibition ticket when the Progressive ticket was Eugene M. Travis?
CREATE TABLE table_name_14 ( prohibition_ticket VARCHAR, progressive_ticket VARCHAR )
SELECT prohibition_ticket FROM table_name_14 WHERE progressive_ticket = "eugene m. travis"
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 name ran for the Prohibition ticket when the Progressive ticket was Eugene M. Travis? ### Input: CREATE TABLE table_nam...
Which Proto-Oceanic has a Proto-Polynesian of *lima?
CREATE TABLE table_name_48 ( proto_oceanic VARCHAR, proto_polynesian VARCHAR )
SELECT proto_oceanic FROM table_name_48 WHERE proto_polynesian = "*lima"
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 Proto-Oceanic has a Proto-Polynesian of *lima? ### Input: CREATE TABLE table_name_48 ( proto_oceanic VARCHAR, ...
What is the average number of drawn with a difference of 17 and 22 points?
CREATE TABLE table_41538 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT AVG("Drawn") FROM table_41538 WHERE "Difference" = '17' AND "Points" = '22'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average number of drawn with a difference of 17 and 22 points? ### Input: CREATE TABLE table_41538 ( "Positi...
what is patient 015-7988's first diagnosis until 4 years ago?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, ...
SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-7988')) AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CUR...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is patient 015-7988's first diagnosis until 4 years ago? ### Input: CREATE TABLE intakeoutput ( intakeoutputid numb...
Which Species Specific has a Comparative of no, and an Intra-molecular structure of no, and a Link of sourcecode?
CREATE TABLE table_36079 ( "Name" text, "Species Specific" text, "Intra-molecular structure" text, "Comparative" text, "Link" text )
SELECT "Species Specific" FROM table_36079 WHERE "Comparative" = 'no' AND "Intra-molecular structure" = 'no' AND "Link" = 'sourcecode'
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 Species Specific has a Comparative of no, and an Intra-molecular structure of no, and a Link of sourcecode? ### Input:...
What is the lowest overall with more than 17 rounds?
CREATE TABLE table_70973 ( "Round" real, "Overall" real, "Player" text, "Position" text, "College" text )
SELECT MIN("Overall") FROM table_70973 WHERE "Round" > '17'
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 lowest overall with more than 17 rounds? ### Input: CREATE TABLE table_70973 ( "Round" real, "Overall" r...
what is the marital status of patient 19894 in their first hospital encounter.
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, ...
SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 19894 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the marital status of patient 19894 in their first hospital encounter. ### Input: CREATE TABLE procedures_icd ( ...
when did patient 92788 get white blood cells lab test for the last time during their current hospital visit?
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) 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, lan...
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'white blood cells') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92788 AND admissions.dischtime IS NULL) ORDER BY labevents.chartti...
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 did patient 92788 get white blood cells lab test for the last time during their current hospital visit? ### Input: CREA...
What are the number of the names of all the Japanese constructors that have earned more than 5 points?, display in ascending by the x-axis please.
CREATE TABLE drivers ( driverId INTEGER, driverRef TEXT, number TEXT, code TEXT, forename TEXT, surname TEXT, dob TEXT, nationality TEXT, url TEXT ) CREATE TABLE pitStops ( raceId INTEGER, driverId INTEGER, stop INTEGER, lap INTEGER, time TEXT, duration TEXT,...
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 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?, display in ascending...
What is the first class team of the player born on 23 February 1973?
CREATE TABLE table_name_70 ( first_class_team VARCHAR, date_of_birth VARCHAR )
SELECT first_class_team FROM table_name_70 WHERE date_of_birth = "23 february 1973"
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 first class team of the player born on 23 February 1973? ### Input: CREATE TABLE table_name_70 ( first_class...
what is the difference in kw between naga and bacolod radio ?
CREATE TABLE table_204_164 ( id number, "branding" text, "callsign" text, "frequency" text, "power (kw)" text, "location" text )
SELECT ABS((SELECT "power (kw)" FROM table_204_164 WHERE "location" = 'naga') - (SELECT "power (kw)" FROM table_204_164 WHERE "location" = 'bacolod'))
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the difference in kw between naga and bacolod radio ? ### Input: CREATE TABLE table_204_164 ( id number, "br...
For those products with a price between 60 and 120, give me the comparison about manufacturer over the name , and rank x axis from low to high order.
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 Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY 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: For those products with a price between 60 and 120, give me the comparison about manufacturer over the name , and rank x axi...
WHAT IS THE AVERAGE WEEK WITH A DATE OF JULY 25?
CREATE TABLE table_name_5 ( week INTEGER, date VARCHAR )
SELECT AVG(week) FROM table_name_5 WHERE date = "july 25"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT IS THE AVERAGE WEEK WITH A DATE OF JULY 25? ### Input: CREATE TABLE table_name_5 ( week INTEGER, date VARCHAR )...
Who won Women's doubles when Zen Yaqiong won Women's singles?
CREATE TABLE table_71772 ( "Year" real, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text )
SELECT "Women's doubles" FROM table_71772 WHERE "Women's singles" = 'zen yaqiong'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who won Women's doubles when Zen Yaqiong won Women's singles? ### Input: CREATE TABLE table_71772 ( "Year" real, "Me...
has patient 013-29856 received any diagnoses on the last hospital encounter?
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 COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-29856' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.ho...
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: has patient 013-29856 received any diagnoses on the last hospital encounter? ### Input: CREATE TABLE vitalperiodic ( vit...
Give me the comparison about the average of School_ID over the All_Home , and group by attribute All_Home by a bar chart, I want to display by the x axis from low to high.
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY All_Home
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the comparison about the average of School_ID over the All_Home , and group by attribute All_Home by a bar chart, I ...
Who had a score of 77-69-70-71=287?
CREATE TABLE table_name_91 ( player VARCHAR, score VARCHAR )
SELECT player FROM table_name_91 WHERE score = 77 - 69 - 70 - 71 = 287
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who had a score of 77-69-70-71=287? ### Input: CREATE TABLE table_name_91 ( player VARCHAR, score VARCHAR ) ### Resp...
How tall is the Street address of 07.0 200 east washington street?
CREATE TABLE table_name_10 ( height_ft___m__ VARCHAR, street_address VARCHAR )
SELECT height_ft___m__ FROM table_name_10 WHERE street_address = "07.0 200 east washington street"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How tall is the Street address of 07.0 200 east washington street? ### Input: CREATE TABLE table_name_10 ( height_ft___m...
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about salary over the job_id , rank by the Y-axis in ascending.
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 JOB_ID, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY
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, give me the comparison a...
Which teachers teach in classroom 109? Give me their last names.
CREATE TABLE teachers ( lastname text, firstname text, classroom number ) CREATE TABLE list ( lastname text, firstname text, grade number, classroom number )
SELECT lastname FROM teachers WHERE classroom = 109
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which teachers teach in classroom 109? Give me their last names. ### Input: CREATE TABLE teachers ( lastname text, f...
what is marital status and diagnoses short title of subject id 42067?
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.marital_status, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "42067"
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 marital status and diagnoses short title of subject id 42067? ### Input: CREATE TABLE prescriptions ( subject_id...
i need a flight from OAKLAND to SALT LAKE CITY on wednesday departing after 1800
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE month ( month_number int, ...
SELECT DISTINCT flight_id FROM flight WHERE (((departure_time > 1800 AND flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 23 AND DATE_DAYalias0.month_number = 4 AND DATE_DAYa...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i need a flight from OAKLAND to SALT LAKE CITY on wednesday departing after 1800 ### Input: CREATE TABLE fare_basis ( fa...
What is the official target date for the Swedish Krona?
CREATE TABLE table_70218 ( "Currency" text, "Code" text, "Entry ERM II" text, "Central rate" text, "Official target date" text )
SELECT "Official target date" FROM table_70218 WHERE "Currency" = 'swedish krona'
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 official target date for the Swedish Krona? ### Input: CREATE TABLE table_70218 ( "Currency" text, "Code...
Where was the location for Arras Paul Arras?
CREATE TABLE table_7194 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Location" text )
SELECT "Location" FROM table_7194 WHERE "Opponent" = 'arras paul arras'
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 was the location for Arras Paul Arras? ### Input: CREATE TABLE table_7194 ( "Res." text, "Record" text, "O...
What was the record on March 22?
CREATE TABLE table_51373 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Record" FROM table_51373 WHERE "Date" = 'march 22'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the record on March 22? ### Input: CREATE TABLE table_51373 ( "Date" text, "Visitor" text, "Score" text...
how many patients died in or befor 2186 with diagnosis icd9 code 42613?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2186.0" AND diagnoses.icd9_code = "42613"
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 died in or befor 2186 with diagnosis icd9 code 42613? ### Input: CREATE TABLE procedures ( subject_id ...
Which Name has a League Cup Goals of 0, and League Apps of 1?
CREATE TABLE table_name_75 ( name VARCHAR, league_cup_goals VARCHAR, league_apps VARCHAR )
SELECT name FROM table_name_75 WHERE league_cup_goals = 0 AND league_apps = "1"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Name has a League Cup Goals of 0, and League Apps of 1? ### Input: CREATE TABLE table_name_75 ( name VARCHAR, ...
on this month/21, was arterial bp [diastolic] of patient 10855 ever less than 61.0?
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number,...
SELECT COUNT(*) > 0 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 = 'arterial bp [dias...
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: on this month/21, was arterial bp [diastolic] of patient 10855 ever less than 61.0? ### Input: CREATE TABLE procedures_icd (...
what was the first time that patient 025-64321 had the maximum sao2 since 08/21/2102?
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 vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-64321')) AND NOT vitalperiodic.sao2 IS NULL AND...
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 first time that patient 025-64321 had the maximum sao2 since 08/21/2102? ### Input: CREATE TABLE treatment ( ...
When was the song by Andy Gibb issued?
CREATE TABLE table_39490 ( "Volume:Issue" text, "Issue Date(s)" text, "Weeks on Top" real, "Song" text, "Artist" text )
SELECT "Issue Date(s)" FROM table_39490 WHERE "Artist" = 'andy gibb'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the song by Andy Gibb issued? ### Input: CREATE TABLE table_39490 ( "Volume:Issue" text, "Issue Date(s)" te...
give me the number of patients whose insurance is medicaid and procedure icd9 code is 331?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.icd9_code = "331"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose insurance is medicaid and procedure icd9 code is 331? ### Input: CREATE TABLE prescript...
What is every value when Mitchell is 676?
CREATE TABLE table_1818471_1 ( value VARCHAR, mitchell VARCHAR )
SELECT value FROM table_1818471_1 WHERE mitchell = 676
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every value when Mitchell is 676? ### Input: CREATE TABLE table_1818471_1 ( value VARCHAR, mitchell VARCHAR ...
what are the top four most common lab tests until 4 years ago?
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 t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 4
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 four most common lab tests until 4 years ago? ### Input: CREATE TABLE patient ( uniquepid text, pat...
give me the number of patients whose ethnicity is black/cape verdean and primary disease is colangitis?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.diagnosis = "COLANGITIS"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose ethnicity is black/cape verdean and primary disease is colangitis? ### Input: CREATE TA...
When 142900 is the population what is the highest rank?
CREATE TABLE table_25794 ( "Rank" real, "City/Town" text, "County" text, "Region/Province" text, "Population" real, "Country" text )
SELECT MAX("Rank") FROM table_25794 WHERE "Population" = '142900'
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 142900 is the population what is the highest rank? ### Input: CREATE TABLE table_25794 ( "Rank" real, "City/Tow...
With which association did estribillo ii run as Horse 1?
CREATE TABLE table_10578 ( "Year" real, "City" text, "Rider 1" text, "Rider 2" text, "Horse 1" text, "Horse 2" text, "Association" text )
SELECT "Association" FROM table_10578 WHERE "Horse 1" = 'estribillo ii'
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: With which association did estribillo ii run as Horse 1? ### Input: CREATE TABLE table_10578 ( "Year" real, "City" t...
how many latitudes have 0.081 (sqmi) of water?
CREATE TABLE table_22459 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" text, "Water (sqmi)" text, "Latitude" text, "Longitude" text, "GEO ID" real, "ANSI code" real )
SELECT COUNT("Latitude") FROM table_22459 WHERE "Water (sqmi)" = '0.081'
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 latitudes have 0.081 (sqmi) of water? ### Input: CREATE TABLE table_22459 ( "Township" text, "County" text,...
What is the amount of trees, that require replacement when district is leninsky?
CREATE TABLE table_72090 ( "District" text, "Total amount of trees" real, "Prevailing types, %" text, "Amount of old trees" text, "Amount of trees, that require replacement" text )
SELECT "Amount of trees, that require replacement" FROM table_72090 WHERE "District" = 'Leninsky'
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 amount of trees, that require replacement when district is leninsky? ### Input: CREATE TABLE table_72090 ( "...
please give me flights from ATLANTA to BOSTON on wednesday afternoon and thursday morning
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE month ( ...
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 ((((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_na...
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: please give me flights from ATLANTA to BOSTON on wednesday afternoon and thursday morning ### Input: CREATE TABLE flight_sto...
what are the numbers of patients who have had a diuretic - spironolactone two or more times?
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, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'diuretic - spironolactone') GROUP BY patient.uniquepid) AS t1 WHERE t1.c1 >= 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: what are the numbers of patients who have had a diuretic - spironolactone two or more times? ### Input: CREATE TABLE patient...
what television service are in the united kingdom and n is greater than 854.0?
CREATE TABLE table_15887683_15 ( television_service VARCHAR, country VARCHAR, n° VARCHAR )
SELECT television_service FROM table_15887683_15 WHERE country = "United Kingdom" AND n° > 854.0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what television service are in the united kingdom and n is greater than 854.0? ### Input: CREATE TABLE table_15887683_15 ( ...
what kinds of ground transportation is available in DALLAS FORT WORTH
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE restriction ( restriction_code text, ...
SELECT DISTINCT ground_service.transport_type FROM city AS CITY_0, city AS CITY_1, ground_service WHERE (ground_service.city_code = CITY_0.city_code AND CITY_0.city_name = 'DALLAS') OR (ground_service.city_code = CITY_1.city_code AND CITY_1.city_name = 'FORT WORTH')
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: what kinds of ground transportation is available in DALLAS FORT WORTH ### Input: CREATE TABLE dual_carrier ( main_airlin...
How many people are women's singles in the season of 2000/01?
CREATE TABLE table_30407 ( "Season" text, "Host" text, "Mens Singles" text, "Womens Singles" text, "Mens Doubles" text, "Womens Doubles" text )
SELECT COUNT("Womens Singles") FROM table_30407 WHERE "Season" = '2000/01'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many people are women's singles in the season of 2000/01? ### Input: CREATE TABLE table_30407 ( "Season" text, "...
Who was in 4th when in 6th is Air Traffic?
CREATE TABLE table_72843 ( "Poll Year" text, "Winner" text, "Second" text, "Third" text, "Fourth" text, "Fifth" text, "Sixth" text, "Seventh" text, "Eighth" text, "Ninth" text, "Tenth" text )
SELECT "Fourth" FROM table_72843 WHERE "Sixth" = 'Air Traffic'
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 in 4th when in 6th is Air Traffic? ### Input: CREATE TABLE table_72843 ( "Poll Year" text, "Winner" text, ...
Which Share has a weekly Rank of 8 and is dated 15 June?
CREATE TABLE table_59559 ( "Show" text, "Date" text, "Official ratings (millions)" real, "Weekly rank" text, "Share" text )
SELECT "Share" FROM table_59559 WHERE "Weekly rank" = '8' AND "Date" = '15 june'
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 Share has a weekly Rank of 8 and is dated 15 June? ### Input: CREATE TABLE table_59559 ( "Show" text, "Date" t...
our lady of the assumption catholic church started the same year as what church ?
CREATE TABLE table_203_387 ( id number, "parish est" number, "church" text, "city" text, "current bldg begun" number, "weekly collections" text, "notes" number )
SELECT "church" FROM table_203_387 WHERE "church" <> 'our lady of the assumption catholic church' AND "current bldg begun" = (SELECT "current bldg begun" FROM table_203_387 WHERE "church" = 'our lady of the assumption catholic church')
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: our lady of the assumption catholic church started the same year as what church ? ### Input: CREATE TABLE table_203_387 ( ...
how many winnings does jeff gordon have?
CREATE TABLE table_3897 ( "Position" real, "Driver" text, "Points" real, "Winnings" text, "Series" text )
SELECT "Winnings" FROM table_3897 WHERE "Driver" = 'Jeff Gordon'
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 winnings does jeff gordon have? ### Input: CREATE TABLE table_3897 ( "Position" real, "Driver" text, "P...
What is the time/s of team Triumph in those races in which Triumph ranked higher than 4?
CREATE TABLE table_31826 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
SELECT "Time" FROM table_31826 WHERE "Team" = 'triumph' AND "Rank" < '4'
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 time/s of team Triumph in those races in which Triumph ranked higher than 4? ### Input: CREATE TABLE table_31826...
did patient 24268 excreted any of his urine . on the first icu visit?
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 ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( ...
SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24268) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND outputevents.itemid IN (SELECT...
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: did patient 24268 excreted any of his urine . on the first icu visit? ### Input: CREATE TABLE prescriptions ( row_id num...
University of Minnesota of had what Deloria & Boas?
CREATE TABLE table_6745 ( "Buechel & Manhart spelling (pronunciation)" text, "Ullrich" text, "Brandon University" text, "Deloria & Boas" text, "Dakota Mission" text, "Rood & Taylor" text, "Riggs" text, "Williamson" text, "University of Minnesota" text, "White Hat" text )
SELECT "Deloria & Boas" FROM table_6745 WHERE "University of Minnesota" = 'ṭ'
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: University of Minnesota of had what Deloria & Boas? ### Input: CREATE TABLE table_6745 ( "Buechel & Manhart spelling (pr...
What Site had an Attendance of 45,000?
CREATE TABLE table_name_20 ( site VARCHAR, attendance VARCHAR )
SELECT site FROM table_name_20 WHERE attendance = "45,000"
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 Site had an Attendance of 45,000? ### Input: CREATE TABLE table_name_20 ( site VARCHAR, attendance VARCHAR ) ##...
Which celebrity who was famous for being the ex busted member and TV presenter exited on day 19?
CREATE TABLE table_6581 ( "Celebrity" text, "Famous for" text, "Entered" text, "Exited" text, "Finished" text )
SELECT "Celebrity" FROM table_6581 WHERE "Exited" = 'day 19' AND "Famous for" = 'ex busted member and tv presenter'
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 celebrity who was famous for being the ex busted member and TV presenter exited on day 19? ### Input: CREATE TABLE tab...
Answers to Delphi Posts with Accepted Answer and Fav Count>2. Enter Query Description
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TAB...
SELECT * FROM Posts WHERE ParentId IN (SELECT Id FROM Posts WHERE FavoriteCount > 2 AND NOT AcceptedAnswerId IS NULL AND Id IN (SELECT PostId FROM PostTags WHERE TagId IN (SELECT Id FROM Tags WHERE TagName LIKE '%delphi%')))
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: Answers to Delphi Posts with Accepted Answer and Fav Count>2. Enter Query Description ### Input: CREATE TABLE ReviewTaskStat...
give the number of patients whose drug code is posa200l and lab test fluid is urine?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "POSA200L" AND lab.fluid = "Urine"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the number of patients whose drug code is posa200l and lab test fluid is urine? ### Input: CREATE TABLE prescriptions (...
What was the lowest attendance at a week 15 game?
CREATE TABLE table_41737 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT MIN("Attendance") FROM table_41737 WHERE "Week" = '15'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the lowest attendance at a week 15 game? ### Input: CREATE TABLE table_41737 ( "Week" real, "Date" text, ...
On what date did Fleetcenter have a game lower than 9 with a score of 104-94?
CREATE TABLE table_76887 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
SELECT "Date" FROM table_76887 WHERE "Location" = 'fleetcenter' AND "Game" < '9' AND "Score" = '104-94'
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 did Fleetcenter have a game lower than 9 with a score of 104-94? ### Input: CREATE TABLE table_76887 ( "Gam...
Are there certain professors who do not teach any classes with labs ?
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT instructor.name FROM instructor, course, course_offering, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course_offering.offering_id = offering_instructor.offering_id AND instructor.instructor_id = offering_instructor.instructor_id AND NOT instr...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there certain professors who do not teach any classes with labs ? ### Input: CREATE TABLE course ( course_id int, ...
Which Podium has 1 Race and a Final Place of 5th?
CREATE TABLE table_name_11 ( podiums VARCHAR, races VARCHAR, final_placing VARCHAR )
SELECT podiums FROM table_name_11 WHERE races = "1" AND final_placing = "5th"
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 Podium has 1 Race and a Final Place of 5th? ### Input: CREATE TABLE table_name_11 ( podiums VARCHAR, races VAR...
Find the minimum salary for the departments whose average salary is above the average payment of all instructors Plot them as bar chart, display in ascending by the Y-axis.
CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_number varchar(7), ...
SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY MIN(salary)
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 minimum salary for the departments whose average salary is above the average payment of all instructors Plot them a...
What is the average lifespan of a baseball player?
CREATE TABLE salary ( year number, team_id text, league_id text, player_id text, salary number ) CREATE TABLE player ( player_id text, birth_year text, birth_month text, birth_day text, birth_country text, birth_state text, birth_city text, death_year text, death...
SELECT AVG(death_year - birth_year) FROM player
thehistoryofbaseball
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average lifespan of a baseball player? ### Input: CREATE TABLE salary ( year number, team_id text, l...
Which Tournament has a 1984 of 1r?
CREATE TABLE table_34849 ( "Tournament" text, "1981" text, "1982" text, "1983" text, "1984" text, "1985" text, "1986" text, "1987" text, "1988" text, "1989" text )
SELECT "Tournament" FROM table_34849 WHERE "1984" = '1r'
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 Tournament has a 1984 of 1r? ### Input: CREATE TABLE table_34849 ( "Tournament" text, "1981" text, "1982" ...
How many wines are there for each grape, and I want to display by the X in ascending.
CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape
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 wines are there for each grape, and I want to display by the X in ascending. ### Input: CREATE TABLE grapes ( I...
Which Bronze is the lowest one that has a Rank of 3, and a Silver smaller than 2?
CREATE TABLE table_name_7 ( bronze INTEGER, rank VARCHAR, silver VARCHAR )
SELECT MIN(bronze) FROM table_name_7 WHERE rank = "3" AND silver < 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: Which Bronze is the lowest one that has a Rank of 3, and a Silver smaller than 2? ### Input: CREATE TABLE table_name_7 ( ...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of email and manager_id in a bar chart, display by the bar in descending please.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT EMAIL, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri...
provide the number of patients whose primary disease is ruq pain and year of birth is less than 2041?
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 WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.dob_year < "2041"
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 primary disease is ruq pain and year of birth is less than 2041? ### Input: CREATE TABL...
What is the rank of Manuel Cortina Mart nez?
CREATE TABLE table_name_46 ( rank VARCHAR, athletes VARCHAR )
SELECT rank FROM table_name_46 WHERE athletes = "manuel cortina martínez"
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 rank of Manuel Cortina Mart nez? ### Input: CREATE TABLE table_name_46 ( rank VARCHAR, athletes VARCHAR ...
how many patients had a diagnosis short title preterm nec 2000-2499g and ih as the drug route?
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 procedures ( ...
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 = "Preterm NEC 2000-2499g" AND prescriptions.route = "IH"
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 a diagnosis short title preterm nec 2000-2499g and ih as the drug route? ### Input: CREATE TABLE diagn...
Pie. what are the different parties of representative? Show the party name and the number of representatives in each party.
CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real ) CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text )
SELECT Party, COUNT(*) FROM representative GROUP BY Party
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: Pie. what are the different parties of representative? Show the party name and the number of representatives in each party. ...
Which party does the incumbent first elected in 1994 belong to?
CREATE TABLE table_18113 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text )
SELECT "Party" FROM table_18113 WHERE "First elected" = '1994'
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 party does the incumbent first elected in 1994 belong to? ### Input: CREATE TABLE table_18113 ( "District" text, ...
What is the Place that has a Date of 22 august 2004?
CREATE TABLE table_name_92 ( place VARCHAR, date VARCHAR )
SELECT place FROM table_name_92 WHERE date = "22 august 2004"
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 Place that has a Date of 22 august 2004? ### Input: CREATE TABLE table_name_92 ( place VARCHAR, date VAR...
How many campuses exist are in the county of LA?
CREATE TABLE degrees ( year number, campus number, degrees number ) CREATE TABLE faculty ( campus number, year number, faculty number ) CREATE TABLE enrollments ( campus number, year number, totalenrollment_ay number, fte_ay number ) CREATE TABLE discipline_enrollments ( c...
SELECT COUNT(*) FROM campuses WHERE county = "Los Angeles"
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many campuses exist are in the county of LA? ### Input: CREATE TABLE degrees ( year number, campus number, d...
Who was the winner for the Rome to Teramo course?
CREATE TABLE table_name_97 ( winner VARCHAR, course VARCHAR )
SELECT winner FROM table_name_97 WHERE course = "rome to teramo"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the winner for the Rome to Teramo course? ### Input: CREATE TABLE table_name_97 ( winner VARCHAR, course VAR...
How many losses does Central Blues have?
CREATE TABLE table_26200568_16 ( losses INTEGER, club VARCHAR )
SELECT MAX(losses) FROM table_26200568_16 WHERE club = "Central Blues"
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 losses does Central Blues have? ### Input: CREATE TABLE table_26200568_16 ( losses INTEGER, club VARCHAR ) ...
What is the first year of the European Championships competition?
CREATE TABLE table_68767 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text )
SELECT MIN("Year") FROM table_68767 WHERE "Competition" = 'european championships'
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 year of the European Championships competition? ### Input: CREATE TABLE table_68767 ( "Year" real, ...
What is the number of the tax supervising and conservation bill?
CREATE TABLE table_256286_23 ( meas_num INTEGER, description VARCHAR )
SELECT MIN(meas_num) FROM table_256286_23 WHERE description = "Tax Supervising and Conservation Bill"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of the tax supervising and conservation bill? ### Input: CREATE TABLE table_256286_23 ( meas_num INTE...
What Player has more than 1 Touchdowns with 0 Extra Points and less than 50 Points?
CREATE TABLE table_name_61 ( player VARCHAR, points VARCHAR, touchdowns VARCHAR, extra_points VARCHAR )
SELECT player FROM table_name_61 WHERE touchdowns > 1 AND extra_points = 0 AND points < 50
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 Player has more than 1 Touchdowns with 0 Extra Points and less than 50 Points? ### Input: CREATE TABLE table_name_61 ( ...