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 time was the fastest lap during Stoh's 200 in 1982?
CREATE TABLE table_name_74 ( fastest_lap VARCHAR, name VARCHAR )
SELECT fastest_lap FROM table_name_74 WHERE name = "stoh's 200"
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 time was the fastest lap during Stoh's 200 in 1982? ### Input: CREATE TABLE table_name_74 ( fastest_lap VARCHAR, ...
Which date has a Score of 4 6, 2 6?
CREATE TABLE table_55033 ( "Outcome" text, "Date" text, "Surface" text, "Opponent" text, "Score" text )
SELECT "Date" FROM table_55033 WHERE "Score" = '4–6, 2–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: Which date has a Score of 4 6, 2 6? ### Input: CREATE TABLE table_55033 ( "Outcome" text, "Date" text, "Surface"...
how many times does patient 015-20584 produce hemovac #1 since 03/30/2102?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-20584')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.ce...
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 times does patient 015-20584 produce hemovac #1 since 03/30/2102? ### Input: CREATE TABLE cost ( costid number,...
What septembers are 17.1 in December?
CREATE TABLE table_15945862_1 ( december VARCHAR, september VARCHAR )
SELECT december FROM table_15945862_1 WHERE september = "17.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 septembers are 17.1 in December? ### Input: CREATE TABLE table_15945862_1 ( december VARCHAR, september VARCHAR...
What is the date of the game where Collingwood was the home team?
CREATE TABLE table_32563 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_32563 WHERE "Home team" = 'collingwood'
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 of the game where Collingwood was the home team? ### Input: CREATE TABLE table_32563 ( "Home team" text...
Born in 1982, this guard has what listed as a height?
CREATE TABLE table_name_44 ( height VARCHAR, position VARCHAR, year_born VARCHAR )
SELECT height FROM table_name_44 WHERE position = "guard" AND year_born = 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: Born in 1982, this guard has what listed as a height? ### Input: CREATE TABLE table_name_44 ( height VARCHAR, positi...
What date did Josh Taumalolo play at Nuku'alofa?
CREATE TABLE table_name_49 ( date VARCHAR, venue VARCHAR, player VARCHAR )
SELECT date FROM table_name_49 WHERE venue = "nuku'alofa" AND player = "josh taumalolo"
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 date did Josh Taumalolo play at Nuku'alofa? ### Input: CREATE TABLE table_name_49 ( date VARCHAR, venue VARCHAR...
how many titles did walker publish ?
CREATE TABLE table_203_788 ( id number, "year" number, "author" text, "illustrator" text, "title" text, "publisher" text )
SELECT COUNT("title") FROM table_203_788 WHERE "publisher" = 'walker'
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 titles did walker publish ? ### Input: CREATE TABLE table_203_788 ( id number, "year" number, "author" ...
What is the highest goal difference of the club with more than 34 played?
CREATE TABLE table_62138 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
SELECT MAX("Goal Difference") FROM table_62138 WHERE "Played" > '34'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest goal difference of the club with more than 34 played? ### Input: CREATE TABLE table_62138 ( "Positio...
How fast can the SLK200K, with a top speed of 236km/h (147mph), accelerate to 100km/h (62mph)?
CREATE TABLE table_61050 ( "Model" text, "Years" text, "Engine" text, "Power" text, "0\u2013100km/h (62mph)" text, "Top Speed" text )
SELECT "0\u2013100km/h (62mph)" FROM table_61050 WHERE "Model" = 'slk200k' AND "Top Speed" = '236km/h (147mph)'
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 fast can the SLK200K, with a top speed of 236km/h (147mph), accelerate to 100km/h (62mph)? ### Input: CREATE TABLE table...
give me the number of patients whose death status is 0 and drug code is docu100l?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "0" AND prescriptions.formulary_drug_cd = "DOCU100L"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose death status is 0 and drug code is docu100l? ### Input: CREATE TABLE procedures ( s...
Name the role for pick number 17
CREATE TABLE table_26397277_3 ( role_s_ VARCHAR, pick__number VARCHAR )
SELECT role_s_ FROM table_26397277_3 WHERE pick__number = 17
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 role for pick number 17 ### Input: CREATE TABLE table_26397277_3 ( role_s_ VARCHAR, pick__number VARCHAR ) ...
which year had the most competitions ?
CREATE TABLE table_204_395 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT "year" FROM table_204_395 GROUP BY "year" ORDER BY COUNT("competition") DESC LIMIT 1
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which year had the most competitions ? ### Input: CREATE TABLE table_204_395 ( id number, "year" number, "compet...
Show the number of companies in each headquarter with a bar chart, and show x-axis in ascending order.
CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) ...
SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY Headquarters
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 number of companies in each headquarter with a bar chart, and show x-axis in ascending order. ### Input: CREATE TAB...
what's the difference between the total output and the amount of input for patient 16088 since 182 days 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 inputevents_cv ( row_id number, subject_id number, ...
SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16088)) AND DATETIME(inputevents_cv.charttime) >= DATETIME(CURRENT_TIME(), '-182 d...
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's the difference between the total output and the amount of input for patient 16088 since 182 days ago? ### Input: CREA...
BIOMATLS 576 has never been taught by which professors ?
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 name FROM instructor WHERE NOT name IN (SELECT INSTRUCTORalias1.name FROM course AS COURSEalias0 INNER JOIN course_offering AS COURSE_OFFERINGalias0 ON COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id INNER JOIN offering_instructor AS OFFERING_INSTRUCTOR ON OFFERING_OFFERING_ID = COURSE_OFFERING...
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: BIOMATLS 576 has never been taught by which professors ? ### Input: CREATE TABLE course ( course_id int, name varcha...
Which upper-level electives are offered in the Spring and Summer ?
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = '...
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: Which upper-level electives are offered in the Spring and Summer ? ### Input: CREATE TABLE program ( program_id int, ...
show me all flights from PITTSBURGH to BALTIMORE tomorrow
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE days ( days_code 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 = 'BALTIMORE' AND date_day.day_number = 20 AND date_day.month_number = 1 AND...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me all flights from PITTSBURGH to BALTIMORE tomorrow ### Input: CREATE TABLE date_day ( month_number int, day_n...
How many nominees had a net voice of 15.17%
CREATE TABLE table_19869 ( "Eviction No." real, "Nominee" text, "Vote to Save" text, "Vote to Evict" text, "Net vote" text, "Eviction result" text )
SELECT COUNT("Nominee") FROM table_19869 WHERE "Net vote" = '15.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: How many nominees had a net voice of 15.17% ### Input: CREATE TABLE table_19869 ( "Eviction No." real, "Nominee" tex...
how many patients are diagnosed with pressure ulcer, stage iv?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Pressure ulcer, stage IV"
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 pressure ulcer, stage iv? ### Input: CREATE TABLE prescriptions ( subject_id text, ...
Select the name of each manufacturer along with the name and price of its most expensive product.
CREATE TABLE products ( Name VARCHAR, Price INTEGER, manufacturer VARCHAR ) CREATE TABLE Manufacturers ( name VARCHAR, code VARCHAR )
SELECT T1.Name, MAX(T1.Price), T2.Name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.Name
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: Select the name of each manufacturer along with the name and price of its most expensive product. ### Input: CREATE TABLE pr...
Which Water has a Metal of contracting?
CREATE TABLE table_33959 ( "Element" text, "Wood" text, "Fire" text, "Earth" text, "Metal" text, "Water" text )
SELECT "Water" FROM table_33959 WHERE "Metal" = 'contracting'
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 Water has a Metal of contracting? ### Input: CREATE TABLE table_33959 ( "Element" text, "Wood" text, "Fire...
what is the result for the world group, semifinals after the year 1997?
CREATE TABLE table_52583 ( "Year" real, "Competition" text, "Date" text, "Location" text, "Score" text, "Result" text )
SELECT "Result" FROM table_52583 WHERE "Year" > '1997' AND "Competition" = 'world group, semifinals'
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 result for the world group, semifinals after the year 1997? ### Input: CREATE TABLE table_52583 ( "Year" rea...
Give me a stacked bar chart to show how many things in different types of each thing, and the details of the organization that owns it, show in desc by the Y.
CREATE TABLE Timed_Status_of_Things ( thing_id INTEGER, Date_and_Date DATETIME, Status_of_Thing_Code CHAR(15) ) CREATE TABLE Residents_Services ( resident_id INTEGER, service_id INTEGER, date_moved_in DATETIME, property_id INTEGER, date_requested DATETIME, date_provided DATETIME, ...
SELECT Type_of_Thing_Code, COUNT(Type_of_Thing_Code) FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details, Type_of_Thing_Code ORDER BY COUNT(Type_of_Thing_Code) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a stacked bar chart to show how many things in different types of each thing, and the details of the organization th...
Who is the studio host for the game that has Paul Sunderland as play by play commentator and Jack Haley as the Studio Analyst?
CREATE TABLE table_name_19 ( studio_host VARCHAR, play_by_play VARCHAR, studio_analysts VARCHAR )
SELECT studio_host FROM table_name_19 WHERE play_by_play = "paul sunderland" AND studio_analysts = "jack haley"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the studio host for the game that has Paul Sunderland as play by play commentator and Jack Haley as the Studio Analys...
Which Venue has Against smaller than 6?
CREATE TABLE table_62536 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text )
SELECT "Venue" FROM table_62536 WHERE "Against" < '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: Which Venue has Against smaller than 6? ### Input: CREATE TABLE table_62536 ( "Opposing Teams" text, "Against" real,...
Unanswered questions tagged with Visio (but not 'vision').
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ...
WITH TargetTags AS (SELECT Tags.Id FROM Tags WHERE Tags.TagName LIKE '%visio%' AND NOT Tags.TagName LIKE '%vision%') SELECT Posts.Tags, Posts.Id, 'http://stackoverflow.com/questions/' + REPLACE(STR(Posts.Id), ' ', '') AS PostURL, Posts.Title, Posts.OwnerDisplayName, Posts.CreationDate, Posts.Body FROM Posts INNER JOIN ...
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: Unanswered questions tagged with Visio (but not 'vision'). ### Input: CREATE TABLE ReviewTaskTypes ( Id number, Name...
How old is the average person for each job Show bar chart, and rank total number from high to low order.
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY AVG(age) 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: How old is the average person for each job Show bar chart, and rank total number from high to low order. ### Input: CREATE T...
Name the score for 30 january 2013
CREATE TABLE table_68061 ( "Goal #" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Score" FROM table_68061 WHERE "Date" = '30 january 2013'
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 score for 30 january 2013 ### Input: CREATE TABLE table_68061 ( "Goal #" real, "Date" text, "Venue" tex...
What was the original name of the restaurant located in Orillia, ON?
CREATE TABLE table_name_50 ( original_name VARCHAR, location VARCHAR )
SELECT original_name FROM table_name_50 WHERE location = "orillia, on"
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 original name of the restaurant located in Orillia, ON? ### Input: CREATE TABLE table_name_50 ( original_na...
what were the top three procedures for patients 20s?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, sy...
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 3
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 were the top three procedures for patients 20s? ### Input: CREATE TABLE allergy ( allergyid number, patientunit...
Give me a pie to show the total number from different directed by.
CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE cine...
SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by
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 pie to show the total number from different directed by. ### Input: CREATE TABLE film ( Film_ID int, Rank_...
among patients who were prescribed with warfarin, what are the four most frequently prescribed drugs at the same time, in the last year?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, ...
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 = 'warfarin' AND DATETIME(prescriptions.startdate, 'start of year') ...
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: among patients who were prescribed with warfarin, what are the four most frequently prescribed drugs at the same time, in th...
How many Wins have a Top-10 smaller than 6, and Cuts made larger than 7, and a Top-5 of 0?
CREATE TABLE table_name_57 ( wins VARCHAR, top_5 VARCHAR, top_10 VARCHAR, cuts_made VARCHAR )
SELECT COUNT(wins) FROM table_name_57 WHERE top_10 < 6 AND cuts_made > 7 AND top_5 = 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: How many Wins have a Top-10 smaller than 6, and Cuts made larger than 7, and a Top-5 of 0? ### Input: CREATE TABLE table_nam...
How many allergies are there?
CREATE TABLE Allergy_type ( allergy VARCHAR )
SELECT COUNT(DISTINCT allergy) FROM Allergy_type
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 allergies are there? ### Input: CREATE TABLE Allergy_type ( allergy VARCHAR ) ### Response: SELECT COUNT(DISTIN...
What is the group B region with a Group E region of Georgia?
CREATE TABLE table_name_17 ( group_b VARCHAR, group_e VARCHAR )
SELECT group_b FROM table_name_17 WHERE group_e = "georgia"
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 group B region with a Group E region of Georgia? ### Input: CREATE TABLE table_name_17 ( group_b VARCHAR, ...
Show the name of the shop that have the largest quantity of devices in stock.
CREATE TABLE stock ( Shop_ID VARCHAR, quantity INTEGER ) CREATE TABLE shop ( Shop_Name VARCHAR, Shop_ID VARCHAR )
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 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: Show the name of the shop that have the largest quantity of devices in stock. ### Input: CREATE TABLE stock ( Shop_ID VA...
What is the record during the event, UFC 27?
CREATE TABLE table_name_14 ( record VARCHAR, event VARCHAR )
SELECT record FROM table_name_14 WHERE event = "ufc 27"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the record during the event, UFC 27? ### Input: CREATE TABLE table_name_14 ( record VARCHAR, event VARCHAR )...
Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.
CREATE TABLE reviewer ( rid number, name text ) CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE movie ( mid number, title text, year number, director text )
SELECT DISTINCT year FROM movie AS T1 JOIN rating AS T2 ON T1.mid = T2.mid WHERE T2.stars >= 4 ORDER BY T1.year
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 all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year. ### Input: CRE...
In which Parish (Prestegjeld) is the church called Stavang Kyrkje?
CREATE TABLE table_62466 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
SELECT "Parish (Prestegjeld)" FROM table_62466 WHERE "Church Name" = 'stavang kyrkje'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In which Parish (Prestegjeld) is the church called Stavang Kyrkje? ### Input: CREATE TABLE table_62466 ( "Parish (Preste...
How many wrestlers are there?
CREATE TABLE elimination ( elimination_id text, wrestler_id text, team text, eliminated_by text, elimination_move text, time text ) CREATE TABLE wrestler ( wrestler_id number, name text, reign text, days_held text, location text, event text )
SELECT COUNT(*) FROM wrestler
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 wrestlers are there? ### Input: CREATE TABLE elimination ( elimination_id text, wrestler_id text, team ...
What place in the United States has a To par of e?
CREATE TABLE table_68155 ( "Place" text, "Name" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
SELECT "Place" FROM table_68155 WHERE "Country" = 'united states' AND "To par" = 'e'
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 place in the United States has a To par of e? ### Input: CREATE TABLE table_68155 ( "Place" text, "Name" text, ...
how many is the minimum for citv
CREATE TABLE table_1397655_1 ( year_acquired INTEGER, station VARCHAR )
SELECT MIN(year_acquired) FROM table_1397655_1 WHERE station = "CITV"
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 is the minimum for citv ### Input: CREATE TABLE table_1397655_1 ( year_acquired INTEGER, station VARCHAR ) ...
what is the lowest lane when react is more than 0.164 and the nationality is guinea?
CREATE TABLE table_name_64 ( lane INTEGER, react VARCHAR, nationality VARCHAR )
SELECT MIN(lane) FROM table_name_64 WHERE react > 0.164 AND nationality = "guinea"
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 lane when react is more than 0.164 and the nationality is guinea? ### Input: CREATE TABLE table_name_64 (...
Display the first name, and department number for all employees whose last name is 'McEwen'.
CREATE TABLE jobs ( job_id text, job_title text, min_salary number, max_salary number ) CREATE TABLE regions ( region_id number, region_name text ) CREATE TABLE countries ( country_id text, country_name text, region_id number ) CREATE TABLE employees ( employee_id number, ...
SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'
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: Display the first name, and department number for all employees whose last name is 'McEwen'. ### Input: CREATE TABLE jobs ( ...
What is the record of the game before week 5 and a bye game site?
CREATE TABLE table_36717 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" text )
SELECT "Record" FROM table_36717 WHERE "Week" < '5' AND "Game Site" = 'bye'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the record of the game before week 5 and a bye game site? ### Input: CREATE TABLE table_36717 ( "Week" real, ...
What is the coaster name that was opened in 1978, and have wooden track?
CREATE TABLE table_name_40 ( coaster_name VARCHAR, year_opened VARCHAR, track VARCHAR )
SELECT coaster_name FROM table_name_40 WHERE year_opened = "1978" AND track = "wooden"
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 coaster name that was opened in 1978, and have wooden track? ### Input: CREATE TABLE table_name_40 ( coaster...
Which stadium can hold 63,443 people?
CREATE TABLE table_31749 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
SELECT "Result" FROM table_31749 WHERE "Attendance" = '63,443'
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 stadium can hold 63,443 people? ### Input: CREATE TABLE table_31749 ( "Week" real, "Date" text, "Opponent"...
what's the first operational with programming being not programmable single purpose
CREATE TABLE table_13636_1 ( first_operational VARCHAR, programming VARCHAR )
SELECT first_operational FROM table_13636_1 WHERE programming = "Not programmable—single purpose"
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 first operational with programming being not programmable single purpose ### Input: CREATE TABLE table_13636_1 ( ...
count the number of patients whose days of hospital stay is greater than 5 and lab test name is iron?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "5" AND lab.label = "Iron"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose days of hospital stay is greater than 5 and lab test name is iron? ### Input: CREATE TABL...
Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date, and count them by a bar chart, and rank y axis from low to high order.
CREATE TABLE Claims ( Claim_ID INTEGER, Policy_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER, Amount_Settled INTEGER ) CREATE TABLE Settlements ( Settlement_ID INTEGER, Claim_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amoun...
SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made)
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: Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date, a...
this year, what are the top five most common medications prescribed to patients in the same hospital visit after the prescription of d5 1/2ns?
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, ...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'd5 1/2ns' AND DATETIME(prescriptions.startdat...
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: this year, what are the top five most common medications prescribed to patients in the same hospital visit after the prescri...
What is the maximum average associated with a total of 221902?
CREATE TABLE table_2472711_32 ( average INTEGER, total VARCHAR )
SELECT MAX(average) FROM table_2472711_32 WHERE total = 221902
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 maximum average associated with a total of 221902? ### Input: CREATE TABLE table_2472711_32 ( average INTEGE...
what is the chassis when the tyre is b, the engine is ferrari 050 ferrari 051 and the driver is rubens barrichello?
CREATE TABLE table_name_14 ( chassis VARCHAR, driver VARCHAR, tyre VARCHAR, engine_† VARCHAR )
SELECT chassis FROM table_name_14 WHERE tyre = "b" AND engine_† = "ferrari 050 ferrari 051" AND driver = "rubens barrichello"
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 chassis when the tyre is b, the engine is ferrari 050 ferrari 051 and the driver is rubens barrichello? ### Inpu...
Count of posts by month. Simple count of posts by month
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, Last...
SELECT (TIME_TO_STR(p.CreationDate, '%Y') * 12) + TIME_TO_STR(p.CreationDate, '%m') AS yearmonth, COUNT(*) AS postcount FROM Posts AS p GROUP BY TIME_TO_STR(p.CreationDate, '%Y'), TIME_TO_STR(p.CreationDate, '%m') ORDER BY TIME_TO_STR(p.CreationDate, '%Y'), TIME_TO_STR(p.CreationDate, '%m')
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: Count of posts by month. Simple count of posts by month ### Input: CREATE TABLE Votes ( Id number, PostId number, ...
How many winners are there of farma?
CREATE TABLE table_1053802_1 ( winners VARCHAR, local_title VARCHAR )
SELECT COUNT(winners) FROM table_1053802_1 WHERE local_title = "Farma"
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 winners are there of farma? ### Input: CREATE TABLE table_1053802_1 ( winners VARCHAR, local_title VARCHAR ...
What is the Money of the Player with a Score of 69-71-69-72=281?
CREATE TABLE table_name_70 ( money___$__ VARCHAR, score VARCHAR )
SELECT money___$__ FROM table_name_70 WHERE score = 69 - 71 - 69 - 72 = 281
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 Money of the Player with a Score of 69-71-69-72=281? ### Input: CREATE TABLE table_name_70 ( money___$__ VAR...
What is magda balazinska 's latest paper ?
CREATE TABLE field ( fieldid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE...
SELECT DISTINCT writes.paperid FROM author, paper, writes WHERE author.authorname = 'magda balazinska' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ORDER BY paper.year DESC
scholar
Below are sql tables 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 magda balazinska 's latest paper ? ### Input: CREATE TABLE field ( fieldid int ) CREATE TABLE author ( auth...
What is the earliest year a Baylor player made the list?
CREATE TABLE table_name_79 ( year INTEGER, college_country VARCHAR )
SELECT MIN(year) FROM table_name_79 WHERE college_country = "baylor"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the earliest year a Baylor player made the list? ### Input: CREATE TABLE table_name_79 ( year INTEGER, colle...
What team did the Heat play against at the TD Waterhouse Centre?
CREATE TABLE table_35593 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Team" FROM table_35593 WHERE "Location Attendance" = 'td waterhouse centre'
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 team did the Heat play against at the TD Waterhouse Centre? ### Input: CREATE TABLE table_35593 ( "Game" real, ...
What is the lowest Pick, when Draft is less than 1991, and when Player is 'Tom Sasso Category:Articles with hCards'?
CREATE TABLE table_12155 ( "Draft" real, "Round" text, "Pick" real, "Player" text, "Nationality" text )
SELECT MIN("Pick") FROM table_12155 WHERE "Draft" < '1991' AND "Player" = 'tom sasso category:articles with hcards'
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 Pick, when Draft is less than 1991, and when Player is 'Tom Sasso Category:Articles with hCards'? ### Inp...
Pie chart. what are the ids and names of the architects who built at least 3 bridges ?
CREATE TABLE bridge ( architect_id int, id int, name text, location text, length_meters real, length_feet real ) CREATE TABLE architect ( id text, name text, nationality text, gender text ) CREATE TABLE mill ( architect_id int, id int, location text, name text, ...
SELECT T1.name, T1.id FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_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: Pie chart. what are the ids and names of the architects who built at least 3 bridges ? ### Input: CREATE TABLE bridge ( ...
What was the margin of victory when the runner-up was Janet Coles?
CREATE TABLE table_9805 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "Margin of victory" FROM table_9805 WHERE "Runner(s)-up" = 'janet coles'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the margin of victory when the runner-up was Janet Coles? ### Input: CREATE TABLE table_9805 ( "Date" text, ...
has patient 021-95970 had any allergies in their current hospital visit?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-95970' AND patient.hospitaldischargetime IS NULL))
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 021-95970 had any allergies in their current hospital visit? ### Input: CREATE TABLE diagnosis ( diagnosisid...
Please show me how many employees working on different countries using a bar chart, and could you display from low to high by the x axis please?
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATIO...
SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME ORDER BY COUNTRY_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: Please show me how many employees working on different countries using a bar chart, and could you display from low to high b...
What was the 2nd leg score having an aggregate score of 4-2?
CREATE TABLE table_38613 ( "Home (1st leg)" text, "Home (2nd leg)" text, "1st Leg" text, "2nd leg" text, "Aggregate" text )
SELECT "2nd leg" FROM table_38613 WHERE "Aggregate" = '4-2'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the 2nd leg score having an aggregate score of 4-2? ### Input: CREATE TABLE table_38613 ( "Home (1st leg)" text...
what is the maximum age of the patients whose marital status is single and were born after 2095?
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 MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.dob_year > "2095"
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 maximum age of the patients whose marital status is single and were born after 2095? ### Input: CREATE TABLE dem...
Where is the club 'Hopkins Student Enterprises' located?
CREATE TABLE club ( clublocation VARCHAR, clubname VARCHAR )
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where is the club 'Hopkins Student Enterprises' located? ### Input: CREATE TABLE club ( clublocation VARCHAR, clubna...
systolic bp >= 170 mmhg
CREATE TABLE table_train_109 ( "id" int, "serum_potassium" float, "systolic_blood_pressure_sbp" int, "body_mass_index_bmi" float, "hypertension" bool, "NOUSE" float )
SELECT * FROM table_train_109 WHERE systolic_blood_pressure_sbp >= 170
criteria2sql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: systolic bp >= 170 mmhg ### Input: CREATE TABLE table_train_109 ( "id" int, "serum_potassium" float, "systolic_b...
What team has an incoming manager named Kenny Dalglish?
CREATE TABLE table_24172157_3 ( team VARCHAR, incoming_manager VARCHAR )
SELECT team FROM table_24172157_3 WHERE incoming_manager = "Kenny Dalglish"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What team has an incoming manager named Kenny Dalglish? ### Input: CREATE TABLE table_24172157_3 ( team VARCHAR, inc...
morning flights out of SAN FRANCISCO arriving BOSTON afternoon
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE days ( days_code 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, flight WHERE (((flight.arrival_time <= 1800 AND flight.arrival_time >= 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_...
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: morning flights out of SAN FRANCISCO arriving BOSTON afternoon ### Input: CREATE TABLE date_day ( month_number int, ...
Obtaining closed questions on Worldbuilding Meta.
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges...
SELECT * FROM Posts WHERE NOT ClosedDate 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: Obtaining closed questions on Worldbuilding Meta. ### Input: CREATE TABLE Comments ( Id number, PostId number, S...
Who had a 2nd run of 39.296 (5)?
CREATE TABLE table_13394 ( "Rank" real, "Name" text, "1st run" text, "2nd run" text, "3rd run" text, "Total" real )
SELECT "Name" FROM table_13394 WHERE "2nd run" = '39.296 (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: Who had a 2nd run of 39.296 (5)? ### Input: CREATE TABLE table_13394 ( "Rank" real, "Name" text, "1st run" text,...
What is the lowest Greater Doubles, when Doubles, I Class is 23, and when Doubles, II Class is less than 27?
CREATE TABLE table_40513 ( "Date" real, "Doubles, I Class" real, "Doubles, II Class" real, "Greater Doubles" real, "Doubles" real, "Semidoubles" real, "Total" real )
SELECT MIN("Greater Doubles") FROM table_40513 WHERE "Doubles, I Class" = '23' AND "Doubles, II Class" < '27'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest Greater Doubles, when Doubles, I Class is 23, and when Doubles, II Class is less than 27? ### Input: CREA...
has patient 25628 received a albumin lab in 01/this year?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( ...
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'albumin') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25628) AND DATETIME(labevents.charttime, 'start of year') = 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: has patient 25628 received a albumin lab in 01/this year? ### Input: CREATE TABLE diagnoses_icd ( row_id number, sub...
If the opponent was the Philadelphia flyers, what was the record?
CREATE TABLE table_3780 ( "Game" real, "January" real, "Opponent" text, "Score" text, "Decision" text, "Location/Attendance" text, "Record" text )
SELECT "Record" FROM table_3780 WHERE "Opponent" = 'Philadelphia Flyers'
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: If the opponent was the Philadelphia flyers, what was the record? ### Input: CREATE TABLE table_3780 ( "Game" real, ...
Which opponent had a bye for the TV Time?
CREATE TABLE table_name_96 ( opponent VARCHAR, tv_time VARCHAR )
SELECT opponent FROM table_name_96 WHERE tv_time = "bye"
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 opponent had a bye for the TV Time? ### Input: CREATE TABLE table_name_96 ( opponent VARCHAR, tv_time VARCHAR ...
At what latitude can the name origin of naijok fossae be found?
CREATE TABLE table_16799784_11 ( latitude VARCHAR, name VARCHAR )
SELECT latitude FROM table_16799784_11 WHERE name = "Naijok Fossae"
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: At what latitude can the name origin of naijok fossae be found? ### Input: CREATE TABLE table_16799784_11 ( latitude VAR...
what is the four event that is frequent in the output?
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CR...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4)
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 four event that is frequent in the output? ### Input: CREATE TABLE transfers ( row_id number, subject_id...
which airline has air sakha as its call sign ?
CREATE TABLE table_203_58 ( id number, "airline" text, "airline (in russian)" text, "licence #" number, "icao" text, "iata" text, "domestic code" text, "callsign" text, "photo" text )
SELECT "airline" FROM table_203_58 WHERE "callsign" = 'air sakha'
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which airline has air sakha as its call sign ? ### Input: CREATE TABLE table_203_58 ( id number, "airline" text, ...
What is the competition when 2nd leg is 0 8?
CREATE TABLE table_502 ( "Season" text, "Competition" text, "Round" text, "Club" text, "1st leg" text, "2nd leg" text, "Aggregate" text )
SELECT "Competition" FROM table_502 WHERE "2nd leg" = '0–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 competition when 2nd leg is 0 8? ### Input: CREATE TABLE table_502 ( "Season" text, "Competition" text, ...
what is admission location and primary disease of subject id 18480?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.admission_location, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "18480"
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 admission location and primary disease of subject id 18480? ### Input: CREATE TABLE demographic ( subject_id tex...
What is the total number drawn with goals against less than 55, and a total of 14 losses?
CREATE TABLE table_name_75 ( drawn VARCHAR, goals_against VARCHAR, lost VARCHAR )
SELECT COUNT(drawn) FROM table_name_75 WHERE goals_against < 55 AND lost = 14
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 total number drawn with goals against less than 55, and a total of 14 losses? ### Input: CREATE TABLE table_name...
what is first weight of patient 027-120551 since 90 months ago.
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellv...
SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120551') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-90 month') ORDER BY patient.unit...
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 first weight of patient 027-120551 since 90 months ago. ### Input: CREATE TABLE medication ( medicationid number...
male 35 _ 70 years old
CREATE TABLE table_train_227 ( "id" int, "gender" string, "diabetic" string, "allergic_to_study_products" bool, "hba1c" float, "a1c" float, "age" float, "NOUSE" float )
SELECT * FROM table_train_227 WHERE gender = 'male' AND age >= 35 AND age <= 70
criteria2sql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: male 35 _ 70 years old ### Input: CREATE TABLE table_train_227 ( "id" int, "gender" string, "diabetic" string, ...
What is the latest week with the date of november 5, 1995?
CREATE TABLE table_name_40 ( week INTEGER, date VARCHAR )
SELECT MAX(week) FROM table_name_40 WHERE date = "november 5, 1995"
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 latest week with the date of november 5, 1995? ### Input: CREATE TABLE table_name_40 ( week INTEGER, dat...
Name the playoffs for 2nd round open cup
CREATE TABLE table_14240688_1 ( playoffs VARCHAR, open_cup VARCHAR )
SELECT playoffs FROM table_14240688_1 WHERE open_cup = "2nd Round"
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 playoffs for 2nd round open cup ### Input: CREATE TABLE table_14240688_1 ( playoffs VARCHAR, open_cup VARCH...
votes between 2014-05 to 2014-10.
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId numb...
SELECT * FROM Votes WHERE CreationDate >= '2014-05-01' AND CreationDate < '2014-10-01' AND NOT UserId IS NULL ORDER BY Id
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: votes between 2014-05 to 2014-10. ### Input: CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeType...
What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix?
CREATE TABLE table_name_46 ( constructor VARCHAR, winning_driver VARCHAR, race VARCHAR )
SELECT constructor FROM table_name_46 WHERE winning_driver = "jack brabham" AND race = "monaco grand prix"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix? ### Input: CREATE TABLE table_name_46 ( ...
Which planet has the transcription of wan suk?
CREATE TABLE table_22148 ( "English name" text, "Thai name" text, "Transcription" text, "Color" text, "Sanskrit word" text, "Planet" text )
SELECT "Planet" FROM table_22148 WHERE "Transcription" = 'wan suk'
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 planet has the transcription of wan suk? ### Input: CREATE TABLE table_22148 ( "English name" text, "Thai name...
What is the average week on November 7, 1976 with an attendance less than 46,735?
CREATE TABLE table_4359 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT AVG("Week") FROM table_4359 WHERE "Date" = 'november 7, 1976' AND "Attendance" < '46,735'
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 week on November 7, 1976 with an attendance less than 46,735? ### Input: CREATE TABLE table_4359 ( "...
how many patients since 1 year ago received opn aortic valvuloplasty two times?
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'opn aortic valvulopla...
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 many patients since 1 year ago received opn aortic valvuloplasty two times? ### Input: CREATE TABLE d_labitems ( row...
How many patients below 67 years of age have stayed in the hospital for more than 34 days?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "67" AND demographic.days_stay > "34"
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 below 67 years of age have stayed in the hospital for more than 34 days? ### Input: CREATE TABLE lab ( ...
What mechanical has lpm regulation?
CREATE TABLE table_1348246_3 ( mechanical VARCHAR, regulating VARCHAR )
SELECT mechanical FROM table_1348246_3 WHERE regulating = "LPM"
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 mechanical has lpm regulation? ### Input: CREATE TABLE table_1348246_3 ( mechanical VARCHAR, regulating VARCHAR...
The country of Laos is in what region?
CREATE TABLE table_60090 ( "Country" text, "Region" text, "FHFreepressreport" text, "RWB Pressfreedomindex" text, "Internetlists" text, "ONIpoliticalfiltering" text, "ONIsocialfiltering" text, "ONIsecurityfiltering" text, "ONItoolsfiltering" text )
SELECT "Region" FROM table_60090 WHERE "Country" = 'laos'
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: The country of Laos is in what region? ### Input: CREATE TABLE table_60090 ( "Country" text, "Region" text, "FHF...
provide the number of emergency hospital admission patients who have been diagnosed with unspecified malignant neoplasm of tongue.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.short_title = "Malig neo tongue NEC"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of emergency hospital admission patients who have been diagnosed with unspecified malignant neoplasm of t...
If the market name is Xperia U, what is the weight?
CREATE TABLE table ( weight VARCHAR, market_name VARCHAR )
SELECT weight FROM table WHERE market_name = "Xperia U"
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: If the market name is Xperia U, what is the weight? ### Input: CREATE TABLE table ( weight VARCHAR, market_name VARC...
How many Points has Wins larger than 0?
CREATE TABLE table_name_24 ( points VARCHAR, wins INTEGER )
SELECT COUNT(points) FROM table_name_24 WHERE wins > 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: How many Points has Wins larger than 0? ### Input: CREATE TABLE table_name_24 ( points VARCHAR, wins INTEGER ) ### R...
What is the production code for episode 6 in the season?
CREATE TABLE table_22595 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
SELECT "Production code" FROM table_22595 WHERE "No. in season" = '6'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the production code for episode 6 in the season? ### Input: CREATE TABLE table_22595 ( "No. in series" real, ...
Who was the visiting team at the game when the Canadiens had a record of 30 19 9?
CREATE TABLE table_77534 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
SELECT "Visitor" FROM table_77534 WHERE "Record" = '30–19–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: Who was the visiting team at the game when the Canadiens had a record of 30 19 9? ### Input: CREATE TABLE table_77534 ( ...