instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
How many positions have 14 wins, goals against of 61 and fewer than 19 losses? | CREATE TABLE table_name_7 (
position VARCHAR,
losses VARCHAR,
wins VARCHAR,
goals_against VARCHAR
) | SELECT COUNT(position) FROM table_name_7 WHERE wins = 14 AND goals_against = 61 AND losses < 19 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many positions have 14 wins, goals against of 61 and fewer than 19 losses? ### Input: CREATE TABLE table_name_7 (
po... |
when points against is points again, which are the drawn? | CREATE TABLE table_20396710_1 (
drawn VARCHAR
) | SELECT drawn FROM table_20396710_1 WHERE "points_against" = "points_against" | 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: when points against is points again, which are the drawn? ### Input: CREATE TABLE table_20396710_1 (
drawn VARCHAR
) ###... |
how many players were from notre dame ? | CREATE TABLE table_203_735 (
id number,
"rd" number,
"pick" number,
"player" text,
"position" text,
"school" text
) | SELECT COUNT("player") FROM table_203_735 WHERE "school" = 'notre dame' | 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 players were from notre dame ? ### Input: CREATE TABLE table_203_735 (
id number,
"rd" number,
"pick" n... |
How many semifinalists had a total less than 2, 1st RU greater than 0, 2nd RU was 0 and Miss United Continent of 0? | CREATE TABLE table_44305 (
"Rank" real,
"Country" text,
"Miss United Continent" real,
"Virreina" real,
"1st RU" real,
"2nd RU" real,
"3rd RU" real,
"4th RU" real,
"Semifinalists" real,
"Total" real
) | SELECT COUNT("Semifinalists") FROM table_44305 WHERE "Miss United Continent" = '0' AND "2nd RU" = '0' AND "1st RU" > '0' AND "Total" < '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: How many semifinalists had a total less than 2, 1st RU greater than 0, 2nd RU was 0 and Miss United Continent of 0? ### Inpu... |
Show the name and date for each race and its track name. | CREATE TABLE race (
name VARCHAR,
date VARCHAR,
track_id VARCHAR
)
CREATE TABLE track (
name VARCHAR,
track_id VARCHAR
) | SELECT T1.name, T1.date, T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id | 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 the name and date for each race and its track name. ### Input: CREATE TABLE race (
name VARCHAR,
date VARCHAR,
... |
Name the position that has baltimore bullets and college of texas tech | CREATE TABLE table_name_86 (
position VARCHAR,
team VARCHAR,
college VARCHAR
) | SELECT position FROM table_name_86 WHERE team = "baltimore bullets" AND college = "texas tech" | 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 position that has baltimore bullets and college of texas tech ### Input: CREATE TABLE table_name_86 (
position ... |
when did patient 027-178495 take an intake for the last time until 230 days ago? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-178495')) AND intakeoutput.cellpath LIKE '%intake... | 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 027-178495 take an intake for the last time until 230 days ago? ### Input: CREATE TABLE patient (
uniqu... |
What is Pittodrie Stadium's maximum capacity? | CREATE TABLE table_11208143_9 (
capacity INTEGER,
stadium VARCHAR
) | SELECT MAX(capacity) FROM table_11208143_9 WHERE stadium = "Pittodrie" | 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 Pittodrie Stadium's maximum capacity? ### Input: CREATE TABLE table_11208143_9 (
capacity INTEGER,
stadium V... |
Which program is broadcast most frequently? Give me the program name. | CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_percent number
)
CREATE TABLE channel (
channel_id number,
name text,
owner text,
share_in_percent numb... | SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which program is broadcast most frequently? Give me the program name. ### Input: CREATE TABLE broadcast (
channel_id num... |
Get posts starting with '-1'. | CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownV... | SELECT Id AS "post_link" FROM Posts WHERE 'body' LIKE '<p>-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: Get posts starting with '-1'. ### Input: CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
... |
Which allergy type has most number of allergies? | CREATE TABLE has_allergy (
stuid number,
allergy text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE allergy_type (
allergy text,
allergytype text
) | SELECT allergytype FROM allergy_type GROUP BY allergytype ORDER BY COUNT(*) DESC LIMIT 1 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which allergy type has most number of allergies? ### Input: CREATE TABLE has_allergy (
stuid number,
allergy text
)
... |
How many long range shots did tonya edwards make. | CREATE TABLE table_24906653_5 (
field_goals VARCHAR,
player VARCHAR
) | SELECT COUNT(field_goals) FROM table_24906653_5 WHERE player = "Tonya Edwards" | 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 long range shots did tonya edwards make. ### Input: CREATE TABLE table_24906653_5 (
field_goals VARCHAR,
pl... |
What year was the result did not qualify? | CREATE TABLE table_59413 (
"Year" text,
"Result" text,
"Matches" text,
"Wins" text,
"Draws" text,
"Losses" text
) | SELECT "Year" FROM table_59413 WHERE "Result" = 'did not qualify' | 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 year was the result did not qualify? ### Input: CREATE TABLE table_59413 (
"Year" text,
"Result" text,
"Mat... |
Which champion was from the location of Morrisville, NC, and whose SemiFinalist #2 of Clemson? | CREATE TABLE table_name_47 (
champion VARCHAR,
location VARCHAR,
semi_finalist__number2 VARCHAR
) | SELECT champion FROM table_name_47 WHERE location = "morrisville, nc" AND semi_finalist__number2 = "clemson" | 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 champion was from the location of Morrisville, NC, and whose SemiFinalist #2 of Clemson? ### Input: CREATE TABLE table... |
does dl stand for DL | CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'DL' AND airline_name LIKE 'DELTA' | 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: does dl stand for DL ### Input: CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
man... |
Who was the interview subject in the 2-86 issue? | CREATE TABLE table_20214 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text,
"Pictorials" text
) | SELECT "Interview subject" FROM table_20214 WHERE "Date" = '2-86' | 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 interview subject in the 2-86 issue? ### Input: CREATE TABLE table_20214 (
"Date" text,
"Cover model" te... |
What is the average when the matches are 11? | CREATE TABLE table_name_47 (
average VARCHAR,
matches VARCHAR
) | SELECT average FROM table_name_47 WHERE matches = "11" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average when the matches are 11? ### Input: CREATE TABLE table_name_47 (
average VARCHAR,
matches VARCHA... |
What Player is a Wide Receiver? | CREATE TABLE table_74914 (
"Pick #" real,
"Round" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Player" FROM table_74914 WHERE "Position" = 'wide receiver' | 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 Player is a Wide Receiver? ### Input: CREATE TABLE table_74914 (
"Pick #" real,
"Round" text,
"Player" text... |
Answer score distribution for a user. Returns the (log 10 of the) distribution of the scores for a given user's answers. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... | SELECT Score, COUNT(*) FROM Posts WHERE OwnerUserId = '##UserId##' AND PostTypeId = 2 GROUP BY Score ORDER BY Score | 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: Answer score distribution for a user. Returns the (log 10 of the) distribution of the scores for a given user's answers. ###... |
Python Web Framework Trends (# Questions per Tag per Month). | 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 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: Python Web Framework Trends (# Questions per Tag per Month). ### Input: CREATE TABLE PostsWithDeleted (
Id number,
P... |
what was the last value of a lab test of bedside glucose since 31 months ago for patient 011-55939? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-55939')) AND lab.labname = 'bedside glucose' AND DATETIME(lab.labresulttime) >= DAT... | 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 last value of a lab test of bedside glucose since 31 months ago for patient 011-55939? ### Input: CREATE TABLE ... |
how many tracks last for more than three minutes ? | CREATE TABLE table_204_238 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"performer (s)" text,
"time" text
) | SELECT COUNT("title") FROM table_204_238 WHERE "time" >= 3 | 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 tracks last for more than three minutes ? ### Input: CREATE TABLE table_204_238 (
id number,
"#" number,
... |
How many laps resulted from a Qual of 165.229? | CREATE TABLE table_name_17 (
laps INTEGER,
qual VARCHAR
) | SELECT MAX(laps) FROM table_name_17 WHERE qual = "165.229" | 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 laps resulted from a Qual of 165.229? ### Input: CREATE TABLE table_name_17 (
laps INTEGER,
qual VARCHAR
) ... |
What was the stadium that held that game after week 15? | CREATE TABLE table_name_28 (
stadium VARCHAR,
week INTEGER
) | SELECT stadium FROM table_name_28 WHERE week > 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: What was the stadium that held that game after week 15? ### Input: CREATE TABLE table_name_28 (
stadium VARCHAR,
wee... |
Name the area for population of 53542 | CREATE TABLE table_269888_1 (
area__km²_ VARCHAR,
population__2010_ VARCHAR
) | SELECT area__km²_ FROM table_269888_1 WHERE population__2010_ = 53542 | 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 area for population of 53542 ### Input: CREATE TABLE table_269888_1 (
area__km²_ VARCHAR,
population__2010_... |
When did Avex Entertainment release a CD? | CREATE TABLE table_65412 (
"Region" text,
"Date" text,
"Format" text,
"Label" text,
"Edition" text
) | SELECT "Date" FROM table_65412 WHERE "Format" = 'cd' AND "Label" = 'avex entertainment' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did Avex Entertainment release a CD? ### Input: CREATE TABLE table_65412 (
"Region" text,
"Date" text,
"For... |
Where was the 05/09/1973 venue? | CREATE TABLE table_name_63 (
venue VARCHAR,
date VARCHAR
) | SELECT venue FROM table_name_63 WHERE date = "05/09/1973" | 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 05/09/1973 venue? ### Input: CREATE TABLE table_name_63 (
venue VARCHAR,
date VARCHAR
) ### Response: ... |
List the population density per kilometer for the city of abra de ilog. | CREATE TABLE table_73907 (
"Municipality" text,
"No. of Barangays" real,
"Area (km\u00b2)" text,
"Population (2010)" real,
"Pop. density (per km\u00b2)" text,
"Income Class (2004)" text
) | SELECT "Pop. density (per km\u00b2)" FROM table_73907 WHERE "Municipality" = 'Abra de Ilog' | 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: List the population density per kilometer for the city of abra de ilog. ### Input: CREATE TABLE table_73907 (
"Municipal... |
How many picks have an Overall of 114? | CREATE TABLE table_39403 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT COUNT("Pick #") FROM table_39403 WHERE "Overall" = '114' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many picks have an Overall of 114? ### Input: CREATE TABLE table_39403 (
"Round" real,
"Pick #" real,
"Overa... |
What character did actor Damien Richardson play? | CREATE TABLE table_name_50 (
character VARCHAR,
actor_actress VARCHAR
) | SELECT character FROM table_name_50 WHERE actor_actress = "damien richardson" | 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 character did actor Damien Richardson play? ### Input: CREATE TABLE table_name_50 (
character VARCHAR,
actor_ac... |
Which City of license has a Call sign of w220ba? | CREATE TABLE table_name_64 (
city_of_license VARCHAR,
call_sign VARCHAR
) | SELECT city_of_license FROM table_name_64 WHERE call_sign = "w220ba" | 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 City of license has a Call sign of w220ba? ### Input: CREATE TABLE table_name_64 (
city_of_license VARCHAR,
ca... |
Which Total score/week has a Status of eliminated, and Scores by each individual judge of 5 + 5 + 4 = 14? | CREATE TABLE table_name_38 (
total_score_week VARCHAR,
status VARCHAR,
scores_by_each_individual_judge VARCHAR
) | SELECT total_score_week FROM table_name_38 WHERE status = "eliminated" AND scores_by_each_individual_judge = 5 + 5 + 4 = 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 Total score/week has a Status of eliminated, and Scores by each individual judge of 5 + 5 + 4 = 14? ### Input: CREATE ... |
What isthe minor (South) winners total number is the primary (South) winners is Mendip Gate? | CREATE TABLE table_25635 (
"Season" text,
"Junior (South) Winners" text,
"Intermediate (South) Winners" text,
"Minor (South) Winners" text,
"Primary (South) Winners" text
) | SELECT COUNT("Minor (South) Winners") FROM table_25635 WHERE "Primary (South) Winners" = 'Mendip Gate' | 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 isthe minor (South) winners total number is the primary (South) winners is Mendip Gate? ### Input: CREATE TABLE table_2... |
What was the result at the Berlin International Film Festival in a year greater than 1987? | CREATE TABLE table_name_80 (
result VARCHAR,
year VARCHAR,
awards VARCHAR
) | SELECT result FROM table_name_80 WHERE year > 1987 AND awards = "berlin international film festival" | 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 at the Berlin International Film Festival in a year greater than 1987? ### Input: CREATE TABLE table_nam... |
Who is the successor when the reason for change is died November 11, 1845? | CREATE TABLE table_225205_4 (
successor VARCHAR,
reason_for_change VARCHAR
) | SELECT successor FROM table_225205_4 WHERE reason_for_change = "Died November 11, 1845" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the successor when the reason for change is died November 11, 1845? ### Input: CREATE TABLE table_225205_4 (
succ... |
What episode number was written by Gregg Hurwitz? | CREATE TABLE table_24938621_3 (
no VARCHAR,
written_by VARCHAR
) | SELECT no FROM table_24938621_3 WHERE written_by = "Gregg Hurwitz" | 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 episode number was written by Gregg Hurwitz? ### Input: CREATE TABLE table_24938621_3 (
no VARCHAR,
written_by ... |
What is the total year of release of the title what goes around comes around? | CREATE TABLE table_76357 (
"Year of release" real,
"Title" text,
"Label" text,
"Format" text,
"Cat. No." text
) | SELECT COUNT("Year of release") FROM table_76357 WHERE "Title" = 'what goes around comes around' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total year of release of the title what goes around comes around? ### Input: CREATE TABLE table_76357 (
"Yea... |
what was the four most commonly carried out specimen tests until 2103? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE... | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE STRFTIME('%y', microbiologyevents.charttime) <= '2103' GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 4 | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the four most commonly carried out specimen tests until 2103? ### Input: CREATE TABLE chartevents (
row_id numb... |
Which golfer finished with a score of 70-71=141? | CREATE TABLE table_59416 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Player" FROM table_59416 WHERE "Score" = '70-71=141' | 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 golfer finished with a score of 70-71=141? ### Input: CREATE TABLE table_59416 (
"Place" text,
"Player" text,
... |
Questions with a specific tag. | 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 p.Id AS "post_link", p.Title FROM Posts AS p LEFT JOIN PostTags AS pt ON p.Id = pt.PostId LEFT JOIN Tags AS t ON pt.TagId = t.Id LEFT JOIN PostTags AS pt2 ON p.Id = pt2.PostId LEFT JOIN Tags AS t2 ON pt2.TagId = t2.Id WHERE PostTypeId = 1 AND t.TagName = 'raw' AND t2.TagName = '##tag:string##' ORDER BY ViewCount... | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions with a specific tag. ### Input: CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
... |
For those records from the products and each product's manufacturer, visualize a scatter chart about the correlation between manufacturer and revenue , and group by attribute headquarter. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Manufacturer, Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | 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, visualize a scatter chart about the correlation between... |
what is the week when the finalist is marcelo r os? | CREATE TABLE table_name_16 (
week VARCHAR,
finalist VARCHAR
) | SELECT week FROM table_name_16 WHERE finalist = "marcelo ríos" | 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 week when the finalist is marcelo r os? ### Input: CREATE TABLE table_name_16 (
week VARCHAR,
finalist V... |
did the last serology/blood microbiology test of patient 8005 until 2104 show any organism? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8005) AND microbiologyevents.spec_type_desc = 'serology/blood' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y', microbiologyevents.charttime) <= '2104' O... | 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: did the last serology/blood microbiology test of patient 8005 until 2104 show any organism? ### Input: CREATE TABLE transfer... |
What is the status for Pointe-Verte, with a population smaller than 1,137? | CREATE TABLE table_9245 (
"Official Name" text,
"Status" text,
"Area km 2" real,
"Population" real,
"Census Ranking" text
) | SELECT "Status" FROM table_9245 WHERE "Population" < '1,137' AND "Official Name" = 'pointe-verte' | 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 status for Pointe-Verte, with a population smaller than 1,137? ### Input: CREATE TABLE table_9245 (
"Officia... |
Show the total number from each payment method code, show in desc by the bar. | CREATE TABLE Customer_Payments (
customer_id INTEGER,
datetime_payment DATETIME,
payment_method_code VARCHAR(10),
amount_payment DOUBLE
)
CREATE TABLE Vehicles (
vehicle_id INTEGER,
vehicle_details VARCHAR(255)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCH... | SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code ORDER BY payment_method_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 total number from each payment method code, show in desc by the bar. ### Input: CREATE TABLE Customer_Payments (
... |
What artist's song was performed in the week with theme of Billboard #1? | CREATE TABLE table_name_89 (
artist VARCHAR,
theme VARCHAR
) | SELECT artist FROM table_name_89 WHERE theme = "billboard #1" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What artist's song was performed in the week with theme of Billboard #1? ### Input: CREATE TABLE table_name_89 (
artist ... |
how many patients whose year of birth is less than 2200 and item id is 50882? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2200" AND lab.itemid = "50882" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose year of birth is less than 2200 and item id is 50882? ### Input: CREATE TABLE prescriptions (
su... |
What date was the Home team fitzroy? | CREATE TABLE table_name_18 (
date VARCHAR,
home_team VARCHAR
) | SELECT date FROM table_name_18 WHERE home_team = "fitzroy" | 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 date was the Home team fitzroy? ### Input: CREATE TABLE table_name_18 (
date VARCHAR,
home_team VARCHAR
) ### R... |
when province is monse or nouel, what is the area (km )? | CREATE TABLE table_73059 (
"Province" text,
"Capital" text,
"Area (km\u00b2)" text,
"Population" real,
"Density" real,
"Map region" real
) | SELECT "Area (km\u00b2)" FROM table_73059 WHERE "Province" = 'Monseñor Nouel' | 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 province is monse or nouel, what is the area (km )? ### Input: CREATE TABLE table_73059 (
"Province" text,
"Cap... |
Name the high rebounds for 77 game | CREATE TABLE table_27755784_11 (
high_rebounds VARCHAR,
game VARCHAR
) | SELECT high_rebounds FROM table_27755784_11 WHERE game = 77 | 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 high rebounds for 77 game ### Input: CREATE TABLE table_27755784_11 (
high_rebounds VARCHAR,
game VARCHAR
)... |
What is the lowest dye absoprtion in nm? | CREATE TABLE table_26428602_1 (
absorb__nm_ INTEGER
) | SELECT MIN(absorb__nm_) FROM table_26428602_1 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest dye absoprtion in nm? ### Input: CREATE TABLE table_26428602_1 (
absorb__nm_ INTEGER
) ### Response: ... |
What is the date of the game with 38,062 people in attendance? | CREATE TABLE table_38784 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Date" FROM table_38784 WHERE "Attendance" = '38,062' | 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 date of the game with 38,062 people in attendance? ### Input: CREATE TABLE table_38784 (
"Date" text,
"O... |
Who are the hosts for the 2004 event? | CREATE TABLE table_name_2 (
hosts VARCHAR,
year VARCHAR
) | SELECT hosts FROM table_name_2 WHERE year = "2004" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who are the hosts for the 2004 event? ### Input: CREATE TABLE table_name_2 (
hosts VARCHAR,
year VARCHAR
) ### Respo... |
what was the time patient 89840 was discharged from the hospital for the last time until 2104? | 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 d_labitems (
row_id number,
itemid number,
label te... | SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 89840 AND STRFTIME('%y', admissions.dischtime) <= '2104' ORDER BY admissions.dischtime 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: what was the time patient 89840 was discharged from the hospital for the last time until 2104? ### Input: CREATE TABLE icust... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of price , and group by attribute headquarter, and sort bars from high to low order. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter 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: For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter ... |
What is the name of immunity when the finish is 3rd voted out day 9? | CREATE TABLE table_28742659_2 (
immunity VARCHAR,
finish VARCHAR
) | SELECT immunity FROM table_28742659_2 WHERE finish = "3rd voted Out Day 9" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of immunity when the finish is 3rd voted out day 9? ### Input: CREATE TABLE table_28742659_2 (
immunity... |
What is the Population of Tshepiso with a Code of 70409 or smaller and an Area (km 2) smaller than 5.97? | CREATE TABLE table_name_66 (
population INTEGER,
place VARCHAR,
code VARCHAR,
area__km_2__ VARCHAR
) | SELECT MIN(population) FROM table_name_66 WHERE code < 70409 AND area__km_2__ < 5.97 AND place = "tshepiso" | 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 Population of Tshepiso with a Code of 70409 or smaller and an Area (km 2) smaller than 5.97? ### Input: CREATE T... |
For each account type, find the average account balance of customers with credit score lower than 50 Show bar chart, show by the y-axis in ascending. | CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state varchar(20)
)
CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state ... | SELECT acc_type, AVG(acc_bal) FROM customer WHERE credit_score < 50 GROUP BY acc_type ORDER BY AVG(acc_bal) | 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 each account type, find the average account balance of customers with credit score lower than 50 Show bar chart, show by... |
How many teams finished in the top team with an average finish of 23.3? | CREATE TABLE table_2190919_1 (
top_10 VARCHAR,
avg_finish VARCHAR
) | SELECT COUNT(top_10) FROM table_2190919_1 WHERE avg_finish = "23.3" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many teams finished in the top team with an average finish of 23.3? ### Input: CREATE TABLE table_2190919_1 (
top_10... |
when was the first time that patient 022-61539 got a output amt-blake drain c output since 1074 days ago? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-61539')) AND intakeoutput.cellpath LIKE '%output%... | 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 was the first time that patient 022-61539 got a output amt-blake drain c output since 1074 days ago? ### Input: CREATE ... |
how many tracks are listed in this table ? | CREATE TABLE table_204_184 (
id number,
"#" number,
"title" text,
"producer(s)" text,
"featured guest(s)" text,
"length" text
) | SELECT COUNT("title") FROM table_204_184 | 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 tracks are listed in this table ? ### Input: CREATE TABLE table_204_184 (
id number,
"#" number,
"title... |
Which prerequisites have I already completed for ASIAN 539 ? | CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, student_record WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'ASIAN' AND COURSE_1.number =... | 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 prerequisites have I already completed for ASIAN 539 ? ### Input: CREATE TABLE course_offering (
offering_id int,
... |
when did patient 24547 since 2132 days ago had chest tube #1 output for the 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 outputevents.charttime FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24547)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'ches... | 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 did patient 24547 since 2132 days ago had chest tube #1 output for the first time? ### Input: CREATE TABLE admissions (... |
What is the score in the final of the tournament with a hard surface? | CREATE TABLE table_13706 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | SELECT "Score in the final" FROM table_13706 WHERE "Surface" = 'hard' | 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 score in the final of the tournament with a hard surface? ### Input: CREATE TABLE table_13706 (
"Outcome" te... |
how much is the bone fracture(s) - sternum diagnostic cost? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'bone fracture(s) - sternum') | 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: how much is the bone fracture(s) - sternum diagnostic cost? ### Input: CREATE TABLE allergy (
allergyid number,
pati... |
provide the number of patients whose ethnicity is white and diagnoses long title is personal history of hodgkin's disease? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.long_title = "Personal history of hodgkin's disease" | 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 white and diagnoses long title is personal history of hodgkin's disease? #... |
The Kansas City Wizards had a 9-10-9 record and what goals against avg? | CREATE TABLE table_17708 (
"Club" text,
"Overall Record" text,
"Goals For" real,
"Goals For Avg." text,
"Goals Against" real,
"Goals Against Avg." text
) | SELECT "Goals Against Avg." FROM table_17708 WHERE "Overall Record" = '9-10-9' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The Kansas City Wizards had a 9-10-9 record and what goals against avg? ### Input: CREATE TABLE table_17708 (
"Club" tex... |
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday, display Y-axis in desc order. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(MANAGER_ID) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date an... |
What's listed for the Elevated with a Cardinalatial title of Priest of S. Eusebio and Archbishop of Benevento? | CREATE TABLE table_name_25 (
elevated VARCHAR,
cardinalatial_title VARCHAR
) | SELECT elevated FROM table_name_25 WHERE cardinalatial_title = "priest of s. eusebio and archbishop of benevento" | 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 listed for the Elevated with a Cardinalatial title of Priest of S. Eusebio and Archbishop of Benevento? ### Input: CR... |
Name the least attendance with visitor of edmonton | CREATE TABLE table_name_98 (
attendance INTEGER,
visitor VARCHAR
) | SELECT MIN(attendance) FROM table_name_98 WHERE visitor = "edmonton" | 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 least attendance with visitor of edmonton ### Input: CREATE TABLE table_name_98 (
attendance INTEGER,
visit... |
show me what fare codes symbols stand for | CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE... | SELECT DISTINCT fare_basis_code FROM fare_basis | 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 what fare codes symbols stand for ### Input: CREATE TABLE flight_leg (
flight_id int,
leg_number int,
le... |
What group has 1200 m as the distance? | CREATE TABLE table_name_82 (
group VARCHAR,
distance VARCHAR
) | SELECT group FROM table_name_82 WHERE distance = "1200 m" | 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 group has 1200 m as the distance? ### Input: CREATE TABLE table_name_82 (
group VARCHAR,
distance VARCHAR
) ###... |
has patient 027-68991 visited an emergency room until 2104? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '027-68991' AND patient.hospitaladmitsource = 'emergency department' AND STRFTIME('%y', patient.unitadmittime) <= '2104' | 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: has patient 027-68991 visited an emergency room until 2104? ### Input: CREATE TABLE intakeoutput (
intakeoutputid number... |
What was the location and attendance at the game when the record was 9-6? | CREATE TABLE table_name_54 (
location_attendance VARCHAR,
record VARCHAR
) | SELECT location_attendance FROM table_name_54 WHERE record = "9-6" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the location and attendance at the game when the record was 9-6? ### Input: CREATE TABLE table_name_54 (
locati... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of department_id bin hire_date by weekday, list in asc by the y axis. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40)... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(DEPARTMENT_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: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about... |
What is the number of professors who are in the Accounting or Biology departments? | CREATE TABLE student (
stu_num number,
stu_lname text,
stu_fname text,
stu_init text,
stu_dob time,
stu_hrs number,
stu_class text,
stu_gpa number,
stu_transfer number,
dept_code text,
stu_phone text,
prof_num number
)
CREATE TABLE department (
dept_code text,
de... | SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology' | 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 is the number of professors who are in the Accounting or Biology departments? ### Input: CREATE TABLE student (
stu... |
Which Tournament was on 2 October 2006? | CREATE TABLE table_42891 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | SELECT "Tournament" FROM table_42891 WHERE "Date" = '2 october 2006' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Tournament was on 2 October 2006? ### Input: CREATE TABLE table_42891 (
"Date" text,
"Tournament" text,
"S... |
How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get? | CREATE TABLE table_47046 (
"Squad No." real,
"Name" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"FLT Apps" text,
"FLT Goals" real,
"Playoff Apps" text,
"Playo... | SELECT SUM("Total Goals") FROM table_47046 WHERE "Playoff Apps" = '2' AND "FA Cup Apps" = '2' AND "League Cup Goals" < '0' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get? ### Input: CREATE TABLE t... |
count how many times patient 44848 went to the hospital in 2105. | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuo... | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 44848 AND STRFTIME('%y', admissions.admittime) = '2105' | 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: count how many times patient 44848 went to the hospital in 2105. ### Input: CREATE TABLE microbiologyevents (
row_id num... |
how much has patient 006-76924's change of weight second measured on the current hospital visit compared to the first value measured on the current hospital visit? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-76924' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1 OFFSET 1) ... | 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: how much has patient 006-76924's change of weight second measured on the current hospital visit compared to the first value ... |
Where was the event Kage Kombat 16? | CREATE TABLE table_48561 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text,
"Location" text
) | SELECT "Location" FROM table_48561 WHERE "Event" = 'kage kombat 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: Where was the event Kage Kombat 16? ### Input: CREATE TABLE table_48561 (
"Res." text,
"Record" text,
"Opponent"... |
What record has @ detroit as the opponent? | CREATE TABLE table_name_61 (
record VARCHAR,
opponent VARCHAR
) | SELECT record FROM table_name_61 WHERE opponent = "@ detroit" | 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 record has @ detroit as the opponent? ### Input: CREATE TABLE table_name_61 (
record VARCHAR,
opponent VARCHAR
... |
Where is the historic place that was built in 1910? | CREATE TABLE table_44962 (
"Name" text,
"Built" text,
"Listed" text,
"Location" text,
"County" text
) | SELECT "Location" FROM table_44962 WHERE "Built" = '1910' | 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: Where is the historic place that was built in 1910? ### Input: CREATE TABLE table_44962 (
"Name" text,
"Built" text,... |
count the number of patients whose discharge location is left against medical advi and procedure icd9 code is 3808? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND procedures.icd9_code = "3808" | 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 discharge location is left against medical advi and procedure icd9 code is 3808? ### Inpu... |
What is Award, when Result is 'Nominated', and when Film is 'Sankranthi'? | CREATE TABLE table_name_66 (
award VARCHAR,
result VARCHAR,
film VARCHAR
) | SELECT award FROM table_name_66 WHERE result = "nominated" AND film = "sankranthi" | 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 Award, when Result is 'Nominated', and when Film is 'Sankranthi'? ### Input: CREATE TABLE table_name_66 (
award ... |
What is the lowest capacity for 1903? | CREATE TABLE table_name_75 (
capacity INTEGER,
year_opened VARCHAR
) | SELECT MIN(capacity) FROM table_name_75 WHERE year_opened = "1903" | 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 capacity for 1903? ### Input: CREATE TABLE table_name_75 (
capacity INTEGER,
year_opened VARCHAR
... |
what is admission location and discharge location of subject id 4589? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "4589" | 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 admission location and discharge location of subject id 4589? ### Input: CREATE TABLE lab (
subject_id text,
... |
What is the length of the highway with junctions i-35 us 83 and named us 83 bus.? | CREATE TABLE table_name_25 (
length VARCHAR,
junctions VARCHAR,
route_name VARCHAR
) | SELECT length FROM table_name_25 WHERE junctions = "i-35 us 83" AND route_name = "us 83 bus." | 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 length of the highway with junctions i-35 us 83 and named us 83 bus.? ### Input: CREATE TABLE table_name_25 (
... |
Name the record with opponent of christian nielson | CREATE TABLE table_68933 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text,
"Location" text
) | SELECT "Record" FROM table_68933 WHERE "Opponent" = 'christian nielson' | 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 record with opponent of christian nielson ### Input: CREATE TABLE table_68933 (
"Res." text,
"Record" text,... |
Tell me the named after for diameter less than 19.2 and latitude more than -37.5 with longitude less than 67.3 | CREATE TABLE table_56992 (
"Name" text,
"Latitude" real,
"Longitude" real,
"Diameter (km)" real,
"Named after" text
) | SELECT "Named after" FROM table_56992 WHERE "Diameter (km)" < '19.2' AND "Latitude" > '-37.5' AND "Longitude" < '67.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: Tell me the named after for diameter less than 19.2 and latitude more than -37.5 with longitude less than 67.3 ### Input: CR... |
history of leukopenia, anemia, hepatic or renal dysfunction or malignancy | CREATE TABLE table_test_9 (
"id" int,
"ejection_fraction_ef" int,
"anemia" bool,
"child_pugh_class" string,
"systolic_blood_pressure_sbp" int,
"leukopenia" int,
"heart_disease" bool,
"stroke" bool,
"av_block" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"estimated_... | SELECT * FROM table_test_9 WHERE leukopenia = 1 OR anemia = 1 OR hepatic_disease = 1 OR renal_disease = 1 OR malignancy = 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: history of leukopenia, anemia, hepatic or renal dysfunction or malignancy ### Input: CREATE TABLE table_test_9 (
"id" in... |
Which classes in the UKRAINE 400 / 500 level have the least amount of work ? | CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_l... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN program_course WHERE ((course.number < 400 + 100 AND course.number >= 400) OR (course.number < 500 + 100 AND course.number >= 500)) AND course.department = 'UKRAINE' AND program_course.workload = (SELECT MIN(PR... | 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 in the UKRAINE 400 / 500 level have the least amount of work ? ### Input: CREATE TABLE instructor (
instru... |
What was the date of the Red Wings home game against Anaheim? | CREATE TABLE table_name_30 (
date VARCHAR,
visitor VARCHAR
) | SELECT date FROM table_name_30 WHERE visitor = "anaheim" | 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 date of the Red Wings home game against Anaheim? ### Input: CREATE TABLE table_name_30 (
date VARCHAR,
... |
how many games did this team play against spain ? | CREATE TABLE table_204_933 (
id number,
"year" number,
"competition" text,
"date" text,
"location" text,
"opponent" text,
"score" text,
"result" text,
"bye" text
) | SELECT COUNT(*) FROM table_204_933 WHERE "opponent" = 'spain' | 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 games did this team play against spain ? ### Input: CREATE TABLE table_204_933 (
id number,
"year" number,
... |
questions with tag javascript that have code snippets and answer. | CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT Title, Tags FROM Posts AS Question WHERE Question.Tags LIKE '%<java>%' | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: questions with tag javascript that have code snippets and answer. ### Input: CREATE TABLE Posts (
Id number,
PostTyp... |
What is the Spouse of the Duchess that has a Death on 6 april 1780? | CREATE TABLE table_6453 (
"Birth" text,
"Marriage" text,
"Became Duchess" text,
"Ceased to be Duchess" text,
"Death" text,
"Spouse" text
) | SELECT "Spouse" FROM table_6453 WHERE "Death" = '6 april 1780' | 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 Spouse of the Duchess that has a Death on 6 april 1780? ### Input: CREATE TABLE table_6453 (
"Birth" text,
... |
What is the smallest introduced value? | CREATE TABLE table_1081459_1 (
introduced INTEGER
) | SELECT MIN(introduced) FROM table_1081459_1 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest introduced value? ### Input: CREATE TABLE table_1081459_1 (
introduced INTEGER
) ### Response: SELE... |
where does CP fly | CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name ... | SELECT DISTINCT airport.airport_code FROM airport, flight WHERE flight.airline_code = 'CP' AND flight.to_airport = airport.airport_code | 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: where does CP fly ### Input: CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare... |
Which Losses have Draws smaller than 0? | CREATE TABLE table_66656 (
"Wimmera FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT MAX("Losses") FROM table_66656 WHERE "Draws" < '0' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Losses have Draws smaller than 0? ### Input: CREATE TABLE table_66656 (
"Wimmera FL" text,
"Wins" real,
"B... |
My Close Votes for Tag X. | CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId ... | SELECT p.Id AS "post_link", c.CreationDate, Tags FROM Comments AS c JOIN Posts AS p ON c.PostId = p.Id WHERE c.Text LIKE '%voting to close%' AND (Tags LIKE '%<email>%' OR Tags LIKE '%<spam>%') AND c.UserId = '##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: My Close Votes for Tag X. ### Input: CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.