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 is the name of the tourist attraction that is associated with the photo 'game1'?
CREATE TABLE PHOTOS ( Tourist_Attraction_ID VARCHAR, Name VARCHAR ) CREATE TABLE TOURIST_ATTRACTIONS ( Name VARCHAR, Tourist_Attraction_ID VARCHAR )
SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1"
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 name of the tourist attraction that is associated with the photo 'game1'? ### Input: CREATE TABLE PHOTOS ( T...
Find bad answers from 'not an answer' comments.
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, ...
SELECT c.PostId AS "post_link", YEAR(C.CreationDate) AS Year, MONTH(C.CreationDate) AS Month, c.Text AS Body FROM Comments AS C, Posts AS P WHERE (C.Text LIKE '%should be a comment%' AND LENGTH(c.Text) < 25 AND C.PostId = P.Id AND C.CreationDate < '2016-12-01T00:00:00.000' AND C.CreationDate > '2011-01-01T00:00:00.000'...
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find bad answers from 'not an answer' comments. ### Input: CREATE TABLE PostNotices ( Id number, PostId number, ...
What is the result for Gold Coast when Adelaide and Perth are yes, but Auckland is no?
CREATE TABLE table_71063 ( "Sydney" text, "Melbourne" text, "Perth" text, "Adelaide" text, "Gold Coast" text, "Auckland" text )
SELECT "Gold Coast" FROM table_71063 WHERE "Adelaide" = 'yes' AND "Auckland" = 'no' AND "Perth" = 'yes'
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 Gold Coast when Adelaide and Perth are yes, but Auckland is no? ### Input: CREATE TABLE table_71063 (...
Which License has a System of amiga, and a Name of pocketuae?
CREATE TABLE table_name_83 ( license VARCHAR, system VARCHAR, name VARCHAR )
SELECT license FROM table_name_83 WHERE system = "amiga" AND name = "pocketuae"
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 License has a System of amiga, and a Name of pocketuae? ### Input: CREATE TABLE table_name_83 ( license VARCHAR, ...
Are there courses in the Fall or Winter term at 300 -level ?
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0...
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 courses in the Fall or Winter term at 300 -level ? ### Input: CREATE TABLE program_requirement ( program_id in...
What is the package/option for Italy when the language is italian?
CREATE TABLE table_name_24 ( package_option VARCHAR, country VARCHAR, language VARCHAR )
SELECT package_option FROM table_name_24 WHERE country = "italy" AND language = "italian"
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 package/option for Italy when the language is italian? ### Input: CREATE TABLE table_name_24 ( package_optio...
What is the highest population of a city that has a town status of 2010?
CREATE TABLE table_name_91 ( population INTEGER, town_status VARCHAR )
SELECT MAX(population) FROM table_name_91 WHERE town_status = "2010"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest population of a city that has a town status of 2010? ### Input: CREATE TABLE table_name_91 ( populat...
How many Picks have an Overall smaller than 304, and a Position of g, and a Round smaller than 11?
CREATE TABLE table_76729 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT COUNT("Pick") FROM table_76729 WHERE "Overall" < '304' AND "Position" = 'g' AND "Round" < '11'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many Picks have an Overall smaller than 304, and a Position of g, and a Round smaller than 11? ### Input: CREATE TABLE t...
What was Australia's score when Peter Lonard played?
CREATE TABLE table_78673 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT "Score" FROM table_78673 WHERE "Country" = 'australia' AND "Player" = 'peter lonard'
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 Australia's score when Peter Lonard played? ### Input: CREATE TABLE table_78673 ( "Place" text, "Player" te...
Na,e the number of field goals for right tackle
CREATE TABLE table_14342480_5 ( field_goals VARCHAR, position VARCHAR )
SELECT COUNT(field_goals) FROM table_14342480_5 WHERE position = "Right tackle"
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: Na,e the number of field goals for right tackle ### Input: CREATE TABLE table_14342480_5 ( field_goals VARCHAR, posi...
Has NRE 336 ever taken place over the Summer time ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'NRE' AND course.number = 336 AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester
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: Has NRE 336 ever taken place over the Summer time ? ### Input: CREATE TABLE course_offering ( offering_id int, cours...
What is the highest Rank, when Location is Kinshasa, DR Congo, and when Current Seating Capacity is less than 80,000?
CREATE TABLE table_9856 ( "Rank" real, "Venue name" text, "Highest attendance" text, "Location" text, "Current seating capacity" real )
SELECT MAX("Rank") FROM table_9856 WHERE "Location" = 'kinshasa, dr congo' AND "Current seating capacity" < '80,000'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Rank, when Location is Kinshasa, DR Congo, and when Current Seating Capacity is less than 80,000? ### In...
What are the titles of segment c for series episode is 21-08?
CREATE TABLE table_15187735_21 ( segment_c VARCHAR, series_ep VARCHAR )
SELECT segment_c FROM table_15187735_21 WHERE series_ep = "21-08"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the titles of segment c for series episode is 21-08? ### Input: CREATE TABLE table_15187735_21 ( segment_c VARC...
What is the Original Beechwood Bunny Tale/Source material that has an Official # larger than 38, and a TF1 # larger than 50, and an English title of 'sweet fabiola'?
CREATE TABLE table_43549 ( "Official #" real, "TF1 #" real, "French title" text, "English title" text, "Air date (France)" text, "Original Beechwood Bunny Tale / Source material" text )
SELECT "Original Beechwood Bunny Tale / Source material" FROM table_43549 WHERE "Official #" > '38' AND "TF1 #" > '50' AND "English title" = 'sweet fabiola'
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 Original Beechwood Bunny Tale/Source material that has an Official # larger than 38, and a TF1 # larger than 50,...
What is the max speed when the vessel is gallion?
CREATE TABLE table_30293 ( "Vessel" text, "Built" real, "Max Speed" text, "Length" text, "Breadth" text, "Flag" text, "Propulsion" text )
SELECT "Max Speed" FROM table_30293 WHERE "Vessel" = 'Gallion'
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 max speed when the vessel is gallion? ### Input: CREATE TABLE table_30293 ( "Vessel" text, "Built" real,...
What locations are considered centre?
CREATE TABLE table_26387382_1 ( power__mw·hr_yr_ VARCHAR, location__county_ VARCHAR )
SELECT power__mw·hr_yr_ FROM table_26387382_1 WHERE location__county_ = "Centre"
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 locations are considered centre? ### Input: CREATE TABLE table_26387382_1 ( power__mw·hr_yr_ VARCHAR, location_...
Who is J.E. Armstrong when W.H. Archer is D.M. Lawson?
CREATE TABLE table_635 ( "W.H. Archer" text, "J.E. Armstrong" text, "H.L. Birkett" text, "F.A. Brill" text, "H.T. Brewer" text )
SELECT "J.E. Armstrong" FROM table_635 WHERE "W.H. Archer" = 'D.M. Lawson'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is J.E. Armstrong when W.H. Archer is D.M. Lawson? ### Input: CREATE TABLE table_635 ( "W.H. Archer" text, "J.E....
on monday i'd like to travel from LAS VEGAS to DETROIT MICHIGAN
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, ni...
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, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DETROIT' AND date_day.day_number = 21 AND date_day.month_number = ...
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: on monday i'd like to travel from LAS VEGAS to DETROIT MICHIGAN ### Input: CREATE TABLE time_interval ( period text, ...
What manufacturer won the race on November 2?
CREATE TABLE table_17801022_1 ( manufacturer VARCHAR, date VARCHAR )
SELECT manufacturer FROM table_17801022_1 WHERE date = "November 2"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What manufacturer won the race on November 2? ### Input: CREATE TABLE table_17801022_1 ( manufacturer VARCHAR, date ...
how many patients are with unknown/unspecified ethnicity and diagnosed with primary disease complete heart block?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "UNKNOWN/NOT SPECIFIED" AND demographic.diagnosis = "COMPLETE HEART BLOCK"
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 with unknown/unspecified ethnicity and diagnosed with primary disease complete heart block? ### Input:...
How many times was the total more than 1, the nation was east germany and silver was more than 1?
CREATE TABLE table_10568 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT COUNT("Bronze") FROM table_10568 WHERE "Total" > '1' AND "Nation" = 'east germany' AND "Silver" > '1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many times was the total more than 1, the nation was east germany and silver was more than 1? ### Input: CREATE TABLE ta...
What are the highest attempts that have net yards less than 631, and 2 for the touchdowns?
CREATE TABLE table_name_53 ( attempts INTEGER, net_yards VARCHAR, touchdowns VARCHAR )
SELECT MAX(attempts) FROM table_name_53 WHERE net_yards < 631 AND touchdowns = 2
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the highest attempts that have net yards less than 631, and 2 for the touchdowns? ### Input: CREATE TABLE table_nam...
Which year earlier than 2006 has the average Total Convictions of Fraud at 1,521?
CREATE TABLE table_6170 ( "Year" real, "Total Convictions" real, "Homicide (Art. 111,112,113,116 StGB)" real, "Serious Bodily Injury (Art. 122 StGB)" real, "Minor Bodily Injury (Art. 123 StGB)" real, "Sexual Contact with Children (Art. 187 StGB)" real, "Rape (Art. 190 StGB)" real, "Theft...
SELECT AVG("Total Convictions") FROM table_6170 WHERE "Fraud (Art. 146 StGB)" = '1,521' AND "Year" < '2006'
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 year earlier than 2006 has the average Total Convictions of Fraud at 1,521? ### Input: CREATE TABLE table_6170 ( "...
What college did Jim Bennett attend?
CREATE TABLE table_26996293_1 ( college VARCHAR, player VARCHAR )
SELECT college FROM table_26996293_1 WHERE player = "Jim Bennett"
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 college did Jim Bennett attend? ### Input: CREATE TABLE table_26996293_1 ( college VARCHAR, player VARCHAR ) ##...
What is the Middle German (Luxemburgish) word for stone?
CREATE TABLE table_53665 ( "English" text, "Scots" text, "West Frisian" text, "Afrikaans" text, "Dutch" text, "Dutch ( Limburgish )" text, "Low German" text, "Low German ( Groningen )" text, "Middle German ( Luxemburgish )" text, "German" text, "Yiddish" text, "Gothic" te...
SELECT "Middle German ( Luxemburgish )" FROM table_53665 WHERE "English" = 'stone'
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 Middle German (Luxemburgish) word for stone? ### Input: CREATE TABLE table_53665 ( "English" text, "Scot...
A bar chart for what are the number of the dates that have an average sea level pressure between 303 and 31?, could you sort in desc by the y axis?
CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE trip ( id INTEGER, d...
SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart for what are the number of the dates that have an average sea level pressure between 303 and 31?, could you sort...
give me the number of patients whose religion is christian scientist?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "CHRISTIAN SCIENTIST"
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 religion is christian scientist? ### Input: CREATE TABLE prescriptions ( subject_id...
What round had a home of FC augsburg with the result of 3-0?
CREATE TABLE table_6775 ( "Season" text, "Round" text, "Date" text, "Home" text, "Away" text, "Result" text )
SELECT "Round" FROM table_6775 WHERE "Home" = 'fc augsburg' AND "Result" = '3-0'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What round had a home of FC augsburg with the result of 3-0? ### Input: CREATE TABLE table_6775 ( "Season" text, "Ro...
What are the countries of all airlines whose names start with Orbit, and count them by a bar chart, could you display Y in desc order?
CREATE TABLE routes ( rid integer, dst_apid integer, dst_ap varchar(4), src_apid bigint, src_ap varchar(4), alid bigint, airline varchar(4), codeshare text ) CREATE TABLE airlines ( alid integer, name text, iata varchar(2), icao varchar(3), callsign text, country...
SELECT country, COUNT(country) FROM airlines WHERE name LIKE 'Orbit%' GROUP BY country ORDER BY COUNT(country) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the countries of all airlines whose names start with Orbit, and count them by a bar chart, could you display Y in d...
what was the daily average amount of insulin in patient 006-97726's body?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-97726')) AND intakeoutput.celllabel = 'insul...
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 daily average amount of insulin in patient 006-97726's body? ### Input: CREATE TABLE treatment ( treatmenti...
What is the total average with 54 total points and a rank less than 10?
CREATE TABLE table_name_34 ( average VARCHAR, total_points VARCHAR, rank_by_average VARCHAR )
SELECT COUNT(average) FROM table_name_34 WHERE total_points = 54 AND rank_by_average < 10
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total average with 54 total points and a rank less than 10? ### Input: CREATE TABLE table_name_34 ( average ...
how many patients whose admission type is urgent and lab test fluid is joint fluid?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.fluid = "Joint Fluid"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission type is urgent and lab test fluid is joint fluid? ### Input: CREATE TABLE lab ( subjec...
Show name and distance for all aircrafts by a bar chart, could you order by the x-axis in desc?
CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREAT...
SELECT name, distance FROM aircraft ORDER BY name DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show name and distance for all aircrafts by a bar chart, could you order by the x-axis in desc? ### Input: CREATE TABLE airc...
Which Year Built has a Parish (Prestegjeld) of bremanger parish, and a Location of the Church of bremanger?
CREATE TABLE table_name_67 ( year_built INTEGER, parish___prestegjeld__ VARCHAR, location_of_the_church VARCHAR )
SELECT AVG(year_built) FROM table_name_67 WHERE parish___prestegjeld__ = "bremanger parish" AND location_of_the_church = "bremanger"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Year Built has a Parish (Prestegjeld) of bremanger parish, and a Location of the Church of bremanger? ### Input: CREAT...
WHAT WAS THE LOWEST CAR # WITH SON-E-WA, AND 2012 START YEAR?
CREATE TABLE table_8040 ( "Year started" real, "Number of cars" real, "Current car" text, "Car #" real, "Website" text )
SELECT MIN("Car #") FROM table_8040 WHERE "Current car" = 'son-e-wa' AND "Year started" < '2012'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT WAS THE LOWEST CAR # WITH SON-E-WA, AND 2012 START YEAR? ### Input: CREATE TABLE table_8040 ( "Year started" real, ...
Amount of questions for the tag PHP.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerU...
SELECT * FROM Tags AS t WHERE t.TagName = 'php'
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: Amount of questions for the tag PHP. ### Input: CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number,...
Name the margin of victory when tournament is algarve open de portugal
CREATE TABLE table_1569625_1 ( margin_of_victory VARCHAR, tournament VARCHAR )
SELECT margin_of_victory FROM table_1569625_1 WHERE tournament = "Algarve Open de Portugal"
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 margin of victory when tournament is algarve open de portugal ### Input: CREATE TABLE table_1569625_1 ( margin_...
had patient 009-11591 had heartrate less than 88.0 on 10/10/2105?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text,...
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-11591')) AND vitalperiodic.heartrate < 88.0 AND NOT vitalperiodi...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: had patient 009-11591 had heartrate less than 88.0 on 10/10/2105? ### Input: CREATE TABLE lab ( labid number, patien...
What is the date of the game where the vistor team was the Knicks and more than 18,165 were in attendance?
CREATE TABLE table_name_11 ( date VARCHAR, visitor VARCHAR, attendance VARCHAR )
SELECT date FROM table_name_11 WHERE visitor = "knicks" AND attendance > 18 OFFSET 165
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 date of the game where the vistor team was the Knicks and more than 18,165 were in attendance? ### Input: CREATE...
how many of the patients with hypopotassemia died?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.long_title = "Hypopotassemia"
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 of the patients with hypopotassemia died? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, ...
what was the name of the drug prescribed to patient 009-12985 in the same day after having received a vasodilating agent - iv - labetalol until 63 months ago?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-12985') AND treatment.treatme...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the name of the drug prescribed to patient 009-12985 in the same day after having received a vasodilating agent - i...
When the tom watson is playing for the United States and the To par is under 14, what's the total?
CREATE TABLE table_48971 ( "Player" text, "Country" text, "Year(s) won" text, "Total" text, "To par" real )
SELECT "Total" FROM table_48971 WHERE "Country" = 'united states' AND "To par" < '14' AND "Player" = 'tom watson'
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 the tom watson is playing for the United States and the To par is under 14, what's the total? ### Input: CREATE TABLE t...
For Pontyberem RFC that has a Try Bonus of 2, what is the played?
CREATE TABLE table_14450 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text )
SELECT "Played" FROM table_14450 WHERE "Try bonus" = '2' AND "Club" = 'pontyberem rfc'
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: For Pontyberem RFC that has a Try Bonus of 2, what is the played? ### Input: CREATE TABLE table_14450 ( "Club" text, ...
Vicious Dog based on Suggested Edits.
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT COUNT(*) AS Count, MAX(s.CreationDate), v.UserId AS "user_link", uu.Reputation AS MainUserReputation, s.OwnerUserId AS "user_link", su.Reputation AS SuggesterReputation, su.CreationDate AS SuggesterCreationDate FROM SuggestedEditVotes AS v INNER JOIN SuggestedEdits AS s ON s.Id = v.SuggestedEditId INNER JOIN Pos...
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: Vicious Dog based on Suggested Edits. ### Input: CREATE TABLE Users ( Id number, Reputation number, CreationDate...
What region has the symbol ?
CREATE TABLE table_7238 ( "Name" text, "Japanese" text, "Population ( 2012 )" real, "Date of designation" text, "Region" text, "Prefecture" text )
SELECT "Region" FROM table_7238 WHERE "Japanese" = '八尾'
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 region has the symbol ? ### Input: CREATE TABLE table_7238 ( "Name" text, "Japanese" text, "Population ( 20...
What Public Institution is in Black River Falls?
CREATE TABLE table_6870 ( "Institution" text, "Location" text, "Affiliation" text, "Enrollment" real, "Mascot" text, "Colors" text )
SELECT "Institution" FROM table_6870 WHERE "Affiliation" = 'public' AND "Location" = 'black river falls'
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 Public Institution is in Black River Falls? ### Input: CREATE TABLE table_6870 ( "Institution" text, "Location"...
how many patients have been admitted to the hospital before the year 2137 with hyp kid nos w cr kid v as their diagnosis short title?
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.admityear < "2137" AND diagnoses.short_title = "Hyp kid NOS w cr kid V"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients have been admitted to the hospital before the year 2137 with hyp kid nos w cr kid v as their diagnosis sho...
who won mixed doubles when zhou mi won womens singles
CREATE TABLE table_23681 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
SELECT "Mixed doubles" FROM table_23681 WHERE "Womens singles" = 'Zhou Mi'
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 mixed doubles when zhou mi won womens singles ### Input: CREATE TABLE table_23681 ( "Year" real, "Mens singl...
What is the market income per capita of the county with the 9.4% poverty rate?
CREATE TABLE table_22815568_2 ( market_income_per_capita VARCHAR, poverty_rate VARCHAR )
SELECT market_income_per_capita FROM table_22815568_2 WHERE poverty_rate = "9.4%"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the market income per capita of the county with the 9.4% poverty rate? ### Input: CREATE TABLE table_22815568_2 ( ...
What is the lowest overall number of hurricanes?
CREATE TABLE table_2930244_3 ( number_of_hurricanes INTEGER )
SELECT MIN(number_of_hurricanes) FROM table_2930244_3
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest overall number of hurricanes? ### Input: CREATE TABLE table_2930244_3 ( number_of_hurricanes INTEGER ...
find me the time of admission and short title of procedure for patient jane dillard.
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 demographic.admittime, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Jane Dillard"
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: find me the time of admission and short title of procedure for patient jane dillard. ### Input: CREATE TABLE prescriptions (...
i mean what was the last temperature c (calc) for patient 4401 during the previous day?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number...
SELECT chartevents.valuenum 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 = 4401)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperatur...
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: i mean what was the last temperature c (calc) for patient 4401 during the previous day? ### Input: CREATE TABLE labevents ( ...
what is drug type and drug route of drug name avapro?
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 prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Avapro"
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 drug type and drug route of drug name avapro? ### Input: CREATE TABLE prescriptions ( subject_id text, hadm_...
Draw a bar chart for what is the average high temperature for each day of week?
CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, wind_speed_mph int ) CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CR...
SELECT day_of_week, AVG(high_temperature) FROM weekly_weather GROUP BY day_of_week
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart for what is the average high temperature for each day of week? ### Input: CREATE TABLE weekly_weather ( ...
what is the 2011 performance for the US open?
CREATE TABLE table_15070 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text )
SELECT "2011" FROM table_15070 WHERE "Tournament" = 'us open'
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 2011 performance for the US open? ### Input: CREATE TABLE table_15070 ( "Tournament" text, "2009" text, ...
What is the highest round of the player with a pick number lower than 34?
CREATE TABLE table_36980 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT MAX("Round") FROM table_36980 WHERE "Pick #" > '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 round of the player with a pick number lower than 34? ### Input: CREATE TABLE table_36980 ( "Round" ...
Name the total number of valid poll with seats more than 4 and candidates more than 9
CREATE TABLE table_name_67 ( valid_poll VARCHAR, seats VARCHAR, candidates VARCHAR )
SELECT COUNT(valid_poll) FROM table_name_67 WHERE seats > 4 AND candidates > 9
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the total number of valid poll with seats more than 4 and candidates more than 9 ### Input: CREATE TABLE table_name_67 ...
Which Silver has a Total of 11, and a Gold smaller than 8?
CREATE TABLE table_65529 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MIN("Silver") FROM table_65529 WHERE "Total" = '11' AND "Gold" < '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: Which Silver has a Total of 11, and a Gold smaller than 8? ### Input: CREATE TABLE table_65529 ( "Rank" text, "Natio...
Which Year is the first one that has an Apparatus of uneven bars, and a Rank-Final smaller than 3?
CREATE TABLE table_63394 ( "Year" real, "Competition Description" text, "Location" text, "Apparatus" text, "Rank-Final" real, "Score-Final" real )
SELECT MIN("Year") FROM table_63394 WHERE "Apparatus" = 'uneven bars' AND "Rank-Final" < '3'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Year is the first one that has an Apparatus of uneven bars, and a Rank-Final smaller than 3? ### Input: CREATE TABLE t...
What was the final result for Craig Hosmer?
CREATE TABLE table_18503 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Result" FROM table_18503 WHERE "Incumbent" = 'Craig Hosmer'
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 final result for Craig Hosmer? ### Input: CREATE TABLE table_18503 ( "District" text, "Incumbent" text,...
Which Driver has a Date of 16th september 1951, and a Race of dns?
CREATE TABLE table_37596 ( "Date" text, "Event" text, "Circuit" text, "Driver" text, "Race" text )
SELECT "Driver" FROM table_37596 WHERE "Date" = '16th september 1951' AND "Race" = 'dns'
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 Driver has a Date of 16th september 1951, and a Race of dns? ### Input: CREATE TABLE table_37596 ( "Date" text, ...
Who is the owner of the branding gx94?
CREATE TABLE table_31718 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text )
SELECT "Owner" FROM table_31718 WHERE "Branding" = 'gx94'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the owner of the branding gx94? ### Input: CREATE TABLE table_31718 ( "Frequency" text, "Call sign" text, ...
Name the population density where population % is 1.1% for slovakia
CREATE TABLE table_20520 ( "Member State" text, "Population in millions" text, "Population % of EU" text, "Area km 2" real, "Area % of EU" text, "Pop. density People/km 2" text )
SELECT "Pop. density People/km 2" FROM table_20520 WHERE "Population % of EU" = '1.1%' AND "Member State" = 'Slovakia'
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 population density where population % is 1.1% for slovakia ### Input: CREATE TABLE table_20520 ( "Member State"...
great now what i want to find out is on 4 20 from WASHINGTON to DENVER do you have a flight least expensive fare around 5 o'clock in the morning
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, ...
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: great now what i want to find out is on 4 20 from WASHINGTON to DENVER do you have a flight least expensive fare around 5 o'...
2nd career/salary of substitute teacher ($20,000) involves what 6th career/salary?
CREATE TABLE table_38691 ( "Career Card" text, "Starting career/salary" text, "2nd career/salary" text, "3rd career/salary" text, "4th career/salary" text, "5th career/salary" text, "6th career/salary" text )
SELECT "6th career/salary" FROM table_38691 WHERE "2nd career/salary" = 'substitute teacher ($20,000)'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: 2nd career/salary of substitute teacher ($20,000) involves what 6th career/salary? ### Input: CREATE TABLE table_38691 ( ...
Getting List of All users.
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, ...
SELECT * FROM Users WHERE Location = 'Tehran'
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: Getting List of All users. ### Input: CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, User...
Top 50 Users of a Tag (based on upvotes).
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, De...
SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, Users.Id AS "user_link", COUNT(*) AS UpVotes, Reputation AS TotalReputation FROM Users INNER JOIN Tags ON Tags.TagName = '##TagName##' INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes...
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: Top 50 Users of a Tag (based on upvotes). ### Input: CREATE TABLE ReviewTaskTypes ( Id number, Name text, Descri...
could you please tell me the cheapest fare from ATLANTA to BOSTON
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE T...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city...
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: could you please tell me the cheapest fare from ATLANTA to BOSTON ### Input: CREATE TABLE time_zone ( time_zone_code tex...
Which Game has a Home Team of san francisco, and a Date of april 22?
CREATE TABLE table_48706 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text )
SELECT "Game" FROM table_48706 WHERE "Home Team" = 'san francisco' AND "Date" = 'april 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: Which Game has a Home Team of san francisco, and a Date of april 22? ### Input: CREATE TABLE table_48706 ( "Game" text, ...
When did the home team score 19.17 (131)?
CREATE TABLE table_52930 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_52930 WHERE "Home team score" = '19.17 (131)'
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 home team score 19.17 (131)? ### Input: CREATE TABLE table_52930 ( "Home team" text, "Home team score" ...
What was the score when the away team was brighton & hove albion?
CREATE TABLE table_48029 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT "Score" FROM table_48029 WHERE "Away team" = 'brighton & hove albion'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score when the away team was brighton & hove albion? ### Input: CREATE TABLE table_48029 ( "Tie no" text, ...
Which new conference is located in Greentown?
CREATE TABLE table_name_64 ( new_conference VARCHAR, location VARCHAR )
SELECT new_conference FROM table_name_64 WHERE location = "greentown"
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 new conference is located in Greentown? ### Input: CREATE TABLE table_name_64 ( new_conference VARCHAR, locati...
What was the amount of grain in 2001?
CREATE TABLE table_56390 ( "Product" text, "2004" text, "2003" text, "2002" text, "2001" text )
SELECT "2001" FROM table_56390 WHERE "Product" = 'grain'
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 amount of grain in 2001? ### Input: CREATE TABLE table_56390 ( "Product" text, "2004" text, "2003" ...
which name had the highest number ?
CREATE TABLE table_203_573 ( id number, "name" text, "rank - 2000" number, "number" number, "country of origin" text, "england - 2001" text )
SELECT "name" FROM table_203_573 ORDER BY "number" 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 name had the highest number ? ### Input: CREATE TABLE table_203_573 ( id number, "name" text, "rank - 2000...
Who read the unabridged book written by Gary Paulsen?
CREATE TABLE table_name_9 ( read_by VARCHAR, un__abridged VARCHAR, author VARCHAR )
SELECT read_by FROM table_name_9 WHERE un__abridged = "unabridged" AND author = "gary paulsen"
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 read the unabridged book written by Gary Paulsen? ### Input: CREATE TABLE table_name_9 ( read_by VARCHAR, un__ab...
How many different total points does the couple ranked at number 5 have?
CREATE TABLE table_19744915_22 ( total VARCHAR, rank VARCHAR )
SELECT COUNT(total) FROM table_19744915_22 WHERE rank = 5
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many different total points does the couple ranked at number 5 have? ### Input: CREATE TABLE table_19744915_22 ( tot...
List the titles of books that are not published.
CREATE TABLE book ( book_id number, title text, issues number, writer text ) CREATE TABLE publication ( publication_id number, book_id number, publisher text, publication_date text, price number )
SELECT title FROM book WHERE NOT book_id IN (SELECT book_id FROM publication)
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the titles of books that are not published. ### Input: CREATE TABLE book ( book_id number, title text, issu...
Next semester what classes will Dr. Stephanie Bolz be teaching ?
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, t...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Stephanie Bolz%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.of...
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: Next semester what classes will Dr. Stephanie Bolz be teaching ? ### Input: CREATE TABLE offering_instructor ( offering_...
Where did the Lightning play the NY Rangers at 7:00 pm?
CREATE TABLE table_name_96 ( location VARCHAR, opponent VARCHAR, time VARCHAR )
SELECT location FROM table_name_96 WHERE opponent = "ny rangers" AND time = "7:00 pm"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where did the Lightning play the NY Rangers at 7:00 pm? ### Input: CREATE TABLE table_name_96 ( location VARCHAR, op...
how many assets does each maintenance contract contain? List the number and the contract id.
CREATE TABLE Fault_Log_Parts ( fault_log_entry_id INTEGER, part_fault_id INTEGER, fault_status VARCHAR(10) ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Assets ( ...
SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_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: how many assets does each maintenance contract contain? List the number and the contract id. ### Input: CREATE TABLE Fault_L...
How many matches have Rhymney RFC played?
CREATE TABLE table_name_24 ( played VARCHAR, club VARCHAR )
SELECT played FROM table_name_24 WHERE club = "rhymney rfc"
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 matches have Rhymney RFC played? ### Input: CREATE TABLE table_name_24 ( played VARCHAR, club VARCHAR ) ###...
WHAT IS THE COUNTRY WITH NAME OF KANU?
CREATE TABLE table_name_48 ( country VARCHAR, name VARCHAR )
SELECT country FROM table_name_48 WHERE name = "kanu"
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 COUNTRY WITH NAME OF KANU? ### Input: CREATE TABLE table_name_48 ( country VARCHAR, name VARCHAR ) ### R...
Draw a bar chart of transaction type versus the total number
CREATE TABLE Customers_Cards ( card_id INTEGER, customer_id INTEGER, card_type_code VARCHAR(15), card_number VARCHAR(80), date_valid_from DATETIME, date_valid_to DATETIME, other_card_details VARCHAR(255) ) CREATE TABLE Financial_Transactions ( transaction_id INTEGER, previous_transa...
SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart of transaction type versus the total number ### Input: CREATE TABLE Customers_Cards ( card_id INTEGER, ...
Which December has a Record of 4-3-6?
CREATE TABLE table_75436 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text )
SELECT "December" FROM table_75436 WHERE "Record" = '4-3-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 December has a Record of 4-3-6? ### Input: CREATE TABLE table_75436 ( "Game" real, "December" real, "Oppon...
What bridge is in Mcville?
CREATE TABLE table_name_69 ( name VARCHAR, location VARCHAR )
SELECT name FROM table_name_69 WHERE location = "mcville"
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 bridge is in Mcville? ### Input: CREATE TABLE table_name_69 ( name VARCHAR, location VARCHAR ) ### Response: SE...
yes or no for the gold coast with yes for melbourne, yes for adelaide, yes for auckland?
CREATE TABLE table_name_2 ( gold_coast VARCHAR, auckland VARCHAR, melbourne VARCHAR, adelaide VARCHAR )
SELECT gold_coast FROM table_name_2 WHERE melbourne = "yes" AND adelaide = "yes" AND auckland = "yes"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: yes or no for the gold coast with yes for melbourne, yes for adelaide, yes for auckland? ### Input: CREATE TABLE table_name_...
what are the three most commonly prescribed medications for patients who have been diagnosed with aortocoronary bypass before during the same month, until 3 years ago?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id num...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
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 three most commonly prescribed medications for patients who have been diagnosed with aortocoronary bypass befor...
get me the time of admission and discharge for patient with patient id 53707.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT demographic.admittime, demographic.dischtime FROM demographic WHERE demographic.subject_id = "53707"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get me the time of admission and discharge for patient with patient id 53707. ### Input: CREATE TABLE lab ( subject_id t...
which horse was older , brown diamond or flamecap ?
CREATE TABLE table_204_561 ( id number, "fence" number, "name" text, "jockey" text, "age" number, "handicap (st-lb)" text, "starting price" text, "fate" text )
SELECT "name" FROM table_204_561 WHERE "name" IN ('brown diamond', 'flamecap') ORDER BY "age" 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 horse was older , brown diamond or flamecap ? ### Input: CREATE TABLE table_204_561 ( id number, "fence" numbe...
which athlete has the most total ?
CREATE TABLE table_204_296 ( id number, "rank" number, "athlete" text, "qual" number, "final" number, "total" number, "notes" text )
SELECT "athlete" FROM table_204_296 ORDER BY "total" 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 athlete has the most total ? ### Input: CREATE TABLE table_204_296 ( id number, "rank" number, "athlete" t...
Name the score for madison square garden 18,828
CREATE TABLE table_22893781_6 ( score VARCHAR, location_attendance VARCHAR )
SELECT score FROM table_22893781_6 WHERE location_attendance = "Madison Square Garden 18,828"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the score for madison square garden 18,828 ### Input: CREATE TABLE table_22893781_6 ( score VARCHAR, location_a...
Posts with images hosted on ImageShack and 10+ score.
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ...
SELECT Posts.Id, Posts.Id AS "post_link", PostTypes.Name AS "type", Posts.Score, Posts.CreationDate, Posts.Tags FROM Posts JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Body LIKE '%<img%.https://archive.org/details/imageshack.us-20130319-043120%' AND Score >= 10 LIMIT 1000
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: Posts with images hosted on ImageShack and 10+ score. ### Input: CREATE TABLE PostTypes ( Id number, Name text ) CR...
What is the lenth (miles) of endpoints westlake/macarthur park to wilshire/western?
CREATE TABLE table_1817879_2 ( length__miles_ VARCHAR, endpoints VARCHAR )
SELECT length__miles_ FROM table_1817879_2 WHERE endpoints = "Westlake/MacArthur Park to Wilshire/Western"
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 lenth (miles) of endpoints westlake/macarthur park to wilshire/western? ### Input: CREATE TABLE table_1817879_2 ...
Who wrote the episode that was watched by 2.97 million U.S. viewers?
CREATE TABLE table_31396 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (million)" text )
SELECT "Written by" FROM table_31396 WHERE "U.S. viewers (million)" = '2.97'
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 wrote the episode that was watched by 2.97 million U.S. viewers? ### Input: CREATE TABLE table_31396 ( "No. in serie...
subjects should have fpg in the range of 6 to 11 mmol / l at screening and hba1c less than 10 % ( hba1c value according to international dcct standard ) .
CREATE TABLE table_train_280 ( "id" int, "fpg" float, "hemoglobin_a1c_hba1c" float, "heart_disease" bool, "renal_disease" bool, "hba1c" float, "body_mass_index_bmi" float, "NOUSE" float )
SELECT * FROM table_train_280 WHERE fpg >= 6 AND fpg <= 11 AND hemoglobin_a1c_hba1c < 10
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: subjects should have fpg in the range of 6 to 11 mmol / l at screening and hba1c less than 10 % ( hba1c value according to i...
provide the number of patients whose admission type is elective and drug name is fluconazole?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Fluconazole"
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 admission type is elective and drug name is fluconazole? ### Input: CREATE TABLE proced...
Who won the US Open in 1937?
CREATE TABLE table_197638_6 ( player VARCHAR, us_open VARCHAR )
SELECT player FROM table_197638_6 WHERE us_open = 1937
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 won the US Open in 1937? ### Input: CREATE TABLE table_197638_6 ( player VARCHAR, us_open VARCHAR ) ### Response...
What was the kickoff time on monday, may 13?
CREATE TABLE table_20782 ( "Week" real, "Date" text, "Kickoff" text, "Opponent" text, "Final score" text, "Team record" text, "Game site" text, "Attendance" real )
SELECT "Kickoff" FROM table_20782 WHERE "Date" = 'Monday, May 13'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the kickoff time on monday, may 13? ### Input: CREATE TABLE table_20782 ( "Week" real, "Date" text, "Ki...
Provide the number of patients who were admitted before the year 2123 and had a lab test nonsquamous epithelial cell.
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2123" AND lab.label = "NonSquamous Epithelial Cell"
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 who were admitted before the year 2123 and had a lab test nonsquamous epithelial cell. ### In...
Name the bruce coulter award for forrest kennerd
CREATE TABLE table_25321 ( "Game" text, "Date" text, "Champion" text, "Score" text, "Runner Up" text, "Stadium" text, "City" text, "Ted Morris Memorial Trophy (Game MVP)" text, "Bruce Coulter Award" text )
SELECT "Bruce Coulter Award" FROM table_25321 WHERE "Ted Morris Memorial Trophy (Game MVP)" = 'Forrest Kennerd'
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 bruce coulter award for forrest kennerd ### Input: CREATE TABLE table_25321 ( "Game" text, "Date" text, ...