instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
Which Date has a Visitor of boston? | CREATE TABLE table_38228 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Attendance" real,
"Record" text,
"Points" real
) | SELECT "Date" FROM table_38228 WHERE "Visitor" = 'boston' | 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 Visitor of boston? ### Input: CREATE TABLE table_38228 (
"Date" text,
"Visitor" text,
"Score" t... |
What are all the courses for Other ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jo... | SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are all the courses for Other ? ### Input: CREATE TABLE requirement (
requirement_id int,
requirement varchar,
... |
patient age > 18 years | CREATE TABLE table_train_3 (
"id" int,
"pregnancy_or_lactation" bool,
"severe_sepsis" bool,
"systolic_blood_pressure_sbp" int,
"mean_arterial_pressure_map" int,
"leukocyte_count" int,
"renal_disease" bool,
"temperature" float,
"sepsis" bool,
"hypotension" bool,
"heart_rate" i... | SELECT * FROM table_train_3 WHERE age > 18 | 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: patient age > 18 years ### Input: CREATE TABLE table_train_3 (
"id" int,
"pregnancy_or_lactation" bool,
"severe_... |
select count(*) from posts where posts.ViewCount > 58000;. | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE... | SELECT COUNT(*) FROM Posts WHERE Posts.ViewCount > 58000 | 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 count(*) from posts where posts.ViewCount > 58000;. ### Input: CREATE TABLE Comments (
Id number,
PostId numb... |
what's the result with dbeingtrict being florida 4 | CREATE TABLE table_18499 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Result" FROM table_18499 WHERE "District" = 'Florida 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's the result with dbeingtrict being florida 4 ### Input: CREATE TABLE table_18499 (
"District" text,
"Incumbent... |
How many papers does michael i. jordan have in 2016 ? | CREATE TABLE field (
fieldid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE cite (
... | SELECT DISTINCT COUNT(writes.paperid) FROM author, paper, writes WHERE author.authorname = 'michael i. jordan' AND paper.year = 2016 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many papers does michael i. jordan have in 2016 ? ### Input: CREATE TABLE field (
fieldid int
)
CREATE TABLE paperf... |
give me the number of patients with hypopotassemia diagnoses who have both eyes as route of drug administration. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hypopotassemia" AND prescriptions.route = "BOTH EYES" | 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 with hypopotassemia diagnoses who have both eyes as route of drug administration. ### Input: ... |
Show the average price of the rooms in different decor using a bar chart, sort from low to high by the X please. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor ORDER BY decor | 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 average price of the rooms in different decor using a bar chart, sort from low to high by the X please. ### Input: ... |
Draw a bar chart for what is average age of male for different job title?, order by the job in asc. | CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
) | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY job | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart for what is average age of male for different job title?, order by the job in asc. ### Input: CREATE TABLE ... |
What position did the player from Rice College play who was picked under 15? | CREATE TABLE table_name_24 (
position VARCHAR,
pick VARCHAR,
college VARCHAR
) | SELECT position FROM table_name_24 WHERE pick < 15 AND college = "rice" | 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 player from Rice College play who was picked under 15? ### Input: CREATE TABLE table_name_24 (
pos... |
where is the best restaurant in bay area for american food ? | CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_name varchar
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
reg... | SELECT location.house_number, restaurant.name FROM geographic, location, restaurant WHERE geographic.region = 'bay area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'american' AND restaurant.id = location.restaurant_id AND restaurant.rating = (SELECT MAX(RESTAURANTalias1.rating) FROM geog... | restaurants | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: where is the best restaurant in bay area for american food ? ### Input: CREATE TABLE restaurant (
id int,
name varch... |
What is the sum of top-10 values for the Open Championship and less than 3 in the top-25? | CREATE TABLE table_7814 (
"Tournament" text,
"Wins" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | SELECT SUM("Top-10") FROM table_7814 WHERE "Tournament" = 'the open championship' AND "Top-25" < '3' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of top-10 values for the Open Championship and less than 3 in the top-25? ### Input: CREATE TABLE table_7814... |
What is Series, when Season is 2007? | CREATE TABLE table_name_2 (
series VARCHAR,
season VARCHAR
) | SELECT series FROM table_name_2 WHERE season = 2007 | 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 Series, when Season is 2007? ### Input: CREATE TABLE table_name_2 (
series VARCHAR,
season VARCHAR
) ### Res... |
Number of custom off-topic close reasons for each site. | CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT COUNT(*) FROM CloseAsOffTopicReasonTypes WHERE NOT ApprovalDate IS NULL AND DeactivationDate IS NULL | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Number of custom off-topic close reasons for each site. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... |
Which club had 2 wins and 1 draw? | CREATE TABLE table_22020 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Club" FROM table_22020 WHERE "Drawn" = '1' AND "Won" = '2' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which club had 2 wins and 1 draw? ### Input: CREATE TABLE table_22020 (
"Club" text,
"Played" text,
"Won" text,
... |
Nigeria had the fastest time once. | CREATE TABLE table_1231316_5 (
fastest_time__s_ VARCHAR,
nation VARCHAR
) | SELECT COUNT(fastest_time__s_) FROM table_1231316_5 WHERE nation = "Nigeria" | 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: Nigeria had the fastest time once. ### Input: CREATE TABLE table_1231316_5 (
fastest_time__s_ VARCHAR,
nation VARCHA... |
count the number of patients whose age is less than 24 and procedure long title is endoscopic removal of stone(s) from biliary tract? | 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.age < "24" AND procedures.long_title = "Endoscopic removal of stone(s) from biliary tract" | 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 age is less than 24 and procedure long title is endoscopic removal of stone(s) from bilia... |
What is the highest NFL Draft that has jeff robinson as the player, with an overall pick less than 98? | CREATE TABLE table_35497 (
"Player" text,
"Position" text,
"Overall Pick" real,
"Round" text,
"NFL Draft" real,
"Franchise" text
) | SELECT MAX("NFL Draft") FROM table_35497 WHERE "Player" = 'jeff robinson' AND "Overall Pick" < '98' | 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 NFL Draft that has jeff robinson as the player, with an overall pick less than 98? ### Input: CREATE TAB... |
What was the latest round that Derek Pagel was selected with a pick higher than 50? | CREATE TABLE table_77984 (
"Player" text,
"Position" text,
"Round" real,
"Pick" real,
"NFL Club" text
) | SELECT MAX("Round") FROM table_77984 WHERE "Pick" > '50' AND "Player" = 'derek pagel' | 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 latest round that Derek Pagel was selected with a pick higher than 50? ### Input: CREATE TABLE table_77984 (
... |
What is Date, when Score is '0-2', and when Opponents is 'Bayer Leverkusen'? | CREATE TABLE table_name_4 (
date VARCHAR,
score VARCHAR,
opponents VARCHAR
) | SELECT date FROM table_name_4 WHERE score = "0-2" AND opponents = "bayer leverkusen" | 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 Date, when Score is '0-2', and when Opponents is 'Bayer Leverkusen'? ### Input: CREATE TABLE table_name_4 (
date... |
I want the D 40 with D 44 of d 15 | CREATE TABLE table_name_17 (
d_40 VARCHAR,
d_44 VARCHAR
) | SELECT d_40 FROM table_name_17 WHERE d_44 = "d 15" | 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: I want the D 40 with D 44 of d 15 ### Input: CREATE TABLE table_name_17 (
d_40 VARCHAR,
d_44 VARCHAR
) ### Response:... |
What is the position of tickets sold/available when the sellout is 82%? | CREATE TABLE table_20680 (
"Dates (MDY)" text,
"Position" real,
"Gross sales" text,
"Tickets sold / available" text,
"Sellout (%)" text
) | SELECT COUNT("Tickets sold / available") FROM table_20680 WHERE "Sellout (%)" = '82%' | 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 position of tickets sold/available when the sellout is 82%? ### Input: CREATE TABLE table_20680 (
"Dates (MD... |
what's the pole position with location being hockenheimring | CREATE TABLE table_16713 (
"Rnd" real,
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | SELECT "Pole Position" FROM table_16713 WHERE "Location" = 'Hockenheimring' | 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 pole position with location being hockenheimring ### Input: CREATE TABLE table_16713 (
"Rnd" real,
"Race"... |
Who is the away team when the home team scores 12.20 (92)? | CREATE TABLE table_4685 (
"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_4685 WHERE "Home team score" = '12.20 (92)' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the away team when the home team scores 12.20 (92)? ### Input: CREATE TABLE table_4685 (
"Home team" text,
"H... |
Which School Colors has an Enrollment larger than 15,664, and Founded of 1910, and a Location of bowling green? | CREATE TABLE table_8218 (
"University" text,
"Common short form and abbreviation" text,
"Location" text,
"Enrollment" real,
"Athletics nickname" text,
"School Colors" text,
"Founded" text,
"Student newspaper" text
) | SELECT "School Colors" FROM table_8218 WHERE "Enrollment" > '15,664' AND "Founded" = '1910' AND "Location" = 'bowling green' | 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 School Colors has an Enrollment larger than 15,664, and Founded of 1910, and a Location of bowling green? ### Input: C... |
What tournament had a victory of a 1 stroke margin and the final winning score 69-75-71-70? | CREATE TABLE table_name_1 (
tournament VARCHAR,
margin_of_victory VARCHAR,
winning_score VARCHAR
) | SELECT tournament FROM table_name_1 WHERE margin_of_victory = "1 stroke" AND winning_score = "69-75-71-70" | 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 tournament had a victory of a 1 stroke margin and the final winning score 69-75-71-70? ### Input: CREATE TABLE table_na... |
Posts that contain inline code formatting. | CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT Id AS "post_link" FROM Posts WHERE Body LIKE '%<code>%' AND OwnerUserId = @UserID ORDER BY CreationDate DESC | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Posts that contain inline code formatting. ### Input: CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... |
what's the earliest year that serena williams had more than 2 sets? | CREATE TABLE table_42301 (
"Aces" real,
"Player" text,
"Opponent" text,
"Year" real,
"Event" text,
"Sets" real,
"Result" text
) | SELECT MIN("Year") FROM table_42301 WHERE "Player" = 'serena williams' AND "Sets" > '2' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what's the earliest year that serena williams had more than 2 sets? ### Input: CREATE TABLE table_42301 (
"Aces" real,
... |
What is the Sipe Sipe Municipality minimum if the language is Quechua? | CREATE TABLE table_27387 (
"Language" text,
"Quillacollo Municipality" real,
"Sipe Sipe Municipality" real,
"Tiquipaya Municipality" real,
"Vinto Municipality" real,
"Colcapirhua Municipality" real
) | SELECT MIN("Sipe Sipe Municipality") FROM table_27387 WHERE "Language" = 'Quechua' | 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 Sipe Sipe Municipality minimum if the language is Quechua? ### Input: CREATE TABLE table_27387 (
"Language" ... |
What is the winners Share ($) in the year 2004? | CREATE TABLE table_472 (
"Year" text,
"Champion" text,
"Country" text,
"Score" text,
"Tournament location" text,
"Purse ($)" real,
"Winners share ($)" real
) | SELECT MIN("Winners share ($)") FROM table_472 WHERE "Year" = '2004' | 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 winners Share ($) in the year 2004? ### Input: CREATE TABLE table_472 (
"Year" text,
"Champion" text,
... |
when was patient 29635's last microbiological examination when they came to the hospital last time? | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 29635 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) ORDER BY microbiologyevents.charttime DESC 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: when was patient 29635's last microbiological examination when they came to the hospital last time? ### Input: CREATE TABLE ... |
how many of the patients with infected right thigh graft had coronary arteriogr-1 cath? | CREATE TABLE procedures (
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "INFECTED RIGHT THIGH GRAFT" AND procedures.short_title = "Coronar arteriogr-1 cath" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many of the patients with infected right thigh graft had coronary arteriogr-1 cath? ### Input: CREATE TABLE procedures (... |
which country scored the least medals ? | CREATE TABLE table_204_232 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "nation" FROM table_204_232 WHERE "total" = (SELECT MIN("total") FROM table_204_232) | 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 country scored the least medals ? ### Input: CREATE TABLE table_204_232 (
id number,
"rank" number,
"natio... |
Which Discipline has a 2007 laser radial Cascais ? | CREATE TABLE table_15743 (
"Discipline" text,
"2003 Cadiz" text,
"2007 Cascais" text,
"2011 Perth" text,
"2014 Santander" text
) | SELECT "Discipline" FROM table_15743 WHERE "2007 Cascais" = 'laser radial' | 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 Discipline has a 2007 laser radial Cascais ? ### Input: CREATE TABLE table_15743 (
"Discipline" text,
"2003 Ca... |
What team has fewer than 9 wins and less than 1593 against? | CREATE TABLE table_78974 (
"Lexton Plains" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT "Lexton Plains" FROM table_78974 WHERE "Wins" < '9' AND "Against" < '1593' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What team has fewer than 9 wins and less than 1593 against? ### Input: CREATE TABLE table_78974 (
"Lexton Plains" text,
... |
find the procedure icd9 code for patient with patient id 10317. | 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 procedures.icd9_code FROM procedures WHERE procedures.subject_id = "10317" | 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 the procedure icd9 code for patient with patient id 10317. ### Input: CREATE TABLE lab (
subject_id text,
hadm_... |
What was the Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvist? | CREATE TABLE table_53115 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | SELECT "Record" FROM table_53115 WHERE "Decision" = 'holmqvist' AND "Attendance" > '16,526' AND "Visitor" = 'carolina' | 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 Lightning's record at their home game against Carolina with an attendance over 16,526 and a decision of Holmqvi... |
Which Winning Driver has a Round of 9? | CREATE TABLE table_name_45 (
winning_driver VARCHAR,
round VARCHAR
) | SELECT winning_driver FROM table_name_45 WHERE round = 9 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Winning Driver has a Round of 9? ### Input: CREATE TABLE table_name_45 (
winning_driver VARCHAR,
round VARCHAR... |
Where was the round 1 race? | CREATE TABLE table_25773116_2 (
location VARCHAR,
round VARCHAR
) | SELECT location FROM table_25773116_2 WHERE round = 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: Where was the round 1 race? ### Input: CREATE TABLE table_25773116_2 (
location VARCHAR,
round VARCHAR
) ### Respons... |
Name the tournament for grass surface and opponent in the final being paul baccanello | CREATE TABLE table_71978 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | SELECT "Tournament" FROM table_71978 WHERE "Surface" = 'grass' AND "Opponent in the final" = 'paul baccanello' | 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 tournament for grass surface and opponent in the final being paul baccanello ### Input: CREATE TABLE table_71978 (
... |
Who was the opposition in the game on July 29? | CREATE TABLE table_name_22 (
opposition VARCHAR,
date VARCHAR
) | SELECT opposition FROM table_name_22 WHERE date = "july 29" | 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 opposition in the game on July 29? ### Input: CREATE TABLE table_name_22 (
opposition VARCHAR,
date VARC... |
What's the distance of the course of stage 4? | CREATE TABLE table_15173 (
"Stage" text,
"Date" text,
"Course" text,
"Distance" text,
"Winner" text,
"Race Leader" text
) | SELECT "Distance" FROM table_15173 WHERE "Stage" = '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's the distance of the course of stage 4? ### Input: CREATE TABLE table_15173 (
"Stage" text,
"Date" text,
"... |
What is the type of the match with a win result and Michael Gomez as the opponent? | CREATE TABLE table_67651 (
"Res." text,
"Record" text,
"Opponent" text,
"Type" text,
"Rd., Time" text,
"Date" text
) | SELECT "Type" FROM table_67651 WHERE "Res." = 'win' AND "Opponent" = 'michael gomez' | 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 type of the match with a win result and Michael Gomez as the opponent? ### Input: CREATE TABLE table_67651 (
... |
What is the highest number of severe tropical cyclones when there are 10 tropical cyclones and 14 tropical lows? | CREATE TABLE table_name_78 (
Severe INTEGER,
tropical_cyclones VARCHAR,
tropical_lows VARCHAR
) | SELECT MAX(Severe) AS tropical_cyclones FROM table_name_78 WHERE tropical_cyclones = 10 AND tropical_lows = 14 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number of severe tropical cyclones when there are 10 tropical cyclones and 14 tropical lows? ### Input: ... |
how many songs were remixed by garraund ? | CREATE TABLE table_204_804 (
id number,
"version" text,
"length" text,
"album" text,
"remixed by" text,
"year" number,
"comment" text
) | SELECT COUNT(*) FROM table_204_804 WHERE "remixed by" = 'joachim garraud' | 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 songs were remixed by garraund ? ### Input: CREATE TABLE table_204_804 (
id number,
"version" text,
"le... |
Name the change with share of 2.9% | CREATE TABLE table_name_71 (
change VARCHAR,
share VARCHAR
) | SELECT change FROM table_name_71 WHERE share = "2.9%" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the change with share of 2.9% ### Input: CREATE TABLE table_name_71 (
change VARCHAR,
share VARCHAR
) ### Respo... |
what was the top four most frequent diagnoses that patients were given within the same hospital visit after receiving a digoxin until 2 years ago? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
... | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'digox... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the top four most frequent diagnoses that patients were given within the same hospital visit after receiving a digo... |
What district is the incumbent Republican and the incumbent retired to run for governor democratic gain? | CREATE TABLE table_name_41 (
district VARCHAR,
party VARCHAR,
results VARCHAR
) | SELECT district FROM table_name_41 WHERE party = "republican" AND results = "retired to run for governor democratic gain" | 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 district is the incumbent Republican and the incumbent retired to run for governor democratic gain? ### Input: CREATE T... |
Show the relation between max(stu gpa) and the average of stu gpa for each DEPT_CODE using a scatter chart | CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE va... | SELECT MAX(STU_GPA), AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_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: Show the relation between max(stu gpa) and the average of stu gpa for each DEPT_CODE using a scatter chart ### Input: CREATE... |
Questions and Accepted Answer: Search the set. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
U... | SELECT p1.Id AS "post_link", p1.*, p2.Id AS "post_link", p2.Id AS "post_link", p2.Score AS "p2Score", p2.Body AS "p2Body", p2.OwnerUserId AS "p2UserId", p2.OwnerDisplayName AS "p2OwnerDisplayName", p2.CommentCount AS "p2CommentCount" FROM Posts AS p1, Posts AS p2 WHERE p1.ParentId IS NULL AND NOT p1.AcceptedAnswerId IS... | 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 and Accepted Answer: Search the set. ### Input: CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
... |
provide marital status as well as preferred language of the patient with patient id 2560. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT demographic.marital_status, demographic.language FROM demographic WHERE demographic.subject_id = "2560" | 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 marital status as well as preferred language of the patient with patient id 2560. ### Input: CREATE TABLE prescripti... |
What time was the fastest lap during Stoh's 200 in 1982? | CREATE TABLE table_33447 (
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Report" text
) | SELECT "Fastest Lap" FROM table_33447 WHERE "Name" = 'stoh''s 200' | 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 time was the fastest lap during Stoh's 200 in 1982? ### Input: CREATE TABLE table_33447 (
"Name" text,
"Pole Po... |
active renal disease. | CREATE TABLE table_train_89 (
"id" int,
"chronically_uncontrolled_hypertension" bool,
"uncontrolled_diabetes" bool,
"hemoglobin_a1c_hba1c" float,
"body_weight" float,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"geriatric_depression_scale_gds" int,
"major_depression" bool,... | SELECT * FROM table_train_89 WHERE renal_disease = 1 | 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: active renal disease. ### Input: CREATE TABLE table_train_89 (
"id" int,
"chronically_uncontrolled_hypertension" boo... |
Posting activity by hour of day. | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time... | SELECT HourOfDay, COUNT(*) AS PostCount FROM (SELECT TIME_TO_STR(DATE(CreationDate, '##UTCTimeShift## hh'), '%I') AS HourOfDay FROM Posts WHERE OwnerUserId = '##UserId##') AS sub GROUP BY HourOfDay ORDER BY HourOfDay | 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: Posting activity by hour of day. ### Input: CREATE TABLE Comments (
Id number,
PostId number,
Score number,
... |
Name the number of party with the incubent james william trimble | CREATE TABLE table_1341930_5 (
party VARCHAR,
incumbent VARCHAR
) | SELECT COUNT(party) FROM table_1341930_5 WHERE incumbent = "James William Trimble" | 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 number of party with the incubent james william trimble ### Input: CREATE TABLE table_1341930_5 (
party VARCHAR... |
Is there a way to find out how many edits have made by user. suport query for
https://meta.stackexchange.com/questions/291912/is-there-a-way-to-find-out-how-many-edits-ive-made-network-wide | CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id nu... | SELECT SUM('4') AS "title", SUM('5') AS "body", SUM('6') AS "tag", COUNT(*) AS "revtot" FROM (SELECT RevisionGUID, '4', '5', '6' FROM (SELECT RevisionGUID, PostHistoryTypeId FROM PostHistory AS ph INNER JOIN Users AS u ON u.Id = ph.UserId WHERE PostHistoryTypeId IN (4, 5, 6) AND AccountId = @accountid) AS data PIVOT(CO... | 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: Is there a way to find out how many edits have made by user. suport query for
https://meta.stackexchange.com/questions/2919... |
How many verbs mean to grow, to produce | CREATE TABLE table_21725 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
) | SELECT COUNT("Part 1") FROM table_21725 WHERE "Verb meaning" = 'to grow, to produce' | 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 verbs mean to grow, to produce ### Input: CREATE TABLE table_21725 (
"Class" text,
"Part 1" text,
"Part... |
How many words have a user written all together?. | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Tags (
Id number,
TagName text,
Cou... | SELECT SUM(LENGTH(Body) - LENGTH(REPLACE(Body, ' ', '')) + 1) AS NumbofWords FROM Posts AS p WHERE p.OwnerUserId = '##UserId##' | 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 many words have a user written all together?. ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
... |
Can I take both these classes in the same semester , MUSTHTRE 441 and MUSTHTRE 133 ? | 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 comment_instructor (
instructor_id int,
student_id int,
score int,
... | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_offering AS COURSE_OFFERING_0, course_offering AS COURSE_OFFERING_1, course_prerequisite WHERE COURSE_OFFERING_1.semester = COURSE_OFFERING_0.semester AND COURSE_0.course_id = COURSE_OFFERING_0.course_id AND COURSE_0.department = 'MUSTHTRE' AND COU... | 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: Can I take both these classes in the same semester , MUSTHTRE 441 and MUSTHTRE 133 ? ### Input: CREATE TABLE student_record ... |
What is the time of the rider with a 398cc yamaha? | CREATE TABLE table_77585 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
) | SELECT "Time" FROM table_77585 WHERE "Team" = '398cc yamaha' | 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 of the rider with a 398cc yamaha? ### Input: CREATE TABLE table_77585 (
"Rank" real,
"Rider" text,
... |
Who were the comedians during the episode located in Birmingham Hippodrome? | CREATE TABLE table_23122988_1 (
comedians VARCHAR,
location VARCHAR
) | SELECT comedians FROM table_23122988_1 WHERE location = "Birmingham Hippodrome" | 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 were the comedians during the episode located in Birmingham Hippodrome? ### Input: CREATE TABLE table_23122988_1 (
c... |
What is the average goals against average for those playing more than 78 games? | CREATE TABLE table_67097 (
"Player" text,
"Years" text,
"Games played" real,
"Goals allowed" real,
"Goals against average" real
) | SELECT AVG("Goals against average") FROM table_67097 WHERE "Games played" > '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 average goals against average for those playing more than 78 games? ### Input: CREATE TABLE table_67097 (
"P... |
List the courses that satisfy the Other requirement that are on Intercultural Drama . | CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varc... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Intercultural Drama%' OR course.description LIKE '%Intercultural Drama%' OR course.name LIKE '%I... | 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: List the courses that satisfy the Other requirement that are on Intercultural Drama . ### Input: CREATE TABLE area (
cou... |
what type of plane is a D9S | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
... | SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'D9S' | 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: what type of plane is a D9S ### Input: CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight... |
List all the subject names. | CREATE TABLE SUBJECTS (
subject_name VARCHAR
) | SELECT subject_name FROM SUBJECTS | 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: List all the subject names. ### Input: CREATE TABLE SUBJECTS (
subject_name VARCHAR
) ### Response: SELECT subject_name ... |
Name the region 4 for the complete fifth series | CREATE TABLE table_18081 (
"Complete Series" text,
"Region 1" text,
"Region 2" text,
"Region 4" text,
"DVD Extras and Bonus Features" text,
"Number Of Discs" real
) | SELECT "Region 4" FROM table_18081 WHERE "Complete Series" = 'The Complete Fifth Series' | 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 region 4 for the complete fifth series ### Input: CREATE TABLE table_18081 (
"Complete Series" text,
"Regio... |
What is the coast guard cross when you recieve the navy distinguished service medal? | CREATE TABLE table_24084 (
"Medal of Honor" text,
"Coast Guard Cross" text,
"Navy Cross" text,
"Distinguished Service Cross" text,
"Air Force Cross" text,
"Homeland Security Distinguished Service Medal" text
) | SELECT "Coast Guard Cross" FROM table_24084 WHERE "Distinguished Service Cross" = 'Navy Distinguished Service Medal' | 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 coast guard cross when you recieve the navy distinguished service medal? ### Input: CREATE TABLE table_24084 (
... |
Of all players with an overall rating greater than 80, how many are right-footed and left-footed? | CREATE TABLE player (
id number,
player_api_id number,
player_name text,
player_fifa_api_id number,
birthday text,
height number,
weight number
)
CREATE TABLE team_attributes (
id number,
team_fifa_api_id number,
team_api_id number,
date text,
buildupplayspeed number,
... | SELECT preferred_foot, COUNT(*) FROM player_attributes WHERE overall_rating > 80 GROUP BY preferred_foot | 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: Of all players with an overall rating greater than 80, how many are right-footed and left-footed? ### Input: CREATE TABLE pl... |
What was 2009, when 2001 was, 'not masters series'? | CREATE TABLE table_name_5 (
Id VARCHAR
) | SELECT 2009 FROM table_name_5 WHERE 2001 = "not masters series" | 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 2009, when 2001 was, 'not masters series'? ### Input: CREATE TABLE table_name_5 (
Id VARCHAR
) ### Response: SE... |
on the current icu visit patient 5828's arterial bp [systolic] was greater than 88.0? | 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 COUNT(*) > 0 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 = 5828) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_item... | 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: on the current icu visit patient 5828's arterial bp [systolic] was greater than 88.0? ### Input: CREATE TABLE admissions (
... |
Do you have any other suggestions for easier theory classes than ES 395 ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
star... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%theory%' AND program_course.workload < (SELECT MIN(PROGRAM_COURSEalias1.... | 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: Do you have any other suggestions for easier theory classes than ES 395 ? ### Input: CREATE TABLE comment_instructor (
i... |
What country had a film in 1993? | CREATE TABLE table_70029 (
"Year" real,
"English title" text,
"Original title" text,
"Country" text,
"Director(s)" text
) | SELECT "Country" FROM table_70029 WHERE "Year" = '1993' | 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 country had a film in 1993? ### Input: CREATE TABLE table_70029 (
"Year" real,
"English title" text,
"Origi... |
what were the number of agent specific therapy - beta blockers overdose procedures that were performed in 2105? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'agent specific therapy - beta blockers overdose' AND STRFTIME('%y', treatment.treatmenttime) = '2105' | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the number of agent specific therapy - beta blockers overdose procedures that were performed in 2105? ### Input: C... |
tell me the drug code of phenylephrine medication. | 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 prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Phenylephrine" | 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: tell me the drug code of phenylephrine medication. ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of price , and group by attribute name, and could you sort in asc by the Y-axis? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price | 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 records from the products and each product's manufacturer, return a bar chart about the distribution of name and t... |
Which is located in Angola and entered service in 1988? | CREATE TABLE table_name_98 (
name VARCHAR,
location VARCHAR,
entered_service VARCHAR
) | SELECT name FROM table_name_98 WHERE location = "angola" AND entered_service = "1988" | 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 located in Angola and entered service in 1988? ### Input: CREATE TABLE table_name_98 (
name VARCHAR,
locati... |
What is the title of the issue where the art was done by Barry Kitson and Farmer? | CREATE TABLE table_18305523_2 (
story_title VARCHAR,
artist_s VARCHAR
) | SELECT story_title FROM table_18305523_2 WHERE artist_s = "Barry Kitson and Farmer" | 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 title of the issue where the art was done by Barry Kitson and Farmer? ### Input: CREATE TABLE table_18305523_2 (... |
JPA and Hibernate Questions by Year. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE... | SELECT COUNT(*) AS QuestionCount, CAST(TIME_TO_STR(Posts.CreationDate, '%Y') AS INT) AS Year FROM Posts JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Tags ON Tags.Id = PostTags.TagId WHERE Tags.TagName = 'hibernate' OR Tags.TagName = 'jpa' GROUP BY TIME_TO_STR(Posts.CreationDate, '%Y') ORDER BY Year DESC | 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: JPA and Hibernate Questions by Year. ### Input: CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId nu... |
Which 2007 has a 2003 of 1r? | CREATE TABLE table_41027 (
"Tournament" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Win %" text
) | SELECT "2007" FROM table_41027 WHERE "2003" = '1r' | 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 2007 has a 2003 of 1r? ### Input: CREATE TABLE table_41027 (
"Tournament" text,
"2002" text,
"2003" text,
... |
For all employees who have the letters D or S in their first name, return a scatter chart about the correlation between salary 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 SALARY, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | 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 all employees who have the letters D or S in their first name, return a scatter chart about the correlation between sala... |
trying widthrow the HTML posts. | CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
Creati... | SELECT * FROM Posts WHERE Id = 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: trying widthrow the HTML posts. ### Input: CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text... |
show me the flights from BALTIMORE to BOSTON | CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,... | 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 CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOST... | 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 flights from BALTIMORE to BOSTON ### Input: CREATE TABLE city (
city_code varchar,
city_name varchar,
... |
Which chassis had 16 points? | CREATE TABLE table_15327 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Tyres" text,
"Points" real
) | SELECT "Chassis" FROM table_15327 WHERE "Points" = '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: Which chassis had 16 points? ### Input: CREATE TABLE table_15327 (
"Year" real,
"Entrant" text,
"Chassis" text,
... |
What home has 136-134 as the score? | CREATE TABLE table_38119 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
) | SELECT "Home" FROM table_38119 WHERE "Score" = '136-134' | 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 home has 136-134 as the score? ### Input: CREATE TABLE table_38119 (
"Date" text,
"Visitor" text,
"Score" t... |
What team has Windy Hill as their home venue | CREATE TABLE table_name_47 (
home_team VARCHAR,
venue VARCHAR
) | SELECT home_team AS score FROM table_name_47 WHERE venue = "windy hill" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What team has Windy Hill as their home venue ### Input: CREATE TABLE table_name_47 (
home_team VARCHAR,
venue VARCHA... |
What percentage of the votes in Tippah did Obama get? | CREATE TABLE table_23939 (
"County" text,
"Obama%" text,
"Obama#" real,
"McCain%" text,
"McCain#" real
) | SELECT "Obama%" FROM table_23939 WHERE "County" = 'Tippah' | 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 percentage of the votes in Tippah did Obama get? ### Input: CREATE TABLE table_23939 (
"County" text,
"Obama%" ... |
show me flights from DENVER to ATLANTA on 6 16 | CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minu... | 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 = 'ATLANTA' AND date_day.day_number = 16 AND date_day.month_number = 6 AND d... | 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 flights from DENVER to ATLANTA on 6 16 ### Input: CREATE TABLE ground_service (
city_code text,
airport_code... |
What is the 1st leg of the Al Fahaheel Team 1? | CREATE TABLE table_name_11 (
team_1 VARCHAR
) | SELECT 1 AS st_leg FROM table_name_11 WHERE team_1 = "al fahaheel" | 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 1st leg of the Al Fahaheel Team 1? ### Input: CREATE TABLE table_name_11 (
team_1 VARCHAR
) ### Response: SE... |
What is the enrollment for the hawks? | CREATE TABLE table_2562113_1 (
enrollment INTEGER,
nickname VARCHAR
) | SELECT MAX(enrollment) FROM table_2562113_1 WHERE nickname = "Hawks" | 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 enrollment for the hawks? ### Input: CREATE TABLE table_2562113_1 (
enrollment INTEGER,
nickname VARCHAR... |
What home team played against Footscray as the away team? | CREATE TABLE table_54292 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_54292 WHERE "Away 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: What home team played against Footscray as the away team? ### Input: CREATE TABLE table_54292 (
"Home team" text,
"H... |
What is 4zr's callsign? | CREATE TABLE table_name_67 (
callsign VARCHAR,
on_air_id VARCHAR
) | SELECT callsign FROM table_name_67 WHERE on_air_id = "4zr" | 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 4zr's callsign? ### Input: CREATE TABLE table_name_67 (
callsign VARCHAR,
on_air_id VARCHAR
) ### Response: ... |
Bar chart x axis date of birth y axis height, and list by the bar in ascending. | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth | 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 date of birth y axis height, and list by the bar in ascending. ### Input: CREATE TABLE people (
People_... |
Are there 300 -level courses in Spring or Summer term ? | CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
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,
g... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('SP', 'SU', 'SS') AND semester.semester_i... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Are there 300 -level courses in Spring or Summer term ? ### Input: CREATE TABLE program_course (
program_id int,
cou... |
What are the names of the albums that have more than 10 tracks? | CREATE TABLE employees (
id number,
last_name text,
first_name text,
title text,
reports_to number,
birth_date time,
hire_date time,
address text,
city text,
state text,
country text,
postal_code text,
phone text,
fax text,
email text
)
CREATE TABLE artists (... | SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING COUNT(T1.id) > 10 | 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 albums that have more than 10 tracks? ### Input: CREATE TABLE employees (
id number,
last_... |
in how many years was the finish 7th ? | CREATE TABLE table_204_939 (
id number,
"year" number,
"chassis" text,
"engine" text,
"start" text,
"finish" text
) | SELECT COUNT("year") FROM table_204_939 WHERE "finish" = 7 | 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: in how many years was the finish 7th ? ### Input: CREATE TABLE table_204_939 (
id number,
"year" number,
"chassi... |
What First runner-up has a Miss Maja Pilipinas of nanette prodigalidad? | CREATE TABLE table_name_40 (
first_runner_up VARCHAR,
miss_maja_pilipinas VARCHAR
) | SELECT first_runner_up FROM table_name_40 WHERE miss_maja_pilipinas = "nanette prodigalidad" | 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 First runner-up has a Miss Maja Pilipinas of nanette prodigalidad? ### Input: CREATE TABLE table_name_40 (
first_ru... |
specify ethnic origin of patient id 55094 | 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 demographic.ethnicity FROM demographic WHERE demographic.subject_id = "55094" | 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: specify ethnic origin of patient id 55094 ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd... |
what is the maximum total cost to the hospital that includes a vent rate lab test during the previous year? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'vent rate')) AND DATETIME(cost.chargetime, 'start of year') = DATETI... | 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 maximum total cost to the hospital that includes a vent rate lab test during the previous year? ### Input: CREAT... |
Tell me the country for san juan | CREATE TABLE table_31773 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | SELECT "Country" FROM table_31773 WHERE "City" = 'san juan' | 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: Tell me the country for san juan ### Input: CREATE TABLE table_31773 (
"City" text,
"Country" text,
"IATA" text,... |
show me the cheapest flights from BALTIMORE to DALLAS | CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
... | 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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me the cheapest flights from BALTIMORE to DALLAS ### Input: CREATE TABLE class_of_service (
booking_class varchar,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.