instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
What are the ids and locations of all circuits in France or Belgium Show bar chart, and order in asc by the Y.
CREATE TABLE constructors ( constructorId INTEGER, constructorRef TEXT, name TEXT, nationality TEXT, url TEXT ) CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, position INTEGER, time TEXT, milliseconds INTEGER ) CREATE TABLE driverStandings ( driv...
SELECT location, circuitId FROM circuits WHERE country = "France" OR country = "Belgium" ORDER BY circuitId
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 ids and locations of all circuits in France or Belgium Show bar chart, and order in asc by the Y. ### Input: CR...
What was the incumbent for texas 19?
CREATE TABLE table_1341663_44 ( incumbent VARCHAR, district VARCHAR )
SELECT incumbent FROM table_1341663_44 WHERE district = "Texas 19"
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 incumbent for texas 19? ### Input: CREATE TABLE table_1341663_44 ( incumbent VARCHAR, district VARCHAR ...
Who is the runner(s)-up for a winning score of 3 (71-74-66-66=277)?
CREATE TABLE table_54299 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "Runner(s)-up" FROM table_54299 WHERE "Winning score" = '−3 (71-74-66-66=277)'
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 runner(s)-up for a winning score of 3 (71-74-66-66=277)? ### Input: CREATE TABLE table_54299 ( "Date" text, ...
Which team has an overall playoff of (0-0), a home record of (0-1) and played the Green Bay Blizzard team?
CREATE TABLE table_14558 ( "Opponent" text, "OVERALL" text, "HOME" text, "AWAY" text, "PLYFF" text )
SELECT "OVERALL" FROM table_14558 WHERE "PLYFF" = '(0-0)' AND "HOME" = '(0-1)' AND "Opponent" = 'green bay blizzard'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which team has an overall playoff of (0-0), a home record of (0-1) and played the Green Bay Blizzard team? ### Input: CREATE...
List the types of competition that have at most five competitions of that type.
CREATE TABLE competition ( competition_id number, year number, competition_type text, country text ) CREATE TABLE competition_result ( competition_id number, club_id_1 number, club_id_2 number, score text ) CREATE TABLE player ( player_id number, name text, position text, ...
SELECT competition_type FROM competition GROUP BY competition_type HAVING COUNT(*) <= 5
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 types of competition that have at most five competitions of that type. ### Input: CREATE TABLE competition ( co...
count the number of patients whose admission type is emergency and drug route is ih?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.route = "IH"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose admission type is emergency and drug route is ih? ### Input: CREATE TABLE prescriptions (...
What is the largest Attendance with a Loss of darling (0 1)?
CREATE TABLE table_name_35 ( attendance INTEGER, loss VARCHAR )
SELECT MAX(attendance) FROM table_name_35 WHERE loss = "darling (0–1)"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the largest Attendance with a Loss of darling (0 1)? ### Input: CREATE TABLE table_name_35 ( attendance INTEGER,...
how big is the difference in patient 6536's weight second measured on the last hospital visit compared to the first value measured on the last hospital visit?
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT (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 = 6536 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND cha...
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 big is the difference in patient 6536's weight second measured on the last hospital visit compared to the first value me...
how many patients whose insurance is self pay and days of hospital stay is greater than 26?
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.insurance = "Self Pay" AND demographic.days_stay > "26"
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 insurance is self pay and days of hospital stay is greater than 26? ### Input: CREATE TABLE lab ( ...
What Try bonus has a Points against of 488?
CREATE TABLE table_name_61 ( try_bonus VARCHAR, points_against VARCHAR )
SELECT try_bonus FROM table_name_61 WHERE points_against = "488"
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 Try bonus has a Points against of 488? ### Input: CREATE TABLE table_name_61 ( try_bonus VARCHAR, points_agains...
Which coach has 0 conference titles, more than 2 seasons, higher than 87 losses and 0 NCAA?
CREATE TABLE table_name_18 ( coach VARCHAR, ncaa VARCHAR, losses VARCHAR, conference_titles VARCHAR, seasons VARCHAR )
SELECT coach FROM table_name_18 WHERE conference_titles = "0" AND seasons > 2 AND losses > 87 AND ncaa = "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: Which coach has 0 conference titles, more than 2 seasons, higher than 87 losses and 0 NCAA? ### Input: CREATE TABLE table_na...
Which county has a membership of 1, a franchise type of corporation and a borough of Ennis?
CREATE TABLE table_24329520_8 ( county VARCHAR, borough VARCHAR, members VARCHAR, franchise_type VARCHAR )
SELECT county FROM table_24329520_8 WHERE members = 1 AND franchise_type = "Corporation" AND borough = "Ennis"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which county has a membership of 1, a franchise type of corporation and a borough of Ennis? ### Input: CREATE TABLE table_24...
Synonims created via 4 votes.
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTask...
SELECT * FROM TagSynonyms WHERE Score >= 4
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: Synonims created via 4 votes. ### Input: CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, U...
Which player has $450 and a score of 76-74-74-72=296?
CREATE TABLE table_name_67 ( player VARCHAR, money___$__ VARCHAR, score VARCHAR )
SELECT player FROM table_name_67 WHERE money___$__ = "450" AND score = 76 - 74 - 74 - 72 = 296
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which player has $450 and a score of 76-74-74-72=296? ### Input: CREATE TABLE table_name_67 ( player VARCHAR, money_...
where is citv located
CREATE TABLE table_1397655_1 ( city VARCHAR, station VARCHAR )
SELECT city 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: where is citv located ### Input: CREATE TABLE table_1397655_1 ( city VARCHAR, station VARCHAR ) ### Response: SELECT...
When was andrea g miz the opponent?
CREATE TABLE table_55487 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
SELECT "Date" FROM table_55487 WHERE "Opponent" = 'andrea gámiz'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was andrea g miz the opponent? ### Input: CREATE TABLE table_55487 ( "Outcome" text, "Date" text, "Tourname...
Name the opponent with score of 1 6, 6 4, 6 4
CREATE TABLE table_name_7 ( opponent VARCHAR, score VARCHAR )
SELECT opponent FROM table_name_7 WHERE score = "1–6, 6–4, 6–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: Name the opponent with score of 1 6, 6 4, 6 4 ### Input: CREATE TABLE table_name_7 ( opponent VARCHAR, score VARCHAR...
What is the mean number of laps where time/retired was +1:05.564?
CREATE TABLE table_10428 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT AVG("Laps") FROM table_10428 WHERE "Time/Retired" = '+1:05.564'
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 mean number of laps where time/retired was +1:05.564? ### Input: CREATE TABLE table_10428 ( "Driver" text, ...
How many U.S. viewers (million) watched the episode directed by Allison Liddi-Brown?
CREATE TABLE table_27116696_1 ( us_viewers__million_ VARCHAR, directed_by VARCHAR )
SELECT us_viewers__million_ FROM table_27116696_1 WHERE directed_by = "Allison Liddi-Brown"
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 U.S. viewers (million) watched the episode directed by Allison Liddi-Brown? ### Input: CREATE TABLE table_27116696_...
When playing at the Kardinia Park; what was the home teams score?
CREATE TABLE table_11634 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Home team score" FROM table_11634 WHERE "Venue" = 'kardinia park'
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 playing at the Kardinia Park; what was the home teams score? ### Input: CREATE TABLE table_11634 ( "Home team" text...
Find the captain rank that has no captain in Third-rate ship of the line class.
CREATE TABLE ship ( ship_id number, name text, type text, built_year number, class text, flag text ) CREATE TABLE captain ( captain_id number, name text, ship_id number, age text, class text, rank text )
SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE class = 'Third-rate ship of the line'
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the captain rank that has no captain in Third-rate ship of the line class. ### Input: CREATE TABLE ship ( ship_id n...
What was the prize pool in New Orleans?
CREATE TABLE table_2715355_1 ( total_prize_pool VARCHAR, location VARCHAR )
SELECT total_prize_pool FROM table_2715355_1 WHERE location = "New Orleans"
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 prize pool in New Orleans? ### Input: CREATE TABLE table_2715355_1 ( total_prize_pool VARCHAR, location...
A bar chart for what are the number of the order dates of orders with price higher than 1000?
CREATE TABLE Addresses ( Address_ID VARCHAR(100), Line_1 VARCHAR(255), Line_2 VARCHAR(255), City_Town VARCHAR(255), State_County VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Service_Types ( Service_Type_Code CHAR(15), Parent_Service_Type_Code CHAR(15), Service_Type_De...
SELECT Order_Date, COUNT(Order_Date) FROM Customer_Orders AS T1 JOIN Order_Items AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_Price > 1000
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 order dates of orders with price higher than 1000? ### Input: CREATE TABLE Addres...
Draw a bar chart of first name versus manager_id, could you rank in desc by the y-axis?
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY MANAGER_ID DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart of first name versus manager_id, could you rank in desc by the y-axis? ### Input: CREATE TABLE regions ( ...
What was CTE Racing-hvm's Best with a Qual 2 of 50.312?
CREATE TABLE table_33527 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" text, "Best" real )
SELECT "Best" FROM table_33527 WHERE "Team" = 'cte racing-hvm' AND "Qual 2" = '50.312'
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 CTE Racing-hvm's Best with a Qual 2 of 50.312? ### Input: CREATE TABLE table_33527 ( "Name" text, "Team" te...
What is every value for points if rebounds is 6 and blocks is 0?
CREATE TABLE table_25352324_5 ( points VARCHAR, rebounds VARCHAR, blocks VARCHAR )
SELECT points FROM table_25352324_5 WHERE rebounds = 6 AND blocks = 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every value for points if rebounds is 6 and blocks is 0? ### Input: CREATE TABLE table_25352324_5 ( points VARCH...
WHAT IS THE TO PAR WITH A FINISH OF T11, FOR DAVID GRAHAM?
CREATE TABLE table_77328 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real, "Finish" text )
SELECT "To par" FROM table_77328 WHERE "Finish" = 't11' AND "Player" = 'david graham'
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 TO PAR WITH A FINISH OF T11, FOR DAVID GRAHAM? ### Input: CREATE TABLE table_77328 ( "Player" text, "Cou...
What is the total number of Total, when Club is Leeds United, and when League Goals is 13?
CREATE TABLE table_76537 ( "Scorer" text, "Club" text, "League goals" text, "FA Cup goals" text, "League Cup goals" real, "Texaco Cup goals" text, "Euro competitions" text, "Total" real )
SELECT COUNT("Total") FROM table_76537 WHERE "Club" = 'leeds united' AND "League goals" = '13'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of Total, when Club is Leeds United, and when League Goals is 13? ### Input: CREATE TABLE table_765...
Which owner has the frequency of 103.3 FM?
CREATE TABLE table_54804 ( "Frequency" text, "Call sign" text, "Name" text, "Format" text, "Owner" text )
SELECT "Owner" FROM table_54804 WHERE "Frequency" = '103.3 fm'
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 owner has the frequency of 103.3 FM? ### Input: CREATE TABLE table_54804 ( "Frequency" text, "Call sign" text,...
What Away Competition had a Result of lost 2-4?
CREATE TABLE table_7905 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" text, "Competition" text, "Man of the Match" text )
SELECT "Competition" FROM table_7905 WHERE "Venue" = 'away' AND "Result" = 'lost 2-4'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Away Competition had a Result of lost 2-4? ### Input: CREATE TABLE table_7905 ( "Date" text, "Opponent" text, ...
Who won the Mens Singles when the Mixed doubles went to Stellan Mohlin Kerstin St hl , Aik?
CREATE TABLE table_17582 ( "Season" text, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
SELECT "Mens singles" FROM table_17582 WHERE "Mixed doubles" = 'Stellan Mohlin Kerstin Ståhl , AIK'
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 the Mens Singles when the Mixed doubles went to Stellan Mohlin Kerstin St hl , Aik? ### Input: CREATE TABLE table_17...
tell me the number of patients who had been prescribed potassium chloride inj this year.
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'potassium chloride inj' AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: tell me the number of patients who had been prescribed potassium chloride inj this year. ### Input: CREATE TABLE microlab ( ...
no type i patients
CREATE TABLE table_train_198 ( "id" int, "hemoglobin_a1c_hba1c" float, "fasting_plasma_glucose" int, "diabetes" bool, "body_mass_index_bmi" float, "type_1_patients" bool, "NOUSE" float )
SELECT * FROM table_train_198 WHERE type_1_patients = 0
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: no type i patients ### Input: CREATE TABLE table_train_198 ( "id" int, "hemoglobin_a1c_hba1c" float, "fasting_pl...
Name the minoru for block A being koji kanemoto
CREATE TABLE table_name_38 ( minoru VARCHAR, block_a VARCHAR )
SELECT minoru FROM table_name_38 WHERE block_a = "koji kanemoto"
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 minoru for block A being koji kanemoto ### Input: CREATE TABLE table_name_38 ( minoru VARCHAR, block_a VARC...
which institutions can be categorized as private/united church of christ?
CREATE TABLE table_261895_1 ( institution VARCHAR, type VARCHAR )
SELECT institution FROM table_261895_1 WHERE type = "Private/United Church of Christ"
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 institutions can be categorized as private/united church of christ? ### Input: CREATE TABLE table_261895_1 ( insti...
give me the cheapest one way flights between BOSTON and PHILADELPHIA which arrive after 1200 on a TUESDAY
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE flight_stop ( flight_id in...
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, days, fare, flight, flight_fare WHERE ((((((flight.arrival_time < flight.departure_time) AND days.day_name = 'MONDAY' AND flight.flight_days = days.days_code) OR (days.day_na...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the cheapest one way flights between BOSTON and PHILADELPHIA which arrive after 1200 on a TUESDAY ### Input: CREATE ...
Who is the winning pitcher when attendance is 38109?
CREATE TABLE table_12125069_2 ( winning_pitcher VARCHAR, attendance VARCHAR )
SELECT winning_pitcher FROM table_12125069_2 WHERE attendance = 38109
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 winning pitcher when attendance is 38109? ### Input: CREATE TABLE table_12125069_2 ( winning_pitcher VARCHAR,...
What is score of the game played in place t8 with Byron Nelson playing?
CREATE TABLE table_name_20 ( score VARCHAR, place VARCHAR, player VARCHAR )
SELECT score FROM table_name_20 WHERE place = "t8" AND player = "byron nelson"
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 score of the game played in place t8 with Byron Nelson playing? ### Input: CREATE TABLE table_name_20 ( score VA...
what were the top five most common output events a year before?
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
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 WHERE DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY outputevents.itemid) AS...
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 were the top five most common output events a year before? ### Input: CREATE TABLE transfers ( row_id number, s...
Name the ted morris memorial trophy 34th game
CREATE TABLE table_25319 ( "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 "Ted Morris Memorial Trophy (Game MVP)" FROM table_25319 WHERE "Game" = '34th'
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 ted morris memorial trophy 34th game ### Input: CREATE TABLE table_25319 ( "Game" text, "Date" text, "C...
coauthors of Noah A Smith
CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE field ( fie...
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'Noah A Smith' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
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: coauthors of Noah A Smith ### Input: CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE...
Developer in Israel That Do C++/C#. Users with Israel in their location who are active in C++/C#, sorted by rep (having more than 100 rep)
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, Rejectio...
SELECT Users.DisplayName, Users.Reputation, Users.Id AS ID, Users.WebsiteUrl FROM Users JOIN (SELECT Users.Id AS UserId FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Users ON Users.Id = Posts.OwnerUserId WHERE (PostTags.TagId = 10 OR PostTags.TagId = 9) GROUP BY Users.Id) AS TopicUsers ON UserId = Users.I...
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: Developer in Israel That Do C++/C#. Users with Israel in their location who are active in C++/C#, sorted by rep (having more...
what is the to par for Dave hill?
CREATE TABLE table_49338 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
SELECT "To par" FROM table_49338 WHERE "Player" = 'dave hill'
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 to par for Dave hill? ### Input: CREATE TABLE table_49338 ( "Place" text, "Player" text, "Country" t...
What is the average final with an all around greater than 19.35 and a total over 40?
CREATE TABLE table_60943 ( "Place" real, "Nation" text, "All Around" real, "Final" real, "Total" real )
SELECT AVG("Final") FROM table_60943 WHERE "All Around" > '19.35' AND "Total" > '40'
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 final with an all around greater than 19.35 and a total over 40? ### Input: CREATE TABLE table_60943 ( ...
who is the opponent when the score is 7 5, 7 6 (8 6)?
CREATE TABLE table_name_86 ( opponent VARCHAR, score VARCHAR )
SELECT opponent FROM table_name_86 WHERE score = "7–5, 7–6 (8–6)"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who is the opponent when the score is 7 5, 7 6 (8 6)? ### Input: CREATE TABLE table_name_86 ( opponent VARCHAR, scor...
What teachers are offering Other classes next Winter ?
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, ...
SELECT DISTINCT instructor.name 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_offering.course_id INNER JOIN offering_instructor ON offering_instr...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What teachers are offering Other classes next Winter ? ### Input: CREATE TABLE area ( course_id int, area varchar ) ...
Give the maximum price and score for wines produced in the appelation St. Helena.
CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE appellations ( no numbe...
SELECT MAX(price), MAX(score) FROM wine WHERE appelation = "St. Helena"
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give the maximum price and score for wines produced in the appelation St. Helena. ### Input: CREATE TABLE grapes ( id nu...
What is the Papal name of the Pope announced as Ioannis Pauli Primi?
CREATE TABLE table_22083 ( "Birth Name" text, "Birth Name As Announced in Latin (Accusative case Forename Undeclined Surname)" text, "Papal Name" text, "Papal Name As Announced in Latin" text, "Latin declension of Papal Name" text, "Numeral in Papal Name" text )
SELECT "Papal Name" FROM table_22083 WHERE "Papal Name As Announced in Latin" = 'Ioannis Pauli primi'
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 Papal name of the Pope announced as Ioannis Pauli Primi? ### Input: CREATE TABLE table_22083 ( "Birth Name" ...
What is the attendance of the match with F.C. central chugoku as the home team?
CREATE TABLE table_name_24 ( attendance VARCHAR, home_team VARCHAR )
SELECT attendance FROM table_name_24 WHERE home_team = "f.c. central chugoku"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the attendance of the match with F.C. central chugoku as the home team? ### Input: CREATE TABLE table_name_24 ( ...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JO...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ...
WHAT IS THE ABBR WITH VOTES OF 11.2% IN 2011?
CREATE TABLE table_49040 ( "Name (English)" text, "Name (German)" text, "Abbr." text, "Ideology" text, "Position" text, "Votes (2011)" text, "Seats in Hamburgische B\u00fcrgerschaft" real )
SELECT "Abbr." FROM table_49040 WHERE "Votes (2011)" = '11.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 IS THE ABBR WITH VOTES OF 11.2% IN 2011? ### Input: CREATE TABLE table_49040 ( "Name (English)" text, "Name (Ge...
Which athlete had a six month suspension from IIHF?
CREATE TABLE table_name_55 ( athlete VARCHAR, punishment VARCHAR )
SELECT athlete FROM table_name_55 WHERE punishment = "six month suspension from iihf"
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 athlete had a six month suspension from IIHF? ### Input: CREATE TABLE table_name_55 ( athlete VARCHAR, punishm...
Can you tell me the sum of Money ($) that has the Score of 69-72-67-71=279, and the Player of loren roberts?
CREATE TABLE table_12086 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
SELECT SUM("Money ( $ )") FROM table_12086 WHERE "Score" = '69-72-67-71=279' AND "Player" = 'loren roberts'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Can you tell me the sum of Money ($) that has the Score of 69-72-67-71=279, and the Player of loren roberts? ### Input: CREA...
look for the number of patients taking drug via pr route who were admitted before 2155.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2155" AND prescriptions.route = "PR"
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: look for the number of patients taking drug via pr route who were admitted before 2155. ### Input: CREATE TABLE lab ( su...
What is the location and attendance of the game with a 3-1-0 record?
CREATE TABLE table_name_6 ( location_attendance VARCHAR, record VARCHAR )
SELECT location_attendance FROM table_name_6 WHERE record = "3-1-0"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the location and attendance of the game with a 3-1-0 record? ### Input: CREATE TABLE table_name_6 ( location_att...
What is the title of the episode directed by Linda Mendoza?
CREATE TABLE table_27768 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text )
SELECT "Title" FROM table_27768 WHERE "Directed by" = 'Linda Mendoza'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the title of the episode directed by Linda Mendoza? ### Input: CREATE TABLE table_27768 ( "Series #" real, "...
What is the number of booking start dates of the apartments with type code 'Duplex' in each year? Return a bar chart, show y axis in ascending order.
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_star...
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of booking start dates of the apartments with type code 'Duplex' in each year? Return a bar chart, show y...
give me the number of patients admitted to the hospital before 2167 with the procedure icd9 code 3532.
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.icd9_code = "3532"
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 admitted to the hospital before 2167 with the procedure icd9 code 3532. ### Input: CREATE TAB...
how many patients whose ethnicity is asian and year of death is less than or equal to 2155?
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 WHERE demographic.ethnicity = "ASIAN" AND demographic.dod_year <= "2155.0"
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 ethnicity is asian and year of death is less than or equal to 2155? ### Input: CREATE TABLE procedur...
what is the average wins when the podiums is more than 1, points is 80 and starts is less than 28?
CREATE TABLE table_name_49 ( wins INTEGER, starts VARCHAR, podiums VARCHAR, points VARCHAR )
SELECT AVG(wins) FROM table_name_49 WHERE podiums > 1 AND points = 80 AND starts < 28
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the average wins when the podiums is more than 1, points is 80 and starts is less than 28? ### Input: CREATE TABLE t...
How many contestants were there on March 1, 2009 during the season premiere?
CREATE TABLE table_75309 ( "Season" text, "Season Premiere" text, "Season Finale" text, "Winner" text, "Runner-up" text, "Number of Contestants" real, "Winner's Country" text, "Runner Up's Country" text )
SELECT SUM("Number of Contestants") FROM table_75309 WHERE "Season Premiere" = 'march 1, 2009'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many contestants were there on March 1, 2009 during the season premiere? ### Input: CREATE TABLE table_75309 ( "Seas...
What intelligent systems classes are required prior to taking 463 ?
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_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.pre_course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.course_id INNER JOIN area ON COURSE_0.course_id = area.course_id ...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What intelligent systems classes are required prior to taking 463 ? ### Input: CREATE TABLE offering_instructor ( offeri...
Who was the man of the match when the Rockets won by 9 wickets?
CREATE TABLE table_23083 ( "Scorecard" real, "Date" text, "Venue" text, "Team 1" text, "Team 2" text, "Result" text, "Man of the Match" text )
SELECT "Man of the Match" FROM table_23083 WHERE "Result" = 'Rockets won by 9 wickets'
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 man of the match when the Rockets won by 9 wickets? ### Input: CREATE TABLE table_23083 ( "Scorecard" real, ...
What is the try bonus when there were 58 points?
CREATE TABLE table_70632 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT "Try bonus" FROM table_70632 WHERE "Points" = '58'
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 try bonus when there were 58 points? ### Input: CREATE TABLE table_70632 ( "Club" text, "Played" text, ...
Which network returns april 3, and a Show of shop 'til you drop?
CREATE TABLE table_50874 ( "Show" text, "Last Aired" real, "Previous Network" text, "Retitled as/Same" text, "New/Returning/Same Network" text, "Returning" text )
SELECT "New/Returning/Same Network" FROM table_50874 WHERE "Returning" = 'april 3' AND "Show" = 'shop ''til you drop'
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 network returns april 3, and a Show of shop 'til you drop? ### Input: CREATE TABLE table_50874 ( "Show" text, ...
provide the number of patients whose gender is m and lab test name is potassium, whole blood?
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.label = "Potassium, Whole Blood"
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 gender is m and lab test name is potassium, whole blood? ### Input: CREATE TABLE lab ( ...
What was the score of the other team that played Geelong?
CREATE TABLE table_10333 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team score" FROM table_10333 WHERE "Home team" = 'geelong'
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 of the other team that played Geelong? ### Input: CREATE TABLE table_10333 ( "Home team" text, "H...
From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?
CREATE TABLE document_types ( document_type_code text, document_description text ) CREATE TABLE projects ( project_id number, organisation_id number, project_details text ) CREATE TABLE research_outcomes ( outcome_code text, outcome_description text ) CREATE TABLE grants ( grant_id nu...
SELECT date_from, date_to FROM project_staff WHERE project_id IN (SELECT project_id FROM project_staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM project_staff WHERE role_code = 'leader'
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: From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role? ### I...
get the number of white-russian patients admitted before the year 2150.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.admityear < "2150"
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 the number of white-russian patients admitted before the year 2150. ### Input: CREATE TABLE prescriptions ( subject_...
hba1c of 6.5 to 8
CREATE TABLE table_train_233 ( "id" int, "serum_bicarbonate" int, "language" string, "hemoglobin_a1c_hba1c" float, "creatinine_clearance_cl" float, "admission_blood_glucose" int, "urine_albumin" int, "ketoacidosis" bool, "age" float, "NOUSE" float )
SELECT * FROM table_train_233 WHERE hemoglobin_a1c_hba1c >= 6.5 AND hemoglobin_a1c_hba1c <= 8
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: hba1c of 6.5 to 8 ### Input: CREATE TABLE table_train_233 ( "id" int, "serum_bicarbonate" int, "language" string...
What to par has t3 as the place and england as the country?
CREATE TABLE table_name_96 ( to_par VARCHAR, place VARCHAR, country VARCHAR )
SELECT to_par FROM table_name_96 WHERE place = "t3" AND country = "england"
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 to par has t3 as the place and england as the country? ### Input: CREATE TABLE table_name_96 ( to_par VARCHAR, ...
What is the total round of the 129 pick?
CREATE TABLE table_name_49 ( round VARCHAR, pick__number VARCHAR )
SELECT COUNT(round) FROM table_name_49 WHERE pick__number = 129
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 round of the 129 pick? ### Input: CREATE TABLE table_name_49 ( round VARCHAR, pick__number VARCHAR...
What are the purchase details of transactions with amount bigger than 10000, and count them by a bar chart, order by the bar from high to low.
CREATE TABLE Sales ( sales_transaction_id INTEGER, sales_details VARCHAR(255) ) CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_...
SELECT purchase_details, COUNT(purchase_details) FROM Purchases AS T1 JOIN Transactions AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 GROUP BY purchase_details ORDER BY purchase_details 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 purchase details of transactions with amount bigger than 10000, and count them by a bar chart, order by the bar...
Top 100 most recent closed posts. Demo for R package RStackExchange
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT Title FROM Posts ORDER BY ClosedDate DESC LIMIT 100
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 100 most recent closed posts. Demo for R package RStackExchange ### Input: CREATE TABLE PostsWithDeleted ( Id number...
moderate to severe renal impairment ( crea level > 1.7 mg / dl or glomerular filtration rate < 35 ml / min ) .
CREATE TABLE table_test_16 ( "id" int, "left_ventricular_ejection_fraction_lvef" int, "systolic_blood_pressure_sbp" int, "severe_hypertension" bool, "adrenaline" bool, "stroke" bool, "renal_disease" bool, "severe_uncontrolled_arterial_hypertension" bool, "hepatic_disease" bool, "...
SELECT * FROM table_test_16 WHERE renal_disease = 1 OR (creatinine_clearance_cl > 1.7 OR estimated_glomerular_filtration_rate_egfr < 35)
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: moderate to severe renal impairment ( crea level > 1.7 mg / dl or glomerular filtration rate < 35 ml / min ) . ### Input: CR...
how many finished all 225 laps ?
CREATE TABLE table_204_946 ( id number, "pos" number, "no" number, "driver" text, "team" text, "laps" number, "time/retired" text, "grid" number, "points" number )
SELECT COUNT(*) FROM table_204_946 WHERE "laps" = 225
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 finished all 225 laps ? ### Input: CREATE TABLE table_204_946 ( id number, "pos" number, "no" number, ...
How tall is the building built in 1985 with 22 floors?
CREATE TABLE table_name_44 ( height_ft__m_ VARCHAR, floors VARCHAR, year VARCHAR )
SELECT height_ft__m_ FROM table_name_44 WHERE floors = 22 AND year = 1985
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How tall is the building built in 1985 with 22 floors? ### Input: CREATE TABLE table_name_44 ( height_ft__m_ VARCHAR, ...
What is the Team in Game 38?
CREATE TABLE table_name_46 ( team VARCHAR, game VARCHAR )
SELECT team FROM table_name_46 WHERE game = 38
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 Team in Game 38? ### Input: CREATE TABLE table_name_46 ( team VARCHAR, game VARCHAR ) ### Response: SELE...
Which Date has a Result of w, and a Score of 3-0?
CREATE TABLE table_37479 ( "Date" text, "City" text, "Result" text, "Score" text, "Competition" text )
SELECT "Date" FROM table_37479 WHERE "Result" = 'w' AND "Score" = '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: Which Date has a Result of w, and a Score of 3-0? ### Input: CREATE TABLE table_37479 ( "Date" text, "City" text, ...
Comments asking the downvoter to explain.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDa...
SELECT Comments.Id AS "comment_link", Comments.UserId AS "user_link", Posts.ClosedDate AS Closed, Comments.CreationDate FROM Comments INNER JOIN Posts ON Comments.PostId = Posts.Id WHERE (LOWER(Text) LIKE '%@downvoter%' OR LOWER(Text) LIKE '%downvoter%' OR LOWER(Text) LIKE '%the downvote%' OR LOWER(Text) LIKE '%downvot...
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: Comments asking the downvoter to explain. ### Input: CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
Show different nominees and the number of musicals they have been nominated Plot them as bar chart, and could you order the total number in desc order?
CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text )
SELECT Nominee, COUNT(*) FROM musical GROUP BY Nominee ORDER BY COUNT(*) 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 different nominees and the number of musicals they have been nominated Plot them as bar chart, and could you order the ...
What are the lowest points in 2004?
CREATE TABLE table_name_96 ( points INTEGER, year VARCHAR )
SELECT MIN(points) FROM table_name_96 WHERE year = 2004
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the lowest points in 2004? ### Input: CREATE TABLE table_name_96 ( points INTEGER, year VARCHAR ) ### Respo...
What is the one mora for the three-mora word /kaze/ [k z ]?
CREATE TABLE table_66921 ( "!accented mora" text, "one mora" text, "two-mora word" text, "three-mora word" text, "gloss" text )
SELECT "one mora" FROM table_66921 WHERE "three-mora word" = '/kaze/ [kázé]'
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 one mora for the three-mora word /kaze/ [k z ]? ### Input: CREATE TABLE table_66921 ( "!accented mora" text,...
How many allsvenskan titles did club aik have after its introduction after 2000, with stars symbolizing the number of swedish championship titles ?
CREATE TABLE table_name_78 ( allsvenskan_titles INTEGER, introduced VARCHAR, stars_symbolizes VARCHAR, club VARCHAR )
SELECT SUM(allsvenskan_titles) FROM table_name_78 WHERE stars_symbolizes = "number of swedish championship titles" AND club = "aik" AND introduced > 2000
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many allsvenskan titles did club aik have after its introduction after 2000, with stars symbolizing the number of swedis...
tell me the cost of a upper respiratory obstruction diagnosis?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid numb...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'upper respiratory obstruction')
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: tell me the cost of a upper respiratory obstruction diagnosis? ### Input: CREATE TABLE medication ( medicationid number,...
Can you really own things?.
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId n...
SELECT Id AS "post_link", OwnerUserId, OwnerDisplayName, CommunityOwnedDate FROM Posts WHERE Id = '##PostId##'
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: Can you really own things?. ### Input: CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, ...
In what Year was the Game on September 26?
CREATE TABLE table_name_54 ( year INTEGER, date VARCHAR )
SELECT SUM(year) FROM table_name_54 WHERE date = "september 26"
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: In what Year was the Game on September 26? ### Input: CREATE TABLE table_name_54 ( year INTEGER, date VARCHAR ) ### ...
Which date had a year under 1988, loser of Philadelphia Eagles, location of Giants Stadium, and a result of 21-0?
CREATE TABLE table_name_68 ( date VARCHAR, result VARCHAR, location VARCHAR, year VARCHAR, loser VARCHAR )
SELECT date FROM table_name_68 WHERE year < 1988 AND loser = "philadelphia eagles" AND location = "giants stadium" AND result = "21-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: Which date had a year under 1988, loser of Philadelphia Eagles, location of Giants Stadium, and a result of 21-0? ### Input:...
in the previous year, what are the top three most frequently prescribed drugs to patients in the same month after receiving other gastrostomy?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, su...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime 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 ...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: in the previous year, what are the top three most frequently prescribed drugs to patients in the same month after receiving ...
Name the gender for elsthorpe school
CREATE TABLE table_name_63 ( gender VARCHAR, name VARCHAR )
SELECT gender FROM table_name_63 WHERE name = "elsthorpe school"
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 gender for elsthorpe school ### Input: CREATE TABLE table_name_63 ( gender VARCHAR, name VARCHAR ) ### Resp...
What was the founding of navy blue?
CREATE TABLE table_16916 ( "Institution" text, "Nickname" text, "Status" text, "Founded" real, "Color" text, "Location" text )
SELECT "Founded" FROM table_16916 WHERE "Color" = 'Navy Blue'
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 founding of navy blue? ### Input: CREATE TABLE table_16916 ( "Institution" text, "Nickname" text, "...
Count the number of people of each sex who have a weight higher than 85 by a bar chart, and I want to order by the X in asc.
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate re...
SELECT Sex, COUNT(*) FROM people WHERE Weight > 85 GROUP BY Sex ORDER BY Sex
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Count the number of people of each sex who have a weight higher than 85 by a bar chart, and I want to order by the X in asc....
What episode number of the season was 'The Northern Uprising'?
CREATE TABLE table_16102 ( "No. in series" real, "No. in season" real, "Title" text, "Setting" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT "No. in season" FROM table_16102 WHERE "Title" = 'The Northern Uprising'
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 episode number of the season was 'The Northern Uprising'? ### Input: CREATE TABLE table_16102 ( "No. in series" rea...
What is the original of the ipa ( rio de janeiro )translation ki mo t a w n t t i t n ?
CREATE TABLE table_26383 ( "Original" text, "IPA ( Lisbon )" text, "IPA ( Rio de Janeiro )" text, "IPA ( S\u00e3o Paulo )" text, "IPA ( Santiago de Compostela )" text, "Translation" text )
SELECT "Translation" FROM table_26383 WHERE "IPA ( Rio de Janeiro )" = 'ki̥ mo̞ɕˈtɾaɾɜ̃w̃ nɐ ˈtɛʁə tɕĩʑiˈtɜ̃nə'
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 of the ipa ( rio de janeiro )translation ki mo t a w n t t i t n ? ### Input: CREATE TABLE table_26383 ...
What is the qual with a rank 9?
CREATE TABLE table_name_9 ( qual VARCHAR, rank VARCHAR )
SELECT qual FROM table_name_9 WHERE rank = "9"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the qual with a rank 9? ### Input: CREATE TABLE table_name_9 ( qual VARCHAR, rank VARCHAR ) ### Response: SE...
Questions with multiple bounties by the same user.
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConce...
SELECT questions.Id AS "post_link", Votes.UserId AS "user_link", 'site://posts/' + CAST(questions.Id AS TEXT) + '/timeline|timeline' AS "Timeline link", COUNT(*) AS "Number of bounties" FROM Posts AS questions LEFT JOIN Votes AS votes ON Votes.PostId = questions.Id WHERE Votes.VoteTypeId = 8 GROUP BY questions.Id, Vote...
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: Questions with multiple bounties by the same user. ### Input: CREATE TABLE ReviewTaskResultTypes ( Id number, Name t...
What are the names and ages of artists? Show the result in a bar graph, and sort by the total number in ascending.
CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real...
SELECT Name, Age FROM artist ORDER BY Age
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 names and ages of artists? Show the result in a bar graph, and sort by the total number in ascending. ### Input...
provide the number of patients whose drug code is levobase3?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "LEVOBASE3"
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 drug code is levobase3? ### Input: CREATE TABLE prescriptions ( subject_id text, ...
count the number of patients whose ethnicity is hispanic or latino and procedure icd9 code is 3950?
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND procedures.icd9_code = "3950"
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 ethnicity is hispanic or latino and procedure icd9 code is 3950? ### Input: CREATE TABLE ...
what is marital status and date of birth of subject id 92796?
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 demographic.marital_status, demographic.dob FROM demographic WHERE demographic.subject_id = "92796"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is marital status and date of birth of subject id 92796? ### Input: CREATE TABLE procedures ( subject_id text, ...