instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
What is the median household income of sacramento? | CREATE TABLE table_1356555_2 (
median_household_income VARCHAR,
county VARCHAR
) | SELECT median_household_income FROM table_1356555_2 WHERE county = "Sacramento" | 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 median household income of sacramento? ### Input: CREATE TABLE table_1356555_2 (
median_household_income VAR... |
What's the record of Game 56? | CREATE TABLE table_46719 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Record" FROM table_46719 WHERE "Game" = '56' | 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 record of Game 56? ### Input: CREATE TABLE table_46719 (
"Game" real,
"Date" text,
"Team" text,
"... |
How may college/junior/club team has a the nhl team listed as Colorado Avalanche? | CREATE TABLE table_2886617_5 (
college_junior_club_team VARCHAR,
nhl_team VARCHAR
) | SELECT COUNT(college_junior_club_team) FROM table_2886617_5 WHERE nhl_team = "Colorado Avalanche" | 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 college/junior/club team has a the nhl team listed as Colorado Avalanche? ### Input: CREATE TABLE table_2886617_5 (
... |
What institution is located in St. Peter? | CREATE TABLE table_3492 (
"Institution" text,
"Nickname" text,
"Location (all in Minnesota)" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text
) | SELECT "Institution" FROM table_3492 WHERE "Location (all in Minnesota)" = 'St. Peter' | 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 institution is located in St. Peter? ### Input: CREATE TABLE table_3492 (
"Institution" text,
"Nickname" text,
... |
did patient 004-86136 have a insulin - sliding scale administration procedure in other hospitals in 2105? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalp... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '004-86136' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '004-86136' AND patient.hospitaldischargetime IS NULL)) AND tr... | 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: did patient 004-86136 have a insulin - sliding scale administration procedure in other hospitals in 2105? ### Input: CREATE ... |
how many dismissals in a game with 191 innings | CREATE TABLE table_2165 (
"Rank" real,
"Dismissals" real,
"Player" text,
"Caught" real,
"Stumped" real,
"Matches" real,
"Innings" real
) | SELECT COUNT("Dismissals") FROM table_2165 WHERE "Innings" = '191' | 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 dismissals in a game with 191 innings ### Input: CREATE TABLE table_2165 (
"Rank" real,
"Dismissals" real,
... |
Who was the incumbent in Pennsylvania 27? | CREATE TABLE table_18601 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Incumbent" FROM table_18601 WHERE "District" = 'Pennsylvania 27' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the incumbent in Pennsylvania 27? ### Input: CREATE TABLE table_18601 (
"District" text,
"Incumbent" text,
... |
Show party names and the number of events for each party by a pie chart. | CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE member (
Member_ID int,
... | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show party names and the number of events for each party by a pie chart. ### Input: CREATE TABLE region (
Region_ID int,... |
what is the percentage of male voters where the level of maturity is 123726 | CREATE TABLE table_27319 (
"Region" text,
"Enrolled men" real,
"Enrolled women" real,
"Enrolled total" real,
"Men of voting age" real,
"Women of voting age" real,
"Voting age population" real,
"E/VAP ratio Men" text,
"E/VAP ratio Women" text,
"E/VAP ratio Total" text
) | SELECT "E/VAP ratio Total" FROM table_27319 WHERE "Men of voting age" = '123726' | 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 percentage of male voters where the level of maturity is 123726 ### Input: CREATE TABLE table_27319 (
"Regio... |
lesnar beat herring in ufc 87 , in what event was his previous win ? | CREATE TABLE table_204_363 (
id number,
"res." text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"date" text,
"round" number,
"time" text,
"location" text,
"notes" text
) | SELECT "event" FROM table_204_363 WHERE "res." = 'win' AND "date" < (SELECT "date" FROM table_204_363 WHERE "event" = 'ufc 87') ORDER BY "date" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: lesnar beat herring in ufc 87 , in what event was his previous win ? ### Input: CREATE TABLE table_204_363 (
id number,
... |
what is the number of emergency room admitted patients who have mesenteric ischemia primary disease? | 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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "MESENTERIC ISCHEMIA" | 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 emergency room admitted patients who have mesenteric ischemia primary disease? ### Input: CREATE TABLE... |
How many draws have french as the language, with a place less than 1? | CREATE TABLE table_name_93 (
draw INTEGER,
language VARCHAR,
place VARCHAR
) | SELECT SUM(draw) FROM table_name_93 WHERE language = "french" AND place < 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: How many draws have french as the language, with a place less than 1? ### Input: CREATE TABLE table_name_93 (
draw INTEG... |
hematocrit of less than 36 % for male , less than 32 % for female . | CREATE TABLE table_dev_32 (
"id" int,
"post_challenge_capillary_glucose" int,
"gender" string,
"blood_donation" bool,
"untreated_hyperlipidemia" bool,
"hemoglobin_a1c_hba1c" float,
"hematocrit_hct" float,
"fasting_triglycerides" int,
"fasting_blood_glucose_fbg" float,
"fasting_pl... | SELECT * FROM table_dev_32 WHERE (hematocrit_hct < 36 AND gender = 'male') OR (hematocrit_hct < 32 AND gender = 'female') | 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: hematocrit of less than 36 % for male , less than 32 % for female . ### Input: CREATE TABLE table_dev_32 (
"id" int,
... |
What year had 48 assists? | CREATE TABLE table_name_35 (
year VARCHAR,
assists VARCHAR
) | SELECT year FROM table_name_35 WHERE assists = "48" | 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 had 48 assists? ### Input: CREATE TABLE table_name_35 (
year VARCHAR,
assists VARCHAR
) ### Response: SELE... |
What is the cfl team that has a position of ol? | CREATE TABLE table_10975034_5 (
cfl_team VARCHAR,
position VARCHAR
) | SELECT cfl_team FROM table_10975034_5 WHERE position = "OL" | 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 cfl team that has a position of ol? ### Input: CREATE TABLE table_10975034_5 (
cfl_team VARCHAR,
positio... |
What type of settlement is Jazak? | CREATE TABLE table_2562572_50 (
type VARCHAR,
settlement VARCHAR
) | SELECT type FROM table_2562572_50 WHERE settlement = "Jazak" | 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 type of settlement is Jazak? ### Input: CREATE TABLE table_2562572_50 (
type VARCHAR,
settlement VARCHAR
) ### ... |
what game was published in europe as 1945 but had a different name elsewhere ? | CREATE TABLE table_203_583 (
id number,
"title" text,
"release" number,
"6th gen" text,
"handheld" text,
"note" text
) | SELECT "title" FROM table_203_583 WHERE "note" = 'released and published in europe by play it as 1945 i & ii: the arcade games' | 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 game was published in europe as 1945 but had a different name elsewhere ? ### Input: CREATE TABLE table_203_583 (
i... |
What is the sum of total with a Rank larger than 12, and a Gold larger than 4? | CREATE TABLE table_14490 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Total") FROM table_14490 WHERE "Rank" > '12' AND "Gold" > '4' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of total with a Rank larger than 12, and a Gold larger than 4? ### Input: CREATE TABLE table_14490 (
"Ra... |
which is the new pageant from spain? | CREATE TABLE table_14308895_2 (
new_pageant VARCHAR,
country_territory VARCHAR
) | SELECT new_pageant FROM table_14308895_2 WHERE country_territory = "Spain" | 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 is the new pageant from spain? ### Input: CREATE TABLE table_14308895_2 (
new_pageant VARCHAR,
country_territo... |
give me the number of self pay insurance patients who had replacement of tube or enterostomy device of small intestine. | 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Self Pay" AND procedures.long_title = "Replacement of tube or enterostomy device of small intestine" | 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 self pay insurance patients who had replacement of tube or enterostomy device of small intestine. ### ... |
What's the class when the identifier is cbf-fm-14? | CREATE TABLE table_63183 (
"City of license" text,
"Identifier" text,
"Frequency" text,
"Power" text,
"Class" text,
"RECNet" text
) | SELECT "Class" FROM table_63183 WHERE "Identifier" = 'cbf-fm-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's the class when the identifier is cbf-fm-14? ### Input: CREATE TABLE table_63183 (
"City of license" text,
"Id... |
what is the name of the last area listed on this chart ? | CREATE TABLE table_203_287 (
id number,
"rank" number,
"area" text,
"date" text,
"presenter" text,
"seven wonders covered" text
) | SELECT "area" FROM table_203_287 ORDER BY id DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the name of the last area listed on this chart ? ### Input: CREATE TABLE table_203_287 (
id number,
"rank" n... |
what player has place t10 | CREATE TABLE table_name_37 (
player VARCHAR,
place VARCHAR
) | SELECT player FROM table_name_37 WHERE place = "t10" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what player has place t10 ### Input: CREATE TABLE table_name_37 (
player VARCHAR,
place VARCHAR
) ### Response: SELE... |
What's the D 44 when D 46 is d 26? | CREATE TABLE table_name_27 (
d_44_√ VARCHAR,
d_46_√ VARCHAR
) | SELECT d_44_√ FROM table_name_27 WHERE d_46_√ = "d 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: What's the D 44 when D 46 is d 26? ### Input: CREATE TABLE table_name_27 (
d_44_√ VARCHAR,
d_46_√ VARCHAR
) ### Resp... |
What is the fewest number of golds for teams with a total of 3 and fewer than 2 silvers? | CREATE TABLE table_name_59 (
gold INTEGER,
total VARCHAR,
silver VARCHAR
) | SELECT MIN(gold) FROM table_name_59 WHERE total = 3 AND silver < 2 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the fewest number of golds for teams with a total of 3 and fewer than 2 silvers? ### Input: CREATE TABLE table_name_... |
I want to see trend the number of date in locaton to over date in locaton to by Location_Code | CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Description VARCHAR(255)
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)... | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code, Date_in_Locaton_To | 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: I want to see trend the number of date in locaton to over date in locaton to by Location_Code ### Input: CREATE TABLE Ref_Lo... |
Top 50 users from Kanpur. | CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body te... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%kanpur%' OR UPPER(Location) LIKE '%KANPUR' ORDER BY Reputation DESC LIMIT 5000 | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 50 users from Kanpur. ### Input: CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (... |
What is the average rec that is greater than 10 and has 40 yards? | CREATE TABLE table_55375 (
"Player" text,
"Rec." real,
"Yards" real,
"Avg." real,
"Long" real
) | SELECT AVG("Rec.") FROM table_55375 WHERE "Yards" = '40' AND "Avg." > '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 average rec that is greater than 10 and has 40 yards? ### Input: CREATE TABLE table_55375 (
"Player" text,
... |
What date(s) was the game(s) at Candlestick Park? | CREATE TABLE table_62564 (
"Year" real,
"Date" text,
"Home Team" text,
"Result" text,
"Visiting Team" text,
"Venue" text
) | SELECT "Date" FROM table_62564 WHERE "Venue" = 'candlestick 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: What date(s) was the game(s) at Candlestick Park? ### Input: CREATE TABLE table_62564 (
"Year" real,
"Date" text,
... |
What are the names of the wrestlers, ordered descending by days held? | CREATE TABLE elimination (
elimination_id text,
wrestler_id text,
team text,
eliminated_by text,
elimination_move text,
time text
)
CREATE TABLE wrestler (
wrestler_id number,
name text,
reign text,
days_held text,
location text,
event text
) | SELECT name FROM wrestler ORDER BY days_held DESC | 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: What are the names of the wrestlers, ordered descending by days held? ### Input: CREATE TABLE elimination (
elimination_... |
provide the number of patients whose ethnicity is american indian/alaska native and item id is 51250? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND lab.itemid = "51250" | 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 american indian/alaska native and item id is 51250? ### Input: CREATE TABL... |
how many medalists came from kenya ? | CREATE TABLE table_204_90 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time" text
) | SELECT COUNT("name") FROM table_204_90 WHERE "nationality" = 'kenya' | 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 medalists came from kenya ? ### Input: CREATE TABLE table_204_90 (
id number,
"rank" number,
"name" tex... |
Which stadium had the opposition of 79,122? | CREATE TABLE table_65540 (
"Date" text,
"Round" text,
"Attendance" real,
"Opposition" text,
"Stadium" text
) | SELECT "Stadium" FROM table_65540 WHERE "Opposition" = '79,122' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which stadium had the opposition of 79,122? ### Input: CREATE TABLE table_65540 (
"Date" text,
"Round" text,
"At... |
What are the scores when total score/week is 41/60 and co-contestant is Shalini Chandran? | CREATE TABLE table_62683 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
) | SELECT "Scores by each individual judge" FROM table_62683 WHERE "Total score/week" = '41/60' AND "Co-contestant (Yaar vs. Pyaar)" = 'shalini chandran' | 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 scores when total score/week is 41/60 and co-contestant is Shalini Chandran? ### Input: CREATE TABLE table_6268... |
On broadcast date is 25april1970, how many people tuned in? | CREATE TABLE table_24073 (
"Episode" text,
"Broadcast date" text,
"Run time" text,
"Viewers (in millions)" text,
"Archive" text
) | SELECT "Viewers (in millions)" FROM table_24073 WHERE "Broadcast date" = '25April1970' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On broadcast date is 25april1970, how many people tuned in? ### Input: CREATE TABLE table_24073 (
"Episode" text,
"B... |
How many races did he do in the year he had 8 points? | CREATE TABLE table_76416 (
"Season" text,
"Series" text,
"Team" text,
"Races" text,
"Wins" text,
"Poles" text,
"F/Laps" text,
"Podiums" text,
"Points" text,
"Position" text
) | SELECT "Races" FROM table_76416 WHERE "Points" = '8' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many races did he do in the year he had 8 points? ### Input: CREATE TABLE table_76416 (
"Season" text,
"Series" ... |
What is the lowest overall for a quarterback with fewer than 7 rounds? | CREATE TABLE table_name_88 (
overall INTEGER,
position VARCHAR,
round VARCHAR
) | SELECT MIN(overall) FROM table_name_88 WHERE position = "quarterback" AND round < 7 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest overall for a quarterback with fewer than 7 rounds? ### Input: CREATE TABLE table_name_88 (
overall I... |
Show all game ids and the number of hours played. | CREATE TABLE Plays_games (
gameid VARCHAR,
hours_played INTEGER
) | SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show all game ids and the number of hours played. ### Input: CREATE TABLE Plays_games (
gameid VARCHAR,
hours_played... |
What genre is Star Plus from India? | CREATE TABLE table_name_50 (
genre VARCHAR,
origin_of_programming VARCHAR,
network VARCHAR
) | SELECT genre FROM table_name_50 WHERE origin_of_programming = "india" AND network = "star plus" | 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 genre is Star Plus from India? ### Input: CREATE TABLE table_name_50 (
genre VARCHAR,
origin_of_programming VAR... |
how many total games did boston college win in the beanpot ? | CREATE TABLE table_203_13 (
id number,
"year" number,
"champion" text,
"score" text,
"runner-up" text,
"coach" text
) | SELECT COUNT(*) FROM table_203_13 WHERE "champion" = 'boston college' | 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 total games did boston college win in the beanpot ? ### Input: CREATE TABLE table_203_13 (
id number,
"year... |
What is the time when the set 1 is 21 25? | CREATE TABLE table_58651 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
) | SELECT "Time" FROM table_58651 WHERE "Set 1" = '21–25' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the time when the set 1 is 21 25? ### Input: CREATE TABLE table_58651 (
"Date" text,
"Time" text,
"Score... |
What is the result when team 1 is ICL Pakistan? | CREATE TABLE table_17103566_1 (
result VARCHAR,
team_1 VARCHAR
) | SELECT result FROM table_17103566_1 WHERE team_1 = "ICL Pakistan" | 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 result when team 1 is ICL Pakistan? ### Input: CREATE TABLE table_17103566_1 (
result VARCHAR,
team_1 VA... |
When the seq is 41, what is the ability to compromise? | CREATE TABLE table_1886 (
"Seq." text,
"Name" text,
"Background" real,
"Party Leadership" real,
"Communication Ability" real,
"Relations with Congress" real,
"Court Appointments" real,
"Handling of Economy" real,
"Luck" real,
"Ability to Compromise" real,
"Willing to take Ris... | SELECT MAX("Ability to Compromise") FROM table_1886 WHERE "Seq." = '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: When the seq is 41, what is the ability to compromise? ### Input: CREATE TABLE table_1886 (
"Seq." text,
"Name" text... |
In what conditions are both the platelet count and prothrombin time unaffected? | CREATE TABLE table_20592988_1 (
condition VARCHAR,
platelet_count VARCHAR,
prothrombin_time VARCHAR
) | SELECT condition FROM table_20592988_1 WHERE platelet_count = "Unaffected" AND prothrombin_time = "Unaffected" | 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 conditions are both the platelet count and prothrombin time unaffected? ### Input: CREATE TABLE table_20592988_1 (
... |
What is the reign for super kendo who held it for 35 days? | CREATE TABLE table_name_16 (
reign VARCHAR,
days_held VARCHAR,
wrestler VARCHAR
) | SELECT reign FROM table_name_16 WHERE days_held = "35" AND wrestler = "super kendo" | 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 reign for super kendo who held it for 35 days? ### Input: CREATE TABLE table_name_16 (
reign VARCHAR,
da... |
What's the Dutch word for Apel? | CREATE TABLE table_12394 (
"English" text,
"Crimean Gothic" text,
"Bible Gothic" text,
"German" text,
"Dutch" text,
"Icelandic" text,
"Swedish" text
) | SELECT "Dutch" FROM table_12394 WHERE "Crimean Gothic" = 'apel' | 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 Dutch word for Apel? ### Input: CREATE TABLE table_12394 (
"English" text,
"Crimean Gothic" text,
"Bi... |
what are the four most commonly prescribed medications for patients that were also prescribed with diphenhydramine 50 mg/1 ml 1 ml inj at the same time in 2105? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'diphenhydramine 50 mg/1 ml 1 ml inj' AND STRFTIME('... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the four most commonly prescribed medications for patients that were also prescribed with diphenhydramine 50 mg/1 m... |
How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges Show bar chart, I want to display x axis from low to high order. | CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) | SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' ORDER BY state | 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 students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges... |
Show the type of school and the number of buses for each type, and I want to list by the y axis in descending. | CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type... | SELECT Type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T2.Type 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 the type of school and the number of buses for each type, and I want to list by the y axis in descending. ### Input: CR... |
What Viewers (m) has an Episode of 40 days? | CREATE TABLE table_61323 (
"Episode" text,
"18-49" text,
"Viewers (m)" real,
"Rating" text,
"Share" text
) | SELECT "Viewers (m)" FROM table_61323 WHERE "Episode" = '40 days' | 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 Viewers (m) has an Episode of 40 days? ### Input: CREATE TABLE table_61323 (
"Episode" text,
"18-49" text,
... |
What was the result in the game broadcast on the Big East Network? | CREATE TABLE table_26842217_12 (
result VARCHAR,
broadcast VARCHAR
) | SELECT result FROM table_26842217_12 WHERE broadcast = "Big East Network" | 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 result in the game broadcast on the Big East Network? ### Input: CREATE TABLE table_26842217_12 (
result VA... |
How many first-team goals does the team have whose player is Samir Carruthers? | CREATE TABLE table_51191 (
"Player" text,
"Position" text,
"First-Team Appearances" text,
"First-Team Goals" text,
"Current Club" text
) | SELECT "First-Team Goals" FROM table_51191 WHERE "Player" = 'samir carruthers' | 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 first-team goals does the team have whose player is Samir Carruthers? ### Input: CREATE TABLE table_51191 (
"Pl... |
what is the marital status of patient 85169 when they visited the hospital first time? | 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 admissions.marital_status FROM admissions WHERE admissions.subject_id = 85169 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the marital status of patient 85169 when they visited the hospital first time? ### Input: CREATE TABLE admissions (
... |
Who was the host country when bronze is [[|]] (1) and host city is Krynica? | CREATE TABLE table_name_45 (
host_country___countries VARCHAR,
bronze VARCHAR,
host_city___cities VARCHAR
) | SELECT host_country___countries FROM table_name_45 WHERE bronze = "[[|]] (1)" AND host_city___cities = "krynica" | 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 host country when bronze is [[|]] (1) and host city is Krynica? ### Input: CREATE TABLE table_name_45 (
host... |
what number of patients who were born before the year 2107 had diagnoses titled elev transaminase/ldh? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "2107" AND diagnoses.short_title = "Elev transaminase/ldh" | 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 number of patients who were born before the year 2107 had diagnoses titled elev transaminase/ldh? ### Input: CREATE TAB... |
How many tickets were sold/available when the gross revenue (2011) was $366,916? | CREATE TABLE table_70494 (
"Venue" text,
"City" text,
"Tickets Sold / Available" text,
"Gross Revenue (1986)" text,
"Gross Revenue (2011)" text
) | SELECT "Tickets Sold / Available" FROM table_70494 WHERE "Gross Revenue (2011)" = '$366,916' | 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 tickets were sold/available when the gross revenue (2011) was $366,916? ### Input: CREATE TABLE table_70494 (
"... |
since 3 years ago how many patients were diagnosed with epilep nos w/o intr epil in the same hospital encounter after the previous diagnosis of subarachnoid hem-no coma? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit te... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title =... | 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: since 3 years ago how many patients were diagnosed with epilep nos w/o intr epil in the same hospital encounter after the pr... |
count the number of patients whose admission location is emergency room admit and diagnoses short title is long-term use anticoagul? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.short_title = "Long-term use anticoagul" | 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 location is emergency room admit and diagnoses short title is long-term use ant... |
what is the average monthly number of patients that are suffering from carrier nec until 4 years ago? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id num... | SELECT AVG(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'carrier nec') AND DATETIME(diagnoses_icd.charttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY ST... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the average monthly number of patients that are suffering from carrier nec until 4 years ago? ### Input: CREATE TABL... |
How to search linked question with specific tag?. https://meta.stackoverflow.com/questions/371789/how-to-search-linked-question-with-specific-tag | CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId... | SELECT CONCAT('site://q/', q.Id, '|', q.Title) AS "linked_post" FROM PostLinks AS pl INNER JOIN Posts AS q ON q.Id = pl.PostId INNER JOIN PostTags AS pt ON pt.PostId = q.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE RelatedPostId = '##postid:int?588004##' AND t.TagName = '##tagname:string?php##' AND LinkTypeId = 1 | 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: How to search linked question with specific tag?. https://meta.stackoverflow.com/questions/371789/how-to-search-linked-quest... |
What is the IHSAA class of the county that is less than 228? | CREATE TABLE table_63232 (
"School" text,
"Location" text,
"Mascot" text,
"County" real,
"Enrollment" text,
"IHSAA Class" text,
"Year Joined" real,
"Previous Conference" text
) | SELECT "IHSAA Class" FROM table_63232 WHERE "County" < '228' | 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 IHSAA class of the county that is less than 228? ### Input: CREATE TABLE table_63232 (
"School" text,
"L... |
Show the number of documents for each location code in a bar chart, I want to order from high to low by the bars. | CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_L... | SELECT Location_Code, COUNT(Location_Code) FROM Document_Locations GROUP BY Location_Code ORDER BY Location_Code DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of documents for each location code in a bar chart, I want to order from high to low by the bars. ### Input:... |
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, a scatter chart shows the correlation between manager_id and department_id . | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT MANAGER_ID, 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 was the result for the film with the English name of Morning Undersea? | CREATE TABLE table_22118197_1 (
result VARCHAR,
english_title VARCHAR
) | SELECT result FROM table_22118197_1 WHERE english_title = "Morning Undersea" | 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 result for the film with the English name of Morning Undersea? ### Input: CREATE TABLE table_22118197_1 (
r... |
Name the sum of year when start is less than 30 | CREATE TABLE table_68213 (
"Year" real,
"Manufacturer" text,
"Start" real,
"Finish" real,
"Team" text
) | SELECT SUM("Year") FROM table_68213 WHERE "Start" < '30' | 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 sum of year when start is less than 30 ### Input: CREATE TABLE table_68213 (
"Year" real,
"Manufacturer" te... |
What is the highest Rank for more than 220 goals in 1965 1978-78? | CREATE TABLE table_42592 (
"Rank" real,
"Name" text,
"Years" text,
"Games" real,
"Goals" real,
"Goals/Games" real
) | SELECT MAX("Rank") FROM table_42592 WHERE "Goals" > '220' AND "Years" = '1965–1978-78' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Rank for more than 220 goals in 1965 1978-78? ### Input: CREATE TABLE table_42592 (
"Rank" real,
... |
Which Location has a Record of 0-1? | CREATE TABLE table_name_59 (
location VARCHAR,
record VARCHAR
) | SELECT location FROM table_name_59 WHERE record = "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: Which Location has a Record of 0-1? ### Input: CREATE TABLE table_name_59 (
location VARCHAR,
record VARCHAR
) ### R... |
What was the size of the crowd when Essendon was the away team? | CREATE TABLE table_32678 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Crowd" FROM table_32678 WHERE "Away team" = 'essendon' | 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 size of the crowd when Essendon was the away team? ### Input: CREATE TABLE table_32678 (
"Home team" text,
... |
What is the number of wins when there are 7 points? | CREATE TABLE table_name_6 (
wins VARCHAR,
points VARCHAR
) | SELECT wins FROM table_name_6 WHERE points = 7 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of wins when there are 7 points? ### Input: CREATE TABLE table_name_6 (
wins VARCHAR,
points VARC... |
when did patient 021-100763 since 12/2105 have the minimum fio2 for the first time? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-100763')) AND lab.labname = 'fio2' AND STRFTIME('%y-%m', lab.labresulttime) >= ... | 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: when did patient 021-100763 since 12/2105 have the minimum fio2 for the first time? ### Input: CREATE TABLE medication (
... |
From what year is the engine with engine code M57D30? | CREATE TABLE table_69000 (
"Engine code" text,
"Displacement" text,
"Power, Torque@rpm" text,
"Redline (rpm)" real,
"Year" real
) | SELECT "Year" FROM table_69000 WHERE "Engine code" = 'm57d30' | 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: From what year is the engine with engine code M57D30? ### Input: CREATE TABLE table_69000 (
"Engine code" text,
"Dis... |
Which classes are useful to take before taking ORALPATH 696 ? | CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ORALPATH' AND number = 696 | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which classes are useful to take before taking ORALPATH 696 ? ### Input: CREATE TABLE course_tags_count (
course_id int,... |
What's the production code of the episode seen by 7.49 million people in the US? | CREATE TABLE table_25771 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT "Production code" FROM table_25771 WHERE "U.S. viewers (millions)" = '7.49' | 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 production code of the episode seen by 7.49 million people in the US? ### Input: CREATE TABLE table_25771 (
"... |
What is John Flatters' nationality? | CREATE TABLE table_name_10 (
nationality VARCHAR,
player VARCHAR
) | SELECT nationality FROM table_name_10 WHERE player = "john flatters" | 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 John Flatters' nationality? ### Input: CREATE TABLE table_name_10 (
nationality VARCHAR,
player VARCHAR
) ##... |
What opponent used the Ko method, and a 6-0 record? | CREATE TABLE table_name_12 (
opponent VARCHAR,
method VARCHAR,
record VARCHAR
) | SELECT opponent FROM table_name_12 WHERE method = "ko" AND record = "6-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 opponent used the Ko method, and a 6-0 record? ### Input: CREATE TABLE table_name_12 (
opponent VARCHAR,
method... |
What position did the kr team player play? | CREATE TABLE table_34353 (
"Season" text,
"Player" text,
"Position" text,
"Nationality" text,
"Team" text
) | SELECT "Position" FROM table_34353 WHERE "Team" = 'kr' | 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 position did the kr team player play? ### Input: CREATE TABLE table_34353 (
"Season" text,
"Player" text,
"... |
Which Date has a Venue of junction oval? | CREATE TABLE table_54498 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_54498 WHERE "Venue" = 'junction oval' | 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 Venue of junction oval? ### Input: CREATE TABLE table_54498 (
"Home team" text,
"Home team score" t... |
how many times was ayrton senna in pole position ? | CREATE TABLE table_204_455 (
id number,
"rd." number,
"grand prix" text,
"date" text,
"location" text,
"pole position" text,
"fastest lap" text,
"winning driver" text,
"constructor" text,
"report" text
) | SELECT COUNT(*) FROM table_204_455 WHERE "pole position" = 'ayrton senna' | 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 times was ayrton senna in pole position ? ### Input: CREATE TABLE table_204_455 (
id number,
"rd." number,
... |
How many different items appear in the high points column when the location attendance was US Airways Center 18,422? | CREATE TABLE table_17288825_10 (
high_points VARCHAR,
location_attendance VARCHAR
) | SELECT COUNT(high_points) FROM table_17288825_10 WHERE location_attendance = "US Airways Center 18,422" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many different items appear in the high points column when the location attendance was US Airways Center 18,422? ### Inp... |
What's the call sign if the branding is 1062 DXKI Koronadal? | CREATE TABLE table_65416 (
"Branding" text,
"Call-Sign" text,
"Frequency" text,
"Power (kw)" text,
"Location" text
) | SELECT "Call-Sign" FROM table_65416 WHERE "Branding" = '1062 dxki koronadal' | 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 call sign if the branding is 1062 DXKI Koronadal? ### Input: CREATE TABLE table_65416 (
"Branding" text,
... |
Which series was won by Paul Morris? | CREATE TABLE table_name_16 (
series VARCHAR,
winner VARCHAR
) | SELECT series FROM table_name_16 WHERE winner = "paul morris" | 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 series was won by Paul Morris? ### Input: CREATE TABLE table_name_16 (
series VARCHAR,
winner VARCHAR
) ### Re... |
What period has 0.25% as the other mozilla? | CREATE TABLE table_64271 (
"Period" text,
"Internet Explorer" text,
"Chrome" text,
"Firefox" text,
"Safari" text,
"Opera" text,
"Other Mozilla" text
) | SELECT "Period" FROM table_64271 WHERE "Other Mozilla" = '0.25%' | 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 period has 0.25% as the other mozilla? ### Input: CREATE TABLE table_64271 (
"Period" text,
"Internet Explorer"... |
How many clubs have 62 points? | CREATE TABLE table_17510803_2 (
club VARCHAR,
points VARCHAR
) | SELECT COUNT(club) FROM table_17510803_2 WHERE points = "62" | 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 clubs have 62 points? ### Input: CREATE TABLE table_17510803_2 (
club VARCHAR,
points VARCHAR
) ### Respons... |
Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. | CREATE TABLE ship (
ship_id number,
name text,
type text,
nationality text,
tonnage number
)
CREATE TABLE mission (
mission_id number,
ship_id number,
code text,
launched_year number,
location text,
speed_knots number,
fate text
) | SELECT type FROM ship WHERE tonnage > 6000 INTERSECT SELECT type FROM ship WHERE tonnage < 4000 | 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: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. ### Inp... |
find out the number of patients admitted before 2150 who had free calcium lab test. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2150" AND lab.label = "Free Calcium" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find out the number of patients admitted before 2150 who had free calcium lab test. ### Input: CREATE TABLE lab (
subjec... |
What show comes on at 9:00 on the channel that shows the Insider at 7:00? | CREATE TABLE table_71849 (
"7:00" text,
"7:30" text,
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text
) | SELECT "9:00" FROM table_71849 WHERE "7:00" = 'the insider' | 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 show comes on at 9:00 on the channel that shows the Insider at 7:00? ### Input: CREATE TABLE table_71849 (
"7:00" t... |
What score has october 16, 2000 as the date? | CREATE TABLE table_name_71 (
score VARCHAR,
date VARCHAR
) | SELECT score FROM table_name_71 WHERE date = "october 16, 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: What score has october 16, 2000 as the date? ### Input: CREATE TABLE table_name_71 (
score VARCHAR,
date VARCHAR
) #... |
Who Hated on My Answer?. | CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count num... | SELECT V.Id, V.PostId AS "post_link", V.UserId AS "user_link", CAST(DATEDIFF(day, P.CreationDate, CreationDate) AS VARCHAR) + ' days later' AS "hater_eta" FROM Votes AS V, VoteTypes AS Vt, Posts AS P, PostTypes AS Pt WHERE P.Id = V.PostId AND Pt.Id = P.PostTypeId AND Vt.Id = V.VoteTypeId AND Pt.Id = 2 AND Vt.Id = 3 | 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: Who Hated on My Answer?. ### Input: CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes... |
what is the organism that was detected in patient 53176's last urine microbiology test this month? | CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
h... | SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 53176) AND microbiologyevents.spec_type_desc = 'urine' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.charttime, 'start of ... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the organism that was detected in patient 53176's last urine microbiology test this month? ### Input: CREATE TABLE i... |
Which Position has Drawn larger than 1, and a Played smaller than 14? | CREATE TABLE table_name_34 (
position INTEGER,
drawn VARCHAR,
played VARCHAR
) | SELECT MAX(position) FROM table_name_34 WHERE drawn > 1 AND played < 14 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Position has Drawn larger than 1, and a Played smaller than 14? ### Input: CREATE TABLE table_name_34 (
position I... |
Name the sum of 2010 for 2000 of 17 and 2005 more than 16 | CREATE TABLE table_56916 (
"Year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real
) | SELECT SUM("2010") FROM table_56916 WHERE "2000" = '17' AND "2005" > '16' | 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 sum of 2010 for 2000 of 17 and 2005 more than 16 ### Input: CREATE TABLE table_56916 (
"Year" text,
"2010" ... |
JavaScript Trends (# of Questions per Month). | CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAno... | SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ... | 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: JavaScript Trends (# of Questions per Month). ### Input: CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
... |
Bar chart x axis sportname y axis the total number, rank X-axis from high to low order please. | CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
... | SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY SportName 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: Bar chart x axis sportname y axis the total number, rank X-axis from high to low order please. ### Input: CREATE TABLE Sport... |
how many winning team with circuit being road america | CREATE TABLE table_19463 (
"Rnd" real,
"Race Name" text,
"Circuit" text,
"City/Location" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | SELECT COUNT("Winning team") FROM table_19463 WHERE "Circuit" = 'Road America' | 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 winning team with circuit being road america ### Input: CREATE TABLE table_19463 (
"Rnd" real,
"Race Name" ... |
On what date did the manager for PSIS Semarang take over for the manager that was sacked? | CREATE TABLE table_name_54 (
date_of_replacement VARCHAR,
reason_of_departure VARCHAR,
team VARCHAR
) | SELECT date_of_replacement FROM table_name_54 WHERE reason_of_departure = "sacked" AND team = "psis semarang" | 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: On what date did the manager for PSIS Semarang take over for the manager that was sacked? ### Input: CREATE TABLE table_name... |
What Venue had Carlton has the Away team? | CREATE TABLE table_55964 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_55964 WHERE "Away team" = 'carlton' | 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 Venue had Carlton has the Away team? ### Input: CREATE TABLE table_55964 (
"Home team" text,
"Home team score" ... |
How many patients with orthostatic hypotension are hispanic or latino? | 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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND diagnoses.long_title = "Orthostatic hypotension" | 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 with orthostatic hypotension are hispanic or latino? ### Input: CREATE TABLE lab (
subject_id text,
... |
How many goals have been scored by Tiago Gomes? | CREATE TABLE table_12321870_32 (
goals VARCHAR,
player_name VARCHAR
) | SELECT goals FROM table_12321870_32 WHERE player_name = "Tiago Gomes" | 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 goals have been scored by Tiago Gomes? ### Input: CREATE TABLE table_12321870_32 (
goals VARCHAR,
player_na... |
For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. | CREATE TABLE list (
grade VARCHAR,
classroom VARCHAR
) | SELECT grade, COUNT(DISTINCT classroom), COUNT(*) FROM list GROUP BY grade | 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: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the gra... |
Find meter_200 and the amount of meter_200 , and group by attribute meter_200, and visualize them by a bar chart, show in ascending by the bar. | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimme... | SELECT meter_200, COUNT(meter_200) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find meter_200 and the amount of meter_200 , and group by attribute meter_200, and visualize them by a bar chart, show in as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.