instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
What's the lowest total when there's less than 16 bronze and more than 6 silver?
CREATE TABLE table_name_13 ( total INTEGER, bronze VARCHAR, silver VARCHAR )
SELECT MIN(total) FROM table_name_13 WHERE bronze < 16 AND silver > 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: What's the lowest total when there's less than 16 bronze and more than 6 silver? ### Input: CREATE TABLE table_name_13 ( ...
What is the award type for all Lowe awards?
CREATE TABLE table_69966 ( "Date" text, "Country" text, "Name" text, "Award" text, "Notes" text )
SELECT "Award" FROM table_69966 WHERE "Name" = 'lowe'
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 award type for all Lowe awards? ### Input: CREATE TABLE table_69966 ( "Date" text, "Country" text, "...
What was the reading score in the year the science score was 96.13?
CREATE TABLE table_27576 ( "School Year" text, "Language" text, "Science" text, "Reading" text, "Mathematics" text, "Social Studies" text )
SELECT "Reading" FROM table_27576 WHERE "Science" = '96.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 reading score in the year the science score was 96.13? ### Input: CREATE TABLE table_27576 ( "School Year" ...
What Mayor is from the KRF Party?
CREATE TABLE table_35421 ( "Name" text, "Innhabitants" real, "Area" real, "Mayor" text, "Party" text, "Municipal code" real, "Language form" text )
SELECT "Mayor" FROM table_35421 WHERE "Party" = 'krf'
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 Mayor is from the KRF Party? ### Input: CREATE TABLE table_35421 ( "Name" text, "Innhabitants" real, "Area"...
which township in pope county , arkansas has the smallest population ?
CREATE TABLE table_203_510 ( id number, "township" text, "fips" number, "population\ncenter" text, "population" number, "population\ndensity\n(/mi2)" number, "population\ndensity\n(/km2)" number, "land area\n(mi2)" number, "land area\n(km2)" number, "water area\n(mi2)" number, ...
SELECT "township" FROM table_203_510 ORDER BY "population" 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 township in pope county , arkansas has the smallest population ? ### Input: CREATE TABLE table_203_510 ( id number...
What Australian sound is equivalent to e / /?
CREATE TABLE table_59742 ( "Short vowels" text, "17th-c." text, "American" text, "British" text, "Australian" text )
SELECT "Australian" FROM table_59742 WHERE "Short vowels" = 'e /ɛ/'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Australian sound is equivalent to e / /? ### Input: CREATE TABLE table_59742 ( "Short vowels" text, "17th-c." t...
For the attribute All_Neutral and ACC_Percent, show their proportion by a pie chart.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Neutral, ACC_Percent FROM basketball_match
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 the attribute All_Neutral and ACC_Percent, show their proportion by a pie chart. ### Input: CREATE TABLE university ( ...
What is the winning score of the match with a margin of 3 strokes?
CREATE TABLE table_name_39 ( winning_score VARCHAR, margin VARCHAR )
SELECT winning_score FROM table_name_39 WHERE margin = "3 strokes"
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 winning score of the match with a margin of 3 strokes? ### Input: CREATE TABLE table_name_39 ( winning_score...
What is the minimum number of opponents?
CREATE TABLE table_73057 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Giants points" real, "Opponents" real, "Record" text, "Attendance" real )
SELECT MIN("Opponents") FROM table_73057
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 minimum number of opponents? ### Input: CREATE TABLE table_73057 ( "Game" real, "Date" text, "Oppone...
what is the monthly maximum of the weight of patient 012-58944 during the first hospital visit?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
SELECT MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-58944' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1) AND NOT patient.admissionweight IS NULL GROUP...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the monthly maximum of the weight of patient 012-58944 during the first hospital visit? ### Input: CREATE TABLE diag...
What two players had the highest rebounds for the October 14 game?
CREATE TABLE table_74185 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "High rebounds" FROM table_74185 WHERE "Date" = 'October 14'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What two players had the highest rebounds for the October 14 game? ### Input: CREATE TABLE table_74185 ( "Game" real, ...
What pole position did 2006 gehl championship finale have?
CREATE TABLE table_45447 ( "Round" real, "Race Name" text, "Pole position" text, "Winning driver" text, "Winning Team" text )
SELECT "Pole position" FROM table_45447 WHERE "Race Name" = '2006 gehl championship finale'
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 pole position did 2006 gehl championship finale have? ### Input: CREATE TABLE table_45447 ( "Round" real, "Race...
What is the Away captain with a Venue that is old trafford?
CREATE TABLE table_7302 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text )
SELECT "Away captain" FROM table_7302 WHERE "Venue" = 'old trafford'
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 Away captain with a Venue that is old trafford? ### Input: CREATE TABLE table_7302 ( "Date" text, "Home ...
Name the title for production code 2t6908
CREATE TABLE table_18569389_1 ( title VARCHAR, production_code VARCHAR )
SELECT title FROM table_18569389_1 WHERE production_code = "2T6908"
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 title for production code 2t6908 ### Input: CREATE TABLE table_18569389_1 ( title VARCHAR, production_code ...
What is the intergiro classification of stage 21?
CREATE TABLE table_12261926_2 ( intergiro_classification VARCHAR, stage VARCHAR )
SELECT intergiro_classification FROM table_12261926_2 WHERE stage = 21
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 intergiro classification of stage 21? ### Input: CREATE TABLE table_12261926_2 ( intergiro_classification VA...
Give the minimum age of patients whose admission type is urgent and were born before the year 2175.
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 MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.dob_year > "2175"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give the minimum age of patients whose admission type is urgent and were born before the year 2175. ### Input: CREATE TABLE ...
show me the latest flight on wednesday from ATLANTA to WASHINGTON
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 23 AND date_day.month_number = 4 A...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the latest flight on wednesday from ATLANTA to WASHINGTON ### Input: CREATE TABLE airport_service ( city_code va...
A bar chart about what are the memories and carriers of phones?, and order by the Y-axis in descending.
CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Rankin...
SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY SUM(Memory_in_G) 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 about what are the memories and carriers of phones?, and order by the Y-axis in descending. ### Input: CREATE TA...
how many patients admitted before 2155 are diagnosed with other specified gastritis, with hemorrhage?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2155" AND diagnoses.long_title = "Other specified gastritis, with hemorrhage"
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 admitted before 2155 are diagnosed with other specified gastritis, with hemorrhage? ### Input: CREATE TABL...
What is the B Score when the total is more than 16.125, and position is 3rd?
CREATE TABLE table_65946 ( "Position" text, "Gymnast" text, "A Score" real, "B Score" real, "Total" real )
SELECT SUM("B Score") FROM table_65946 WHERE "Total" > '16.125' AND "Position" = '3rd'
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 B Score when the total is more than 16.125, and position is 3rd? ### Input: CREATE TABLE table_65946 ( "Posi...
Which country had a place of t1, as well as a score of 72-68-70-73=283?
CREATE TABLE table_50932 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text )
SELECT "Country" FROM table_50932 WHERE "Place" = 't1' AND "Score" = '72-68-70-73=283'
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 country had a place of t1, as well as a score of 72-68-70-73=283? ### Input: CREATE TABLE table_50932 ( "Place" te...
what is the name of first visitor on this chart ?
CREATE TABLE table_204_557 ( id number, "#" number, "date" text, "visitor" text, "score" text, "home" text, "record" text, "pts" number )
SELECT "visitor" FROM table_204_557 WHERE id = 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: what is the name of first visitor on this chart ? ### Input: CREATE TABLE table_204_557 ( id number, "#" number, ...
Which team played Footscray?
CREATE TABLE table_11606 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team" FROM table_11606 WHERE "Home team" = 'footscray'
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 played Footscray? ### Input: CREATE TABLE table_11606 ( "Home team" text, "Home team score" text, "Aw...
What are the processors supported by a ddr2 memory and the nforce 550 model?
CREATE TABLE table_39045 ( "Model" text, "Processors Supported" text, "FSB/HT Frequency (MHz)" text, "Memory" text, "PCI-Express" text, "SATA" text, "PATA" text, "Sound" text )
SELECT "Processors Supported" FROM table_39045 WHERE "Memory" = 'ddr2' AND "Model" = 'nforce 550'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the processors supported by a ddr2 memory and the nforce 550 model? ### Input: CREATE TABLE table_39045 ( "Mode...
Questions with answers, but no accepted answer.
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ...
SELECT Id AS "post_link", AnswerCount FROM Posts WHERE PostTypeId = 1 AND AcceptedAnswerId IS NULL AND OwnerUserId = '##UserId:int##'
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 answers, but no accepted answer. ### Input: CREATE TABLE PostHistory ( Id number, PostHistoryTypeId n...
What is the party when the constituency is 1. Chennai North?
CREATE TABLE table_25286 ( "Constituency" text, "Winner" text, "Party" text, "Margin" real, "Runner-up a" text, "Party a" text )
SELECT "Party" FROM table_25286 WHERE "Constituency" = '1. Chennai North'
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 party when the constituency is 1. Chennai North? ### Input: CREATE TABLE table_25286 ( "Constituency" text, ...
Which Losses have a Wimmera FL of minyip murtoa?
CREATE TABLE table_name_35 ( losses INTEGER, wimmera_fl VARCHAR )
SELECT AVG(losses) FROM table_name_35 WHERE wimmera_fl = "minyip murtoa"
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 Losses have a Wimmera FL of minyip murtoa? ### Input: CREATE TABLE table_name_35 ( losses INTEGER, wimmera_fl ...
Among patients whose birth year is before 2107, how many of them belonged to black/african american ethnic origin?
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 = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2107"
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: Among patients whose birth year is before 2107, how many of them belonged to black/african american ethnic origin? ### Input...
Who did they play on August 12?
CREATE TABLE table_79956 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT "Opponent" FROM table_79956 WHERE "Date" = 'august 12'
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 did they play on August 12? ### Input: CREATE TABLE table_79956 ( "Date" text, "Opponent" text, "Score" text...
Provide me the list of patients on base drug prescription who havea hospital stay greater than three days.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE 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.days_stay > "3" AND prescriptions.drug_type = "BASE"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Provide me the list of patients on base drug prescription who havea hospital stay greater than three days. ### Input: CREATE...
What year did Elf Team Tyrrell have 39 points and a Tyrrell 007 Chassis?
CREATE TABLE table_name_75 ( year INTEGER, chassis VARCHAR, entrant VARCHAR, points VARCHAR )
SELECT SUM(year) FROM table_name_75 WHERE entrant = "elf team tyrrell" AND points = "39" AND chassis = "tyrrell 007"
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 year did Elf Team Tyrrell have 39 points and a Tyrrell 007 Chassis? ### Input: CREATE TABLE table_name_75 ( year IN...
Venue of Pepsi arena involved what club?
CREATE TABLE table_36909 ( "Club" text, "Sport" text, "Founded" real, "League" text, "Venue" text, "Head Coach" text )
SELECT "Club" FROM table_36909 WHERE "Venue" = 'pepsi arena'
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: Venue of Pepsi arena involved what club? ### Input: CREATE TABLE table_36909 ( "Club" text, "Sport" text, "Found...
What is Graham Gooch's nationality?
CREATE TABLE table_name_87 ( nationality VARCHAR, player VARCHAR )
SELECT nationality FROM table_name_87 WHERE player = "graham gooch"
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 Graham Gooch's nationality? ### Input: CREATE TABLE table_name_87 ( nationality VARCHAR, player VARCHAR ) ##...
Which Player has a To par of 2, and a Country of wales?
CREATE TABLE table_60735 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
SELECT "Player" FROM table_60735 WHERE "To par" = '–2' AND "Country" = 'wales'
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 Player has a To par of 2, and a Country of wales? ### Input: CREATE TABLE table_60735 ( "Place" text, "Player"...
how much was patient 20898's body weight last measured in this month?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icust...
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 = 20898)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt'...
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 much was patient 20898's body weight last measured in this month? ### Input: CREATE TABLE labevents ( row_id number,...
How many different counts for won points does Flavia Pennetta have?
CREATE TABLE table_3813 ( "Sd" real, "Rk" real, "Player" text, "Points" real, "Points defending" text, "Points won" real, "New points" real, "Status" text )
SELECT COUNT("Points won") FROM table_3813 WHERE "Player" = 'Flavia Pennetta'
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 different counts for won points does Flavia Pennetta have? ### Input: CREATE TABLE table_3813 ( "Sd" real, ...
How many documents are created in each day? Bin the document date by year interval with a line chart.
CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Statements ( Statemen...
SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code
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 documents are created in each day? Bin the document date by year interval with a line chart. ### Input: CREATE TABL...
When was the loan started when the coutry is eng, the loan club is sunderland and the end source is south wales echo?
CREATE TABLE table_46421 ( "Name" text, "Country" text, "Loan Club" text, "Started" text, "Ended" text, "Start Source" text, "End Source" text )
SELECT "Started" FROM table_46421 WHERE "Country" = 'eng' AND "Loan Club" = 'sunderland' AND "End Source" = 'south wales echo'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the loan started when the coutry is eng, the loan club is sunderland and the end source is south wales echo? ### In...
what is the name of the episode when the number of spectators was 5.60 millions?
CREATE TABLE table_25663 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text, "Viewers (millions)" text )
SELECT "Title" FROM table_25663 WHERE "Viewers (millions)" = '5.60'
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 name of the episode when the number of spectators was 5.60 millions? ### Input: CREATE TABLE table_25663 ( "...
When did the episode title 'Duet For One' air?
CREATE TABLE table_16360 ( "No. in series" real, "No. in season" real, "Title" text, "Director" text, "Writer(s)" text, "Original air date" text, "Production code" text )
SELECT "Original air date" FROM table_16360 WHERE "Title" = 'Duet for One'
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 episode title 'Duet For One' air? ### Input: CREATE TABLE table_16360 ( "No. in series" real, "No. in s...
how many patients had the drug code acet650r?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "ACET650R"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients had the drug code acet650r? ### Input: CREATE TABLE procedures ( subject_id text, hadm_id text, ...
until 2104, what was the monthly minimum weight of patient 22517?
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 d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE chart...
SELECT MIN(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 = 22517)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admi...
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: until 2104, what was the monthly minimum weight of patient 22517? ### Input: CREATE TABLE transfers ( row_id number, ...
What was the decision of the game when Montreal was the home team?
CREATE TABLE table_name_90 ( decision VARCHAR, home VARCHAR )
SELECT decision FROM table_name_90 WHERE home = "montreal"
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 decision of the game when Montreal was the home team? ### Input: CREATE TABLE table_name_90 ( decision VARC...
What is the 2004 that has a of grand slam tournaments in2006 ?
CREATE TABLE table_40489 ( "Tournament" text, "2004" text, "2005" text, "2006" text, "2007" text )
SELECT "2004" FROM table_40489 WHERE "2006" = 'grand slam tournaments'
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 2004 that has a of grand slam tournaments in2006 ? ### Input: CREATE TABLE table_40489 ( "Tournament" text, ...
Which divisions have 565 as the number of winning tickets?
CREATE TABLE table_23618 ( "Divisions" text, "Prize (EUR)" text, "Odds of winning (1in)" text, "Number of winning tickets" real, "In order to win" text )
SELECT "Divisions" FROM table_23618 WHERE "Number of winning tickets" = '565'
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 divisions have 565 as the number of winning tickets? ### Input: CREATE TABLE table_23618 ( "Divisions" text, "...
Average score per hundred views.
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
WITH counts_cte AS (SELECT LAST_DATE_OF_MONTH(p.CreationDate) AS Cmonth, SUM(Score) AS Score, SUM(ViewCount) AS Views FROM Posts AS p WHERE PostTypeId = 1 GROUP BY LAST_DATE_OF_MONTH(p.CreationDate)) SELECT Cmonth, 100 * (CAST(Score AS FLOAT)) / (CAST(Views AS FLOAT)) AS "score_per_view" FROM counts_cte ORDER BY Cmonth
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: Average score per hundred views. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean...
WHAT IS THE BUDGET FOR THE INCREDIBLES?
CREATE TABLE table_name_28 ( budget VARCHAR, film VARCHAR )
SELECT budget FROM table_name_28 WHERE film = "the incredibles"
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 BUDGET FOR THE INCREDIBLES? ### Input: CREATE TABLE table_name_28 ( budget VARCHAR, film VARCHAR ) ### R...
What's the average year for the name aida-wedo dorsa with a diameter less than 450?
CREATE TABLE table_46408 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" real, "Year named" real )
SELECT AVG("Year named") FROM table_46408 WHERE "Name" = 'aida-wedo dorsa' AND "Diameter (km)" < '450'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the average year for the name aida-wedo dorsa with a diameter less than 450? ### Input: CREATE TABLE table_46408 ( ...
how many patients during this year have received a sodium, urine test?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insuranc...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium, urine') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 's...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients during this year have received a sodium, urine test? ### Input: CREATE TABLE d_items ( row_id number, ...
What is the total sum of the goals at competitions with more than 10 draws?
CREATE TABLE table_43363 ( "Competition" text, "Appearances" real, "Played" real, "Drawn" real, "Lost" real, "Goals for" real, "Goals against" real )
SELECT SUM("Goals for") FROM table_43363 WHERE "Drawn" > '10'
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 sum of the goals at competitions with more than 10 draws? ### Input: CREATE TABLE table_43363 ( "Compe...
Which actor from Serbia was nominated for best actor in a supporting role?
CREATE TABLE table_10236830_4 ( actors_name VARCHAR, nomination VARCHAR, country VARCHAR )
SELECT actors_name FROM table_10236830_4 WHERE nomination = "Best Actor in a Supporting Role" AND country = "Serbia"
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 actor from Serbia was nominated for best actor in a supporting role? ### Input: CREATE TABLE table_10236830_4 ( ac...
Who wrote the episode that originally aired on March 1, 1998?
CREATE TABLE table_name_42 ( written_by VARCHAR, original_airdate VARCHAR )
SELECT written_by FROM table_name_42 WHERE original_airdate = "march 1, 1998"
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 wrote the episode that originally aired on March 1, 1998? ### Input: CREATE TABLE table_name_42 ( written_by VARCHAR...
With a works number of 40864 for the builder of Baldwin Locomotive Works, the number listed is?
CREATE TABLE table_name_15 ( number VARCHAR, builder VARCHAR, works_number VARCHAR )
SELECT number FROM table_name_15 WHERE builder = "baldwin locomotive works" AND works_number = 40864
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: With a works number of 40864 for the builder of Baldwin Locomotive Works, the number listed is? ### Input: CREATE TABLE tabl...
Who was the incumbent when henry e. barbour ran?
CREATE TABLE table_1342379_5 ( candidates VARCHAR, incumbent VARCHAR )
SELECT candidates FROM table_1342379_5 WHERE incumbent = "Henry E. Barbour"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the incumbent when henry e. barbour ran? ### Input: CREATE TABLE table_1342379_5 ( candidates VARCHAR, incum...
Show the number of departments created in different year and bin creation time by year in a line chart, and I want to rank in ascending by the x-axis.
CREATE TABLE head ( head_ID int, name text, born_state text, age real ) CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billions real, Num...
SELECT Creation, COUNT(Creation) FROM department ORDER BY Creation
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of departments created in different year and bin creation time by year in a line chart, and I want to rank i...
Which venue was used 11 february 1996?
CREATE TABLE table_name_45 ( venue VARCHAR, date VARCHAR )
SELECT venue FROM table_name_45 WHERE date = "11 february 1996"
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 venue was used 11 february 1996? ### Input: CREATE TABLE table_name_45 ( venue VARCHAR, date VARCHAR ) ### Res...
What is the total number of seats with gavin duffy in series 4?
CREATE TABLE table_12149 ( "Seat" real, "Series 1" text, "Series 3" text, "Series 4" text, "Series 5" text )
SELECT COUNT("Seat") FROM table_12149 WHERE "Series 4" = 'gavin duffy'
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 seats with gavin duffy in series 4? ### Input: CREATE TABLE table_12149 ( "Seat" real, "...
what is the number of patients whose marital status is single and primary disease is hypoxia?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "HYPOXIA"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose marital status is single and primary disease is hypoxia? ### Input: CREATE TABLE demogr...
Which driver won at the Sachsenring circuit?
CREATE TABLE table_1140114_5 ( winning_driver VARCHAR, circuit VARCHAR )
SELECT winning_driver FROM table_1140114_5 WHERE circuit = "Sachsenring"
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 driver won at the Sachsenring circuit? ### Input: CREATE TABLE table_1140114_5 ( winning_driver VARCHAR, circu...
NoSQL datastore questions by year.
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange ...
SELECT Tags.TagName, YEAR(DATE(Posts.CreationDate)) AS year, COUNT(Posts.Id) FROM Tags, PostTags, Posts WHERE Tags.TagName IN ('cassandra') AND Tags.Id = PostTags.TagId AND PostTags.PostId = Posts.Id AND Posts.CreationDate > '2013-01-01' AND Posts.CreationDate < '2021-01-01' GROUP BY Tags.TagName, YEAR(DATE(Posts.Creat...
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: NoSQL datastore questions by year. ### Input: CREATE TABLE PostLinks ( Id number, CreationDate time, PostId numb...
How many opponents did the Sun Devils play when they scored 41 points?
CREATE TABLE table_2401 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Sun Devils points" real, "Opponents" real, "Record" text )
SELECT COUNT("Opponent") FROM table_2401 WHERE "Sun Devils points" = '41'
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 opponents did the Sun Devils play when they scored 41 points? ### Input: CREATE TABLE table_2401 ( "Game" real,...
what was the highest three diagnosis, which had the highest three year mortality rate?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_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 cost ( row_id...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt...
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 was the highest three diagnosis, which had the highest three year mortality rate? ### Input: CREATE TABLE chartevents (...
Name the agg for seba united
CREATE TABLE table_name_12 ( agg VARCHAR, team_1 VARCHAR )
SELECT agg FROM table_name_12 WHERE team_1 = "seba united"
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 agg for seba united ### Input: CREATE TABLE table_name_12 ( agg VARCHAR, team_1 VARCHAR ) ### Response: SEL...
What was the attendance when the score was 88-98?
CREATE TABLE table_name_20 ( attendance VARCHAR, score VARCHAR )
SELECT attendance FROM table_name_20 WHERE score = "88-98"
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 attendance when the score was 88-98? ### Input: CREATE TABLE table_name_20 ( attendance VARCHAR, score ...
What is the name of the race on 16 september?
CREATE TABLE table_77933 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
SELECT "Race Name" FROM table_77933 WHERE "Date" = '16 september'
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 name of the race on 16 september? ### Input: CREATE TABLE table_77933 ( "Race Name" text, "Circuit" text...
Which nationality is the player from the Philadelphia Flyers?
CREATE TABLE table_1473672_3 ( nationality VARCHAR, nhl_team VARCHAR )
SELECT nationality FROM table_1473672_3 WHERE nhl_team = "Philadelphia Flyers"
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 nationality is the player from the Philadelphia Flyers? ### Input: CREATE TABLE table_1473672_3 ( nationality VARC...
What was the minimum OTL amount?
CREATE TABLE table_1961 ( "Season" text, "League" text, "Division" text, "GP" real, "W" real, "L" real, "T" real, "OTL" real, "SOL" real, "Pts" real, "PCT" text, "GF" real, "GA" real, "PIM" real, "Coach(es)" text, "Result" text )
SELECT MIN("OTL") FROM table_1961
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 minimum OTL amount? ### Input: CREATE TABLE table_1961 ( "Season" text, "League" text, "Division" t...
Select All Javascript Questions and Accepted answers.
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, C...
SELECT QPosts.ViewCount, QPosts.LastActivityDate, QPosts.Title, QPosts.Id, QPosts.Body, QPosts.AcceptedAnswerId AS "answer Id", APosts.Body FROM Posts AS QPosts, Posts AS APosts, PostTags WHERE (QPosts.Id = PostTags.PostId) AND (PostTags.TagId = 3) AND (QPosts.PostTypeId = 1) AND APosts.Id = QPosts.AcceptedAnswerId LIM...
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: Select All Javascript Questions and Accepted answers. ### Input: CREATE TABLE PostNotices ( Id number, PostId number...
Who is the lead for the team with Nkeiruka Ezekh as second?
CREATE TABLE table_name_59 ( lead VARCHAR, second VARCHAR )
SELECT lead FROM table_name_59 WHERE second = "nkeiruka ezekh"
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 lead for the team with Nkeiruka Ezekh as second? ### Input: CREATE TABLE table_name_59 ( lead VARCHAR, se...
what were the three most commonly prescribed medications during a year before for patients who were also prescribed with methylprednisolone sodium succ at the same time?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE i...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'methylprednisolone sodium succ' AND DATETIME(prescriptions.startd...
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 three most commonly prescribed medications during a year before for patients who were also prescribed with met...
what is age and days of hospital stay of subject name michelle medina?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.age, demographic.days_stay FROM demographic WHERE demographic.name = "Michelle Medina"
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 age and days of hospital stay of subject name michelle medina? ### Input: CREATE TABLE diagnoses ( subject_id te...
pm flights leaving SAN FRANCISCO arriving BOSTON
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time <= 2359 AND flight.departure_time >= 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight....
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: pm flights leaving SAN FRANCISCO arriving BOSTON ### Input: CREATE TABLE class_of_service ( booking_class varchar, r...
What year was stage 8 reached?
CREATE TABLE table_name_54 ( year VARCHAR, stages VARCHAR )
SELECT year FROM table_name_54 WHERE stages = "8"
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 year was stage 8 reached? ### Input: CREATE TABLE table_name_54 ( year VARCHAR, stages VARCHAR ) ### Response: ...
what is marital status and age of subject name orville ford?
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 prescriptions...
SELECT demographic.marital_status, demographic.age FROM demographic WHERE demographic.name = "Orville Ford"
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 age of subject name orville ford? ### Input: CREATE TABLE diagnoses ( subject_id text, ha...
What amount of points for were there when there was 52 points?
CREATE TABLE table_13399573_3 ( points_for VARCHAR, points VARCHAR )
SELECT points_for FROM table_13399573_3 WHERE points = "52"
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 amount of points for were there when there was 52 points? ### Input: CREATE TABLE table_13399573_3 ( points_for VAR...
What position did the draft pick going to saskatchewan play?
CREATE TABLE table_28059992_5 ( position VARCHAR, cfl_team VARCHAR )
SELECT position FROM table_28059992_5 WHERE cfl_team = "Saskatchewan"
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 position did the draft pick going to saskatchewan play? ### Input: CREATE TABLE table_28059992_5 ( position VARCHAR...
What season features writer Michael Poryes?
CREATE TABLE table_72254 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT "Season #" FROM table_72254 WHERE "Written by" = 'Michael Poryes'
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 season features writer Michael Poryes? ### Input: CREATE TABLE table_72254 ( "Series #" real, "Season #" real, ...
Name the sum of frequency will call sign of k259aw
CREATE TABLE table_name_67 ( frequency_mhz INTEGER, call_sign VARCHAR )
SELECT SUM(frequency_mhz) FROM table_name_67 WHERE call_sign = "k259aw"
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 sum of frequency will call sign of k259aw ### Input: CREATE TABLE table_name_67 ( frequency_mhz INTEGER, ca...
Name the operator with berths more than 1 and depth of 12.5-15.5
CREATE TABLE table_name_81 ( operator VARCHAR, berths VARCHAR, depth__m_ VARCHAR )
SELECT operator FROM table_name_81 WHERE berths > 1 AND depth__m_ = "12.5-15.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: Name the operator with berths more than 1 and depth of 12.5-15.5 ### Input: CREATE TABLE table_name_81 ( operator VARCHA...
Which claim processing stage has the most claims? Show the claim status name.
CREATE TABLE claim_headers ( claim_header_id number, claim_status_code text, claim_type_code text, policy_id number, date_of_claim time, date_of_settlement time, amount_claimed number, amount_piad number ) CREATE TABLE customers ( customer_id number, customer_details text ) CRE...
SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY COUNT(*) DESC LIMIT 1
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which claim processing stage has the most claims? Show the claim status name. ### Input: CREATE TABLE claim_headers ( cl...
acute or poorly controlled medical illness: blood pressure > 180 mmhg systolic or 100 mmhg diastolic; myocardial infarction within 6 months; uncompensated congestive heart failure ( nyha class iii or iv ) , severe renal, hepatic or gastrointestinal disease that could alter drug pharmacokinetics; blood glucose > 180 mg ...
CREATE TABLE table_train_135 ( "id" int, "loss_of_consciousness" bool, "systolic_blood_pressure_sbp" int, "head_injury" bool, "heart_disease" bool, "stroke" bool, "renal_disease" bool, "hepatic_disease" bool, "hydrocephalus" bool, "peptic_ulcer_disease" bool, "blood_glucose" ...
SELECT * FROM table_train_135 WHERE systolic_blood_pressure_sbp > 180 OR diastolic_blood_pressure_dbp > 100 OR myocardial_infarction = 1 OR heart_disease = 1 OR renal_disease = 1 OR hepatic_disease = 1 OR gastrointestinal_disease = 1 OR blood_glucose > 180
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: acute or poorly controlled medical illness: blood pressure > 180 mmhg systolic or 100 mmhg diastolic; myocardial infarction ...
Besides a general elective , would RCSSCI 396 fulfill any requirements ?
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, ins...
SELECT DISTINCT program_course.category FROM course, program_course WHERE course.department = 'RCSSCI' AND course.number = 396 AND program_course.course_id = course.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: Besides a general elective , would RCSSCI 396 fulfill any requirements ? ### Input: CREATE TABLE student_record ( studen...
give me the number of patients whose insurance is government and admission location is emergency room admit?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Government" AND demographic.admission_location = "EMERGENCY ROOM ADMIT"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose insurance is government and admission location is emergency room admit? ### Input: CREA...
Return a bar chart on how many students are older than 20 in each dorm?, and I want to rank in ascending by the Y.
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Student ( StuID INTEGE...
SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name ORDER BY COUNT(*)
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: Return a bar chart on how many students are older than 20 in each dorm?, and I want to rank in ascending by the Y. ### Input...
give me the flights on tuesday from LOS ANGELES to PITTSBURGH
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 22 AND date_day.month_number = 3 AN...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the flights on tuesday from LOS ANGELES to PITTSBURGH ### Input: CREATE TABLE equipment_sequence ( aircraft_code...
How many draws did Mortlake have when the losses were more than 5?
CREATE TABLE table_name_94 ( draws VARCHAR, losses VARCHAR, club VARCHAR )
SELECT COUNT(draws) FROM table_name_94 WHERE losses > 5 AND club = "mortlake"
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 draws did Mortlake have when the losses were more than 5? ### Input: CREATE TABLE table_name_94 ( draws VARCHAR...
How many themes are there where the order # is 9?
CREATE TABLE table_28505 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text )
SELECT COUNT("Theme") FROM table_28505 WHERE "Order #" = '9'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many themes are there where the order # is 9? ### Input: CREATE TABLE table_28505 ( "Week #" text, "Theme" text,...
what is the first tournament listed ?
CREATE TABLE table_204_328 ( id number, "no." number, "date" text, "tournament" text, "winning score" text, "margin of\nvictory" text, "runner(s)-up" text )
SELECT "tournament" FROM table_204_328 WHERE id = 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: what is the first tournament listed ? ### Input: CREATE TABLE table_204_328 ( id number, "no." number, "date" te...
provide the number of patients whose ethnicity is hispanic or latino and procedure short title is ptca?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT 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.short_title = "PTCA"
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 ethnicity is hispanic or latino and procedure short title is ptca? ### Input: CREATE TA...
how many patients under the age of 83 stayed in the hospital for atleast a day?
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.age < "83" AND demographic.days_stay > "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 under the age of 83 stayed in the hospital for atleast a day? ### Input: CREATE TABLE prescriptions ( ...
Which Incumbent has a District of massachusetts 8?
CREATE TABLE table_name_47 ( incumbent VARCHAR, district VARCHAR )
SELECT incumbent FROM table_name_47 WHERE district = "massachusetts 8"
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 Incumbent has a District of massachusetts 8? ### Input: CREATE TABLE table_name_47 ( incumbent VARCHAR, distri...
Which state spent the most revenue towards schools and whats the state average score
CREATE TABLE ndecoreexcel_math_grade8 ( year number, state text, all_students text, average_scale_score number ) CREATE TABLE finrev_fed_17 ( state_code number, idcensus number, school_district text, nces_id text, yr_data number, t_fed_rev number, c14 number, c25 number ...
SELECT T2.state, T3.average_scale_score FROM finrev_fed_key_17 AS T2 JOIN finrev_fed_17 AS T1 ON T1.state_code = T2.state_code JOIN ndecoreexcel_math_grade8 AS T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY SUM(T1.t_fed_rev) DESC LIMIT 1
studentmathscore
Below are sql tables 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 state spent the most revenue towards schools and whats the state average score ### Input: CREATE TABLE ndecoreexcel_ma...
Name the courses that are worth 16 credits .
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TAB...
SELECT DISTINCT name, number FROM course WHERE credits = 16 AND department = 'EECS'
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: Name the courses that are worth 16 credits . ### Input: CREATE TABLE jobs ( job_id int, job_title varchar, descr...
How may draws did libertad have?
CREATE TABLE table_14889048_2 ( draws VARCHAR, team VARCHAR )
SELECT COUNT(draws) FROM table_14889048_2 WHERE team = "Libertad"
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 may draws did libertad have? ### Input: CREATE TABLE table_14889048_2 ( draws VARCHAR, team VARCHAR ) ### Respon...
how many female patients had the procedure short title parent infus nutrit sub?
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "Parent infus nutrit sub"
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 female patients had the procedure short title parent infus nutrit sub? ### Input: CREATE TABLE prescriptions ( ...
Give me the number of the dates when the max temperature was higher than 85, and display from high to low by the Y.
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 weather ( date TEXT, ...
SELECT date, COUNT(date) FROM weather WHERE max_temperature_f > 85 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: Give me the number of the dates when the max temperature was higher than 85, and display from high to low by the Y. ### Inpu...
patient 006-98330's potassium last measured on the first hospital visit is less than the first value measured on the first hospital visit?
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 (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-98330' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
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: patient 006-98330's potassium last measured on the first hospital visit is less than the first value measured on the first h...
what is 2010 when 2006 is 3r?
CREATE TABLE table_47843 ( "Tournament" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text...
SELECT "2010" FROM table_47843 WHERE "2006" = '3r'
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 2010 when 2006 is 3r? ### Input: CREATE TABLE table_47843 ( "Tournament" text, "1998" text, "1999" text,...
What is the highest silver that has 57 as the total, with a bronze greater than 20?
CREATE TABLE table_63028 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MAX("Silver") FROM table_63028 WHERE "Total" = '57' AND "Bronze" > '20'
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 silver that has 57 as the total, with a bronze greater than 20? ### Input: CREATE TABLE table_63028 ( ...
Visualize the total smallest rating of different movie title using a pie chart.
CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Movie ( mID int, title text, year int, director text )
SELECT T2.title, SUM(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize the total smallest rating of different movie title using a pie chart. ### Input: CREATE TABLE Rating ( rID int...