instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
what was patient 13897's daily average value of body weight until 07/2104? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
value... | SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13897)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admi... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was patient 13897's daily average value of body weight until 07/2104? ### Input: CREATE TABLE cost (
row_id number,... |
what's the number of patients who left the hospital in 2101? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicatio... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) = '2101' | 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's the number of patients who left the hospital in 2101? ### Input: CREATE TABLE lab (
labid number,
patientunit... |
Search: Posts by specific two Tags. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
Dupli... | SELECT P.Id AS "post_link", P.Tags, P.CreationDate FROM Posts AS P WHERE P.AnswerCount > 0 AND P.Tags LIKE '%##Tag1##%' AND P.Tags LIKE '%##Tag2##%' ORDER BY P.CreationDate DESC LIMIT 50000 | 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: Search: Posts by specific two Tags. ### Input: CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId num... |
Plot the total number by grouped by nationality as a bar graph, I want to list by the Y in ascending. | CREATE TABLE journalist (
journalist_ID int,
Name text,
Nationality text,
Age text,
Years_working int
)
CREATE TABLE news_report (
journalist_ID int,
Event_ID int,
Work_Type text
)
CREATE TABLE event (
Event_ID int,
Date text,
Venue text,
Name text,
Event_Attendance... | SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality ORDER BY COUNT(*) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Plot the total number by grouped by nationality as a bar graph, I want to list by the Y in ascending. ### Input: CREATE TABL... |
What is the average finish when winnings equals $71,200? | CREATE TABLE table_24649 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
) | SELECT "Avg. Finish" FROM table_24649 WHERE "Winnings" = '$71,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 is the average finish when winnings equals $71,200? ### Input: CREATE TABLE table_24649 (
"Year" real,
"Starts"... |
What is WSU Year(s), when Pro Year(s) is 1974-77? | CREATE TABLE table_name_88 (
wsu_year_s_ VARCHAR,
pro_year_s_ VARCHAR
) | SELECT wsu_year_s_ FROM table_name_88 WHERE pro_year_s_ = "1974-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: What is WSU Year(s), when Pro Year(s) is 1974-77? ### Input: CREATE TABLE table_name_88 (
wsu_year_s_ VARCHAR,
pro_y... |
Top 2000 Stack Overflow Users From Netherlands By Reputation. Top 2000 SO users from Netherlands or Netherlands based cities. | CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE ReviewTaskResults (
Id number,
Review... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS Position, DisplayName, Reputation, WebsiteUrl, Location, WebsiteUrl, AboutMe, 'http://stackoverflow.com/users/' + CAST(Id AS TEXT(10)) AS ProfileUrl FROM Users WHERE UPPER(Location) LIKE '%NETHERLANDS%' OR UPPER(Location) LIKE '%NEDERLAND%' OR UPPER(Location) LIKE ... | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 2000 Stack Overflow Users From Netherlands By Reputation. Top 2000 SO users from Netherlands or Netherlands based cities... |
Show the transaction type and the number of transactions by a bar chart, and show in descending by the transaction_type. | CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20)... | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY transaction_type 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 transaction type and the number of transactions by a bar chart, and show in descending by the transaction_type. ###... |
who is the first loser listed on this chart ? | CREATE TABLE table_204_373 (
id number,
"wager" text,
"winner" text,
"loser" text,
"location" text,
"date" text
) | SELECT "loser" FROM table_204_373 WHERE id = 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who is the first loser listed on this chart ? ### Input: CREATE TABLE table_204_373 (
id number,
"wager" text,
"... |
What is the Ratt of the year with a 78 long? | CREATE TABLE table_name_97 (
ratt VARCHAR,
long VARCHAR
) | SELECT ratt FROM table_name_97 WHERE long = "78" | 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 Ratt of the year with a 78 long? ### Input: CREATE TABLE table_name_97 (
ratt VARCHAR,
long VARCHAR
) ##... |
How many students are advised by each rank of faculty? List the rank and the number of students Plot them as bar chart, I want to display from low to high by the Rank please. | CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID IN... | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY Rank | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many students are advised by each rank of faculty? List the rank and the number of students Plot them as bar chart, I wa... |
Who was the architect that built the Electric Railway Chambers before 1915? | CREATE TABLE table_name_43 (
architect VARCHAR,
built VARCHAR,
building VARCHAR
) | SELECT architect FROM table_name_43 WHERE built < 1915 AND building = "electric railway chambers" | 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 architect that built the Electric Railway Chambers before 1915? ### Input: CREATE TABLE table_name_43 (
arch... |
What players have a position of F? | CREATE TABLE table_name_2 (
player VARCHAR,
position VARCHAR
) | SELECT player FROM table_name_2 WHERE position = "f" | 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 players have a position of F? ### Input: CREATE TABLE table_name_2 (
player VARCHAR,
position VARCHAR
) ### Res... |
Find Questions with one tag and specific answer text. | CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... | SELECT P.Id AS "post_link", P.Tags FROM Posts AS P, PostTags AS Pt, Tags AS T WHERE P.Id = Pt.PostId AND T.Id = Pt.TagId AND T.TagName = '##tag1##' AND P.PostTypeId = 1 AND P.AnswerCount > 0 AND NOT P.AcceptedAnswerId IS NULL AND NOT (SELECT P2.Id FROM Posts AS P2 WHERE P2.Id = P.AcceptedAnswerId AND P2.Body LIKE '%##t... | 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: Find Questions with one tag and specific answer text. ### Input: CREATE TABLE TagSynonyms (
Id number,
SourceTagName... |
Who was the away team against Newton Heath? | CREATE TABLE table_59909 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Away team" FROM table_59909 WHERE "Home team" = 'newton heath' | 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 away team against Newton Heath? ### Input: CREATE TABLE table_59909 (
"Tie no" text,
"Home team" text,
... |
On what Date was the Score of 3 6, 6 4, 3 6, 6 1, 6 2 | CREATE TABLE table_56197 (
"Outcome" text,
"Date" real,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT SUM("Date") FROM table_56197 WHERE "Score" = '3–6, 6–4, 3–6, 6–1, 6–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: On what Date was the Score of 3 6, 6 4, 3 6, 6 1, 6 2 ### Input: CREATE TABLE table_56197 (
"Outcome" text,
"Date" r... |
what's the number of hours that have passed since patient 013-38992 first stayed in ward 561 during this hospital visit? | 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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '013-38992' AND patient.wardid = 561 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 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: what's the number of hours that have passed since patient 013-38992 first stayed in ward 561 during this hospital visit? ###... |
Which athlete, has an 18.55 result | CREATE TABLE table_79341 (
"Rank" real,
"Group" text,
"Athlete" text,
"Nationality" text,
"Result" real
) | SELECT "Athlete" FROM table_79341 WHERE "Result" = '18.55' | 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 athlete, has an 18.55 result ### Input: CREATE TABLE table_79341 (
"Rank" real,
"Group" text,
"Athlete" te... |
What position did the BMW vehicle made in 2006 hold? | CREATE TABLE table_71693 (
"Year" real,
"Class" text,
"Vehicle" text,
"Position" text,
"Stages won" text
) | SELECT "Position" FROM table_71693 WHERE "Vehicle" = 'bmw' AND "Year" = '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: What position did the BMW vehicle made in 2006 hold? ### Input: CREATE TABLE table_71693 (
"Year" real,
"Class" text... |
Return a bar chart about the distribution of personal_name and author_id . | CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Courses (
course_id INTEGER,
author_... | SELECT personal_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of personal_name and author_id . ### Input: CREATE TABLE Students (
student_id... |
what are the flights from DALLAS to BOSTON for tomorrow night or evening | CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code 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, date_day, days, flight WHERE ((((flight.departure_time BETWEEN 1800 AND 2200) OR (NOT flight.departure_time BETWEEN 601 AND 1759)) AND date_day.day_number = 20 AND date_day.m... | 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 are the flights from DALLAS to BOSTON for tomorrow night or evening ### Input: CREATE TABLE month (
month_number in... |
find the number of patients who were admitted to the hospital in the last year. | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of patients who were admitted to the hospital in the last year. ### Input: CREATE TABLE lab (
labid numb... |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of price , and group by attribute name, and rank by the y axis from low to high. | 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 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, a bar chart shows the distribution of name and the sum ... |
What is the full number of New Council when the previous council was 54 and the staying councilor number is bigger than 36? | CREATE TABLE table_name_82 (
new_council VARCHAR,
previous_council VARCHAR,
staying_councillors VARCHAR
) | SELECT COUNT(new_council) FROM table_name_82 WHERE previous_council = 54 AND staying_councillors > 36 | 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 full number of New Council when the previous council was 54 and the staying councilor number is bigger than 36? ... |
On what date was the crowd size of 71,789? | CREATE TABLE table_name_35 (
date VARCHAR,
attendance VARCHAR
) | SELECT date FROM table_name_35 WHERE attendance = "71,789" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date was the crowd size of 71,789? ### Input: CREATE TABLE table_name_35 (
date VARCHAR,
attendance VARCHAR
... |
Name the date for adelaide for westpac stadium | CREATE TABLE table_16388439_3 (
date VARCHAR,
home_team VARCHAR,
ground VARCHAR
) | SELECT date FROM table_16388439_3 WHERE home_team = "Adelaide" AND ground = "Westpac Stadium" | 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 date for adelaide for westpac stadium ### Input: CREATE TABLE table_16388439_3 (
date VARCHAR,
home_team VA... |
How many total smartphones were shipped during the quarter 2012 Q1? | CREATE TABLE table_974 (
"Quarter" text,
"Android" text,
"iOS" text,
"Symbian" text,
"BlackBerry OS" text,
"Linux" text,
"Windows Phone" text,
"Other" text,
"Total" text
) | SELECT COUNT("Total") FROM table_974 WHERE "Quarter" = '2012 Q1' | 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 smartphones were shipped during the quarter 2012 Q1? ### Input: CREATE TABLE table_974 (
"Quarter" text,
... |
When was the audio book with target number 069 69 released? | CREATE TABLE table_20174050_1 (
release_date VARCHAR,
target__number VARCHAR
) | SELECT release_date FROM table_20174050_1 WHERE target__number = "069 69" | 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 was the audio book with target number 069 69 released? ### Input: CREATE TABLE table_20174050_1 (
release_date VARC... |
what song was this artist on after utabito ? | CREATE TABLE table_204_643 (
id number,
"release" number,
"artist" text,
"title" text,
"notes" text,
"album" text
) | SELECT "title" FROM table_204_643 WHERE "release" > (SELECT "release" FROM table_204_643 WHERE "title" = 'utabito (歌人 singer?)') ORDER BY "release" LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what song was this artist on after utabito ? ### Input: CREATE TABLE table_204_643 (
id number,
"release" number,
... |
name the nations that won at least 2 gold medals . | CREATE TABLE table_204_771 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "nation" FROM table_204_771 WHERE "gold" >= 2 | 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: name the nations that won at least 2 gold medals . ### Input: CREATE TABLE table_204_771 (
id number,
"rank" number,... |
What's the score on february 18 when the visitors are the montreal canadiens? | CREATE TABLE table_7871 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Score" FROM table_7871 WHERE "Visitor" = 'montreal canadiens' AND "Date" = 'february 18' | 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 score on february 18 when the visitors are the montreal canadiens? ### Input: CREATE TABLE table_7871 (
"Date... |
How many players are from each country. Show a pie chart. | CREATE TABLE team (
Team_id int,
Name text
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
... | SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many players are from each country. Show a pie chart. ### Input: CREATE TABLE team (
Team_id int,
Name text
)
C... |
What was the score of the game that had a loss of Chad Fox (3 3)? | CREATE TABLE table_75469 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text,
"Attendance" real,
"Record" text
) | SELECT "Score" FROM table_75469 WHERE "Loss" = 'chad fox (3–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 was the score of the game that had a loss of Chad Fox (3 3)? ### Input: CREATE TABLE table_75469 (
"Date" text,
... |
Which Record that has a Loss of mays (0-3)? | CREATE TABLE table_14565 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Record" FROM table_14565 WHERE "Loss" = 'mays (0-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: Which Record that has a Loss of mays (0-3)? ### Input: CREATE TABLE table_14565 (
"Date" text,
"Opponent" text,
... |
If points against was 371, what is the drawn? | CREATE TABLE table_74944 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Drawn" FROM table_74944 WHERE "Points against" = '371' | 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: If points against was 371, what is the drawn? ### Input: CREATE TABLE table_74944 (
"Club" text,
"Played" text,
... |
When the home team was fitzroy, what did the away team score? | CREATE TABLE table_77741 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_77741 WHERE "Home team" = 'fitzroy' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When the home team was fitzroy, what did the away team score? ### Input: CREATE TABLE table_77741 (
"Home team" text,
... |
Find the id of the customers who have order status both 'On Road' and 'Shipped'. | CREATE TABLE customers (
customer_id VARCHAR
)
CREATE TABLE orders (
customer_id VARCHAR,
order_status VARCHAR
) | SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped" | 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: Find the id of the customers who have order status both 'On Road' and 'Shipped'. ### Input: CREATE TABLE customers (
cus... |
Can you tell me the Away team that has the Home team of south dragons, and the Score of 94-81? | CREATE TABLE table_name_17 (
away_team VARCHAR,
home_team VARCHAR,
score VARCHAR
) | SELECT away_team FROM table_name_17 WHERE home_team = "south dragons" AND score = "94-81" | 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: Can you tell me the Away team that has the Home team of south dragons, and the Score of 94-81? ### Input: CREATE TABLE table... |
In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'? | CREATE TABLE stadium (
id number,
name text,
home_games number,
average_attendance number,
total_attendance number,
capacity_percentage number
)
CREATE TABLE game (
stadium_id number,
id number,
season number,
date text,
home_team text,
away_team text,
score text,
... | SELECT T1.season, T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem' | 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: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'? ### Input: CREATE TABLE ... |
Who won the Mixed doubles when Juliane Schenk won the Women's Singles? | CREATE TABLE table_80153 (
"Year" text,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | SELECT "Mixed doubles" FROM table_80153 WHERE "Women's singles" = 'juliane schenk' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who won the Mixed doubles when Juliane Schenk won the Women's Singles? ### Input: CREATE TABLE table_80153 (
"Year" text... |
patients with controlled hypertension ( sitting diastolic bp < 95 mmhg and / or sitting systolic bp < 160 mmhg ) , right bundle branch block ( complete or partial ) , and pacemakers may be included in the study. | CREATE TABLE table_train_130 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"right_bundle_branch_block" bool,
"space_occupying_cerebral_lesion" bool,
"huntington_disease" bool,
"psychiatric_disease" bool,
"mental_illness" bool,
"treatment_regimen" bool,
"psychoti... | SELECT * FROM table_train_130 WHERE hypertension = 1 OR (diastolic_blood_pressure_dbp < 95 OR systolic_blood_pressure_sbp < 160) OR right_bundle_branch_block = 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: patients with controlled hypertension ( sitting diastolic bp < 95 mmhg and / or sitting systolic bp < 160 mmhg ) , right bun... |
List the number of documents for each receipt date and bin by weekday in a bar chart, I want to list in ascending by the total number please. | CREATE TABLE Ref_Document_Types (
document_type_code CHAR(15),
document_type_description VARCHAR(255)
)
CREATE TABLE Ref_Shipping_Agents (
shipping_agent_code CHAR(15),
shipping_agent_name VARCHAR(255),
shipping_agent_description VARCHAR(255)
)
CREATE TABLE Circulation_History (
document_id IN... | SELECT receipt_date, COUNT(receipt_date) FROM Documents ORDER BY COUNT(receipt_date) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the number of documents for each receipt date and bin by weekday in a bar chart, I want to list in ascending by the tot... |
Bar graph to show the total number from different allergytype, and order by the x axis from high to low. | CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER... | SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType ORDER BY AllergyType DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar graph to show the total number from different allergytype, and order by the x axis from high to low. ### Input: CREATE T... |
Original title of das leben der anderen had what director? | CREATE TABLE table_39380 (
"Year" real,
"English title" text,
"Original title" text,
"Country" text,
"Director" text
) | SELECT "Director" FROM table_39380 WHERE "Original title" = 'das leben der anderen' | 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: Original title of das leben der anderen had what director? ### Input: CREATE TABLE table_39380 (
"Year" real,
"Engli... |
What is the average Goals for team Kairat, in the 2002 season with more than 29 apps? | CREATE TABLE table_name_81 (
goals INTEGER,
apps VARCHAR,
team VARCHAR,
season VARCHAR
) | SELECT AVG(goals) FROM table_name_81 WHERE team = "kairat" AND season = "2002" AND apps > 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: What is the average Goals for team Kairat, in the 2002 season with more than 29 apps? ### Input: CREATE TABLE table_name_81 ... |
What is the Total Apps when League Cup Apps is 0 (1), and position is df? | CREATE TABLE table_name_55 (
total_apps VARCHAR,
league_cup_apps VARCHAR,
position VARCHAR
) | SELECT total_apps FROM table_name_55 WHERE league_cup_apps = "0 (1)" AND position = "df" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Total Apps when League Cup Apps is 0 (1), and position is df? ### Input: CREATE TABLE table_name_55 (
total_... |
What school did draft pick from round 3 go to? | CREATE TABLE table_40871 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School" text
) | SELECT "School" FROM table_40871 WHERE "Round" = '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 school did draft pick from round 3 go to? ### Input: CREATE TABLE table_40871 (
"Round" real,
"Pick" real,
... |
What is Score, when Date is 10 July 2011? | CREATE TABLE table_44803 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Score" FROM table_44803 WHERE "Date" = '10 july 2011' | 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 Score, when Date is 10 July 2011? ### Input: CREATE TABLE table_44803 (
"Outcome" text,
"Date" text,
"To... |
Good Question Without Good Answer: High Question / Top Answer Score Ratio. Divide the question score by the score of the top answer and sort in decreasing order.
Shows questions for which no good solution exist: most of those are either good feature requests or mathematical impossibilities. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT q.Id AS "post_link", q.Score AS "Question Score", MAX(a.Score) AS "Top Answer Score", CAST(q.Score AS FLOAT) / CAST(CASE WHEN MAX(a.Score) = 0 THEN 1 ELSE MAX(a.Score) END AS FLOAT) AS Ratio FROM Posts AS q INNER JOIN Posts AS a ON q.PostTypeId = 1 AND a.ParentId = q.Id GROUP BY q.Id, q.Score ORDER BY Ratio 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: Good Question Without Good Answer: High Question / Top Answer Score Ratio. Divide the question score by the score of the top... |
was attendance higher week 4 or week 8 ? | CREATE TABLE table_203_790 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
) | SELECT "week" FROM table_203_790 WHERE "week" IN (4, 8) ORDER BY "attendance" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: was attendance higher week 4 or week 8 ? ### Input: CREATE TABLE table_203_790 (
id number,
"week" number,
"date... |
What country did Chris Witty represent? | CREATE TABLE table_name_50 (
nation VARCHAR,
name VARCHAR
) | SELECT nation FROM table_name_50 WHERE name = "chris witty" | 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 country did Chris Witty represent? ### Input: CREATE TABLE table_name_50 (
nation VARCHAR,
name VARCHAR
) ### R... |
What venue was the 2000 AFC Asian Cup qualification held at? | CREATE TABLE table_name_9 (
venue VARCHAR,
competition VARCHAR
) | SELECT venue FROM table_name_9 WHERE competition = "2000 afc asian cup qualification" | 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 venue was the 2000 AFC Asian Cup qualification held at? ### Input: CREATE TABLE table_name_9 (
venue VARCHAR,
c... |
Name the finish for lee janzen | CREATE TABLE table_name_94 (
finish VARCHAR,
player VARCHAR
) | SELECT finish FROM table_name_94 WHERE player = "lee janzen" | 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 finish for lee janzen ### Input: CREATE TABLE table_name_94 (
finish VARCHAR,
player VARCHAR
) ### Response... |
count the number of patients whose death status is 0 and procedure icd9 code is 3512? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "3512" | 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 death status is 0 and procedure icd9 code is 3512? ### Input: CREATE TABLE diagnoses (
... |
count the number of patients who underwent therapeu plasmapheresis two or more times in a year before. | 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 prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'therapeu plasmapheres... | 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 the number of patients who underwent therapeu plasmapheresis two or more times in a year before. ### Input: CREATE TAB... |
Display a bar chart for what are the names of the technicians and how many machines are they assigned to repair?, and could you rank in ascending by the X-axis? | CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE technician (
technician_id real,
Na... | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY Name | 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: Display a bar chart for what are the names of the technicians and how many machines are they assigned to repair?, and could ... |
For those employees who did not have any job in the past, show me about the distribution of job_id and the amount of job_id , and group by attribute job_id in a bar chart. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_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 did not have any job in the past, show me about the distribution of job_id and the amount of job_id ... |
Closed questions with reasons, sorted by date. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId n... | SELECT p.Id AS "post_link", ph.CreationDate AS "closure_date", ph.Comment AS "close_reason", ph.Text AS Voters FROM PostHistory AS ph INNER JOIN Posts AS p ON p.Id = ph.PostId WHERE ph.PostHistoryTypeId = 10 ORDER BY ph.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: Closed questions with reasons, sorted by date. ### Input: CREATE TABLE ReviewRejectionReasons (
Id number,
Name text... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of manager_id over the job_id , and group by attribute job_id by a bar chart, and list total number from low to high order please. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYE... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(MANAGER_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 whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
WHAT IS THE ATTENDANCE WITH A READING AWAY TEAM? | CREATE TABLE table_name_24 (
attendance VARCHAR,
away_team VARCHAR
) | SELECT attendance FROM table_name_24 WHERE away_team = "reading" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT IS THE ATTENDANCE WITH A READING AWAY TEAM? ### Input: CREATE TABLE table_name_24 (
attendance VARCHAR,
away_te... |
When did the United Kingdom format a stereo LP? | CREATE TABLE table_48398 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Date" FROM table_48398 WHERE "Region" = 'united kingdom' AND "Format" = 'stereo lp' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did the United Kingdom format a stereo LP? ### Input: CREATE TABLE table_48398 (
"Region" text,
"Date" text,
... |
what is the status in vestal | CREATE TABLE table_18159601_1 (
status VARCHAR,
city VARCHAR
) | SELECT status FROM table_18159601_1 WHERE city = "Vestal" | 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 status in vestal ### Input: CREATE TABLE table_18159601_1 (
status VARCHAR,
city VARCHAR
) ### Response:... |
whats the difference in the systemicmean of patient 017-88691 last measured on the current intensive care unit visit compared to the value second to last measured on the current intensive care unit visit? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CRE... | SELECT (SELECT vitalperiodic.systemicmean FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-88691') AND patient.unitdischargetime IS N... | 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: whats the difference in the systemicmean of patient 017-88691 last measured on the current intensive care unit visit compare... |
count the number of patients whose admission year is less than 2156 and procedure long title is laryngoscopy and other tracheoscopy? | 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.admityear < "2156" AND procedures.long_title = "Laryngoscopy and other tracheoscopy" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose admission year is less than 2156 and procedure long title is laryngoscopy and other trach... |
Give me the comparison about the sum of meter_100 over the meter_200 , and group by attribute meter_200, and could you list x-axis from high to low order? | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | SELECT meter_200, SUM(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the comparison about the sum of meter_100 over the meter_200 , and group by attribute meter_200, and could you list ... |
When the lane is under 2 and the name is virgen benavides with a mark of 7.29, what's the total number of Heat found? | CREATE TABLE table_45035 (
"Heat" real,
"Lane" real,
"Name" text,
"Country" text,
"Mark" text
) | SELECT COUNT("Heat") FROM table_45035 WHERE "Mark" = '7.29' AND "Name" = 'virgen benavides' AND "Lane" < '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: When the lane is under 2 and the name is virgen benavides with a mark of 7.29, what's the total number of Heat found? ### In... |
what is the capacity when the code is d4f bi-fuel 732? | CREATE TABLE table_14849 (
"Name" text,
"Code" text,
"Capacity" text,
"Power" text,
"Acceleration 0\u2013100km/h" text,
"Top speed" text,
"Combined consumption" text
) | SELECT "Capacity" FROM table_14849 WHERE "Code" = 'd4f bi-fuel 732' | 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 capacity when the code is d4f bi-fuel 732? ### Input: CREATE TABLE table_14849 (
"Name" text,
"Code" tex... |
Where do Stack Overflow users come from?. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
... | SELECT u.Location, u.Id, u.Reputation FROM Users AS u WHERE u.Location = 'Cheyenne, WY' | 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: Where do Stack Overflow users come from?. ### Input: CREATE TABLE PostNotices (
Id number,
PostId number,
PostNo... |
What is the Date with a Result of 8 2, and a Score with 6 2? | CREATE TABLE table_11174 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Date" FROM table_11174 WHERE "Result" = '8–2' AND "Score" = '6–2' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Date with a Result of 8 2, and a Score with 6 2? ### Input: CREATE TABLE table_11174 (
"Date" text,
"Ven... |
what was the date the last person on the list left office ? | CREATE TABLE table_204_668 (
id number,
"#" number,
"menteri besar" text,
"took office" text,
"left office" text,
"party" text
) | SELECT "left office" FROM table_204_668 ORDER BY id DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the date the last person on the list left office ? ### Input: CREATE TABLE table_204_668 (
id number,
"#" n... |
How many times was lakpa tashi sherpa ( bhu ) w pts 12-5 in round of 32? | CREATE TABLE table_28578 (
"Athlete" text,
"Event" text,
"Round of 32" text,
"Round of 16" text,
"Quarterfinals" text,
"Semifinals" text
) | SELECT COUNT("Round of 16") FROM table_28578 WHERE "Round of 32" = 'Lakpa Tashi Sherpa ( BHU ) W PTS 12-5' | 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 times was lakpa tashi sherpa ( bhu ) w pts 12-5 in round of 32? ### Input: CREATE TABLE table_28578 (
"Athlete"... |
which competition took place in 2008 but had only one event ? | CREATE TABLE table_204_975 (
id number,
"year" number,
"competition" text,
"location" text,
"event" text,
"final-rank" text,
"final-score" number,
"qualifying rank" number,
"qualifying score" number
) | SELECT "competition" FROM table_204_975 GROUP BY "competition" HAVING COUNT("event") = 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which competition took place in 2008 but had only one event ? ### Input: CREATE TABLE table_204_975 (
id number,
"ye... |
Away result of 0 3, and a Season of 1969-70 is what competition? | CREATE TABLE table_75507 (
"Season" text,
"Competition" text,
"Round" text,
"Club" text,
"Home result" text,
"Away result" text
) | SELECT "Competition" FROM table_75507 WHERE "Away result" = '0–3' AND "Season" = '1969-70' | 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: Away result of 0 3, and a Season of 1969-70 is what competition? ### Input: CREATE TABLE table_75507 (
"Season" text,
... |
out of total number of patients who had a lab test for total protein in urine, how many of them belonged to christian scientist belief? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND lab.label = "Total Protein, Urine" | 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: out of total number of patients who had a lab test for total protein in urine, how many of them belonged to christian scient... |
how many teams had a manner of departure due to there contract being terminated ? | CREATE TABLE table_203_450 (
id number,
"team" text,
"outgoing manager" text,
"manner of departure" text,
"date of vacancy" text,
"replaced by" text,
"date of appointment" text,
"position in table" text
) | SELECT COUNT("team") FROM table_203_450 WHERE "manner of departure" = 'contract terminated' | 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 teams had a manner of departure due to there contract being terminated ? ### Input: CREATE TABLE table_203_450 (
... |
Show the minimum, average, and maximum age of all students. | CREATE TABLE Student (
age INTEGER
) | SELECT MIN(age), AVG(age), MAX(age) FROM Student | 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 minimum, average, and maximum age of all students. ### Input: CREATE TABLE Student (
age INTEGER
) ### Response... |
In the system where Sunday is ny yitru kizhamai, what is Saturday? | CREATE TABLE table_17783 (
"Day" text,
"Sunday Surya (the Sun)" text,
"Monday Soma (the Moon)" text,
"Tuesday Mangala (Mars)" text,
"Wednesday Budha (Mercury)" text,
"Thursday Guru (Jupiter)" text,
"Friday Shukra (Venus)" text,
"Saturday Shani (Saturn)" text
) | SELECT "Saturday Shani (Saturn)" FROM table_17783 WHERE "Sunday Surya (the Sun)" = 'ஞாயிற்று கிழமை Nyāyitru kizhamai' | 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: In the system where Sunday is ny yitru kizhamai, what is Saturday? ### Input: CREATE TABLE table_17783 (
"Day" text,
... |
What is the average number of golds for teams in rank 17 with more than 4 silver? | CREATE TABLE table_name_13 (
gold INTEGER,
rank VARCHAR,
silver VARCHAR
) | SELECT AVG(gold) FROM table_name_13 WHERE rank = "17" AND silver > 4 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average number of golds for teams in rank 17 with more than 4 silver? ### Input: CREATE TABLE table_name_13 (
... |
What was the highest Pick for Lonnie Brockman before round 9? | CREATE TABLE table_name_30 (
pick INTEGER,
player VARCHAR,
round VARCHAR
) | SELECT MAX(pick) FROM table_name_30 WHERE player = "lonnie brockman" AND 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: What was the highest Pick for Lonnie Brockman before round 9? ### Input: CREATE TABLE table_name_30 (
pick INTEGER,
... |
How many average plays have points greater than 14, with an against greater than 17? | CREATE TABLE table_42627 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | SELECT AVG("Played") FROM table_42627 WHERE "Points" > '14' AND "Against" > '17' | 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 average plays have points greater than 14, with an against greater than 17? ### Input: CREATE TABLE table_42627 (
... |
What are distinct locations where tracks are located? | CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
)
CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
) | SELECT DISTINCT location FROM track | 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 distinct locations where tracks are located? ### Input: CREATE TABLE race (
race_id number,
name text,
... |
What was the attendance at the Red Sox game that had a loss of Wakefield (7 10)? | CREATE TABLE table_57043 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Attendance" FROM table_57043 WHERE "Loss" = 'wakefield (7–10)' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance at the Red Sox game that had a loss of Wakefield (7 10)? ### Input: CREATE TABLE table_57043 (
"... |
Who was the deceased spouse who was married for 4 years? | CREATE TABLE table_26633 (
"Name" text,
"Deceased Spouse" text,
"Cause of Death" text,
"Date of Spouses Death" text,
"Length of Marriage" text,
"Children Together" text,
"Current Marital Status" text
) | SELECT "Deceased Spouse" FROM table_26633 WHERE "Length of Marriage" = '4 years' | 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 deceased spouse who was married for 4 years? ### Input: CREATE TABLE table_26633 (
"Name" text,
"Decease... |
What are the campuses that opened in 1958? | CREATE TABLE degrees (
year number,
campus number,
degrees number
)
CREATE TABLE discipline_enrollments (
campus number,
discipline number,
year number,
undergraduate number,
graduate number
)
CREATE TABLE enrollments (
campus number,
year number,
totalenrollment_ay number,... | SELECT campus FROM campuses WHERE year = 1958 | 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 campuses that opened in 1958? ### Input: CREATE TABLE degrees (
year number,
campus number,
degrees... |
What site(s) for tv station tv3? | CREATE TABLE table_1601792_4 (
site VARCHAR,
television_station VARCHAR
) | SELECT site FROM table_1601792_4 WHERE television_station = "TV3" | 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 site(s) for tv station tv3? ### Input: CREATE TABLE table_1601792_4 (
site VARCHAR,
television_station VARCHAR
... |
What actor made a film in 1957? | CREATE TABLE table_name_30 (
name VARCHAR,
year VARCHAR
) | SELECT name FROM table_name_30 WHERE year = "1957" | 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 actor made a film in 1957? ### Input: CREATE TABLE table_name_30 (
name VARCHAR,
year VARCHAR
) ### Response: S... |
Return a pie chart about the proportion of All_Home and the sum of School_ID. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Home, SUM(School_ID) FROM basketball_match GROUP BY All_Home | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a pie chart about the proportion of All_Home and the sum of School_ID. ### Input: CREATE TABLE university (
Schoo... |
Is there a professor assigned to teach Other classes next Winter ? | CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Is there a professor assigned to teach Other classes next Winter ? ### Input: CREATE TABLE semester (
semester_id int,
... |
What is the total balance of savings accounts not belonging to someone with the name Brown? | CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE savings (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
) | SELECT SUM(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name <> 'Brown' | 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 total balance of savings accounts not belonging to someone with the name Brown? ### Input: CREATE TABLE checking... |
Migrated questions to posted questions ratio. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT p.Id, COUNT(pht.Name) FROM Posts AS p, PostTypes AS pt, PostHistoryTypes AS pht, PostHistory AS ph WHERE p.Id = ph.PostId AND ph.PostHistoryTypeId = pht.Id AND p.PostTypeId = pt.Id AND pt.Name = 'Question' AND pht.Id IN (17, 35, 36) GROUP BY p.Id ORDER BY p.Id | 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: Migrated questions to posted questions ratio. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
Crea... |
Show the number of faculty for each rank in a bar chart. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Faculty_Participates_in (
Fac... | SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of faculty for each rank in a bar chart. ### Input: CREATE TABLE Activity (
actid INTEGER,
activity_... |
What was the smallest crowd for a Melbourne away game? | CREATE TABLE table_name_83 (
crowd INTEGER,
away_team VARCHAR
) | SELECT MIN(crowd) FROM table_name_83 WHERE away_team = "melbourne" | 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 smallest crowd for a Melbourne away game? ### Input: CREATE TABLE table_name_83 (
crowd INTEGER,
away_t... |
What classes does Prof. Ej Westlake teach in Spring 2005 ? | CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Ej Westlake%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offer... | 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 classes does Prof. Ej Westlake teach in Spring 2005 ? ### Input: CREATE TABLE ta (
campus_job_id int,
student_i... |
when did patient 017-49375 had the first intake on 04/14/this year? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid numb... | 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 = '017-49375')) 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 017-49375 had the first intake on 04/14/this year? ### Input: CREATE TABLE microlab (
microlabid number... |
If the player is Hashan Tillakaratne, what is the catches minimum? | CREATE TABLE table_26041144_16 (
catches INTEGER,
player VARCHAR
) | SELECT MIN(catches) FROM table_26041144_16 WHERE player = "Hashan Tillakaratne" | 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: If the player is Hashan Tillakaratne, what is the catches minimum? ### Input: CREATE TABLE table_26041144_16 (
catches I... |
What is the Outcome of the match with Partner Andoni Vivanco? | CREATE TABLE table_50160 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Outcome" FROM table_50160 WHERE "Partner" = 'andoni vivanco' | 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 Outcome of the match with Partner Andoni Vivanco? ### Input: CREATE TABLE table_50160 (
"Outcome" text,
... |
Count of questions, comments, answers with tag over time. | CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number... | SELECT DATEADD(week, DATEDIFF(day, '20000109', CreationDate) / 7, '20000109') AS "week", COUNT(DISTINCT Posts.Id) AS Posts, COUNT(Posts.AcceptedAnswerId) * 100 / COUNT(DISTINCT Posts.Id) AS PercentWithAcceptedAnswer, SUM(Posts.AnswerCount) AS Answers, SUM(Posts.CommentCount) AS Comments FROM Posts INNER JOIN PostTags O... | 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: Count of questions, comments, answers with tag over time. ### Input: CREATE TABLE PostFeedback (
Id number,
PostId n... |
i need ground transportation in SEATTLE | CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'SEATTLE' AND ground_service.city_code = city.city_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: i need ground transportation in SEATTLE ### Input: CREATE TABLE flight (
aircraft_code_sequence text,
airline_code v... |
posts closed in sep, oct, or nov, with reasons. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Tags (
Id number,
TagName text,
C... | SELECT YEAR(Posts.ClosedDate) AS y, MONTH(Posts.ClosedDate) AS m, CAST(YEAR(Posts.ClosedDate) AS TEXT(10)) + '/' + CAST(MONTH(Posts.ClosedDate) AS TEXT(19)) AS ym, COUNT(CONCAT('http://programmers.stackexchange.com/q/', Posts.Id)) AS Questions FROM PostHistory JOIN Posts ON Posts.Id = PostHistory.PostId WHERE Posts.Clo... | 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 closed in sep, oct, or nov, with reasons. ### Input: CREATE TABLE Votes (
Id number,
PostId number,
VoteTy... |
what is the arrival time where the station code is awy? | CREATE TABLE table_19516 (
"No." real,
"Station Code" text,
"Station" text,
"Arrival" text,
"Departure" text,
"Kilometers" real,
"Day" real
) | SELECT "Arrival" FROM table_19516 WHERE "Station Code" = 'AWY' | 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 arrival time where the station code is awy? ### Input: CREATE TABLE table_19516 (
"No." real,
"Station C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.