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 field did the Home Team score 5.10 (40)? | CREATE TABLE table_11268 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
) | SELECT "Venue" FROM table_11268 WHERE "Home team score" = '5.10 (40)' | 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 field did the Home Team score 5.10 (40)? ### Input: CREATE TABLE table_11268 (
"Home team" text,
"Home team sco... |
What is the total number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38? | CREATE TABLE table_name_40 (
goals_for VARCHAR,
played VARCHAR,
draws VARCHAR,
losses VARCHAR
) | SELECT COUNT(goals_for) FROM table_name_40 WHERE draws = 3 AND losses > 18 AND played < 38 | 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 number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38? ### Input: CRE... |
what is the most bronze when the total is 9? | CREATE TABLE table_name_94 (
bronze INTEGER,
total VARCHAR
) | SELECT MAX(bronze) FROM table_name_94 WHERE total = 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 most bronze when the total is 9? ### Input: CREATE TABLE table_name_94 (
bronze INTEGER,
total VARCHAR
)... |
What date was the location attendance at&t center 18,797, and a game earlier than 57? | CREATE TABLE table_name_24 (
date VARCHAR,
location_attendance VARCHAR,
game VARCHAR
) | SELECT date FROM table_name_24 WHERE location_attendance = "at&t center 18,797" AND game < 57 | 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 location attendance at&t center 18,797, and a game earlier than 57? ### Input: CREATE TABLE table_name_24 ... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of first_name and employee_id in a bar chart, and I want to list X-axis in ascending order. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALA... | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_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: For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distri... |
What is the highest draws when more than 6 are played and the points against are 54? | CREATE TABLE table_name_92 (
drawn INTEGER,
against VARCHAR,
played VARCHAR
) | SELECT MAX(drawn) FROM table_name_92 WHERE against = 54 AND played > 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 is the highest draws when more than 6 are played and the points against are 54? ### Input: CREATE TABLE table_name_92 (... |
For airlines named Aeroflot Group, what is the alliance? | CREATE TABLE table_name_11 (
alliance__association VARCHAR,
airline_holding VARCHAR
) | SELECT alliance__association FROM table_name_11 WHERE airline_holding = "aeroflot group" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For airlines named Aeroflot Group, what is the alliance? ### Input: CREATE TABLE table_name_11 (
alliance__association V... |
provide me the number of black/haitian patients diagnosed with lower extremity embolism. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND diagnoses.short_title = "Lower extremity embolism" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide me the number of black/haitian patients diagnosed with lower extremity embolism. ### Input: CREATE TABLE prescriptio... |
what are the three most frequently prescribed drugs for patients who have been prescribed phentolamine mesylate also at the same time since 2105? | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'phentolamine mesylate' AND STRFTIME('%y', prescriptions.startdate... | 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 are the three most frequently prescribed drugs for patients who have been prescribed phentolamine mesylate also at the ... |
Name the Evening that has a Sunday of no, and a Name of s. vidal/plant express? | CREATE TABLE table_name_18 (
evening VARCHAR,
sunday VARCHAR,
name VARCHAR
) | SELECT evening FROM table_name_18 WHERE sunday = "no" AND name = "s. vidal/plant express" | 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 Evening that has a Sunday of no, and a Name of s. vidal/plant express? ### Input: CREATE TABLE table_name_18 (
... |
What is Spandau 04 Player Jens Pohlmann's Pos.? | CREATE TABLE table_62457 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
) | SELECT "Pos." FROM table_62457 WHERE "Club" = 'spandau 04' AND "Name" = 'jens pohlmann' | 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 Spandau 04 Player Jens Pohlmann's Pos.? ### Input: CREATE TABLE table_62457 (
"Name" text,
"Pos." text,
... |
Tell me the Europe for z.h.p. unlosing ranger vs darkdeath evilman | CREATE TABLE table_name_79 (
europe VARCHAR,
title VARCHAR
) | SELECT europe FROM table_name_79 WHERE title = "z.h.p. unlosing ranger vs darkdeath evilman" | 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: Tell me the Europe for z.h.p. unlosing ranger vs darkdeath evilman ### Input: CREATE TABLE table_name_79 (
europe VARCHA... |
How many female patients are aged below 43 years? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.age < "43" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many female patients are aged below 43 years? ### Input: CREATE TABLE lab (
subject_id text,
hadm_id text,
i... |
What Position has a Super League 1 Competition? | CREATE TABLE table_name_85 (
position VARCHAR,
competition VARCHAR
) | SELECT position FROM table_name_85 WHERE competition = "super league 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 Position has a Super League 1 Competition? ### Input: CREATE TABLE table_name_85 (
position VARCHAR,
competitio... |
what is primary disease and admission time of subject name michael tyndall? | 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.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Michael Tyndall" | 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 primary disease and admission time of subject name michael tyndall? ### Input: CREATE TABLE lab (
subject_id tex... |
What is High Assists, when High Points is 'Tayshaun Prince (23)'? | CREATE TABLE table_name_64 (
high_assists VARCHAR,
high_points VARCHAR
) | SELECT high_assists FROM table_name_64 WHERE high_points = "tayshaun prince (23)" | 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 High Assists, when High Points is 'Tayshaun Prince (23)'? ### Input: CREATE TABLE table_name_64 (
high_assists V... |
Scores of posts by a specific user. | 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 Id AS "post_link", Score FROM Posts WHERE OwnerUserId = '##id?210401##' ORDER BY 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: Scores of posts by a specific user. ### Input: CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswer... |
Which Rank has a Bronze larger than 1, and a Silver larger than 0, and a Nation of norway (host nation), and a Total larger than 16? | CREATE TABLE table_36673 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Rank") FROM table_36673 WHERE "Bronze" > '1' AND "Silver" > '0' AND "Nation" = 'norway (host nation)' AND "Total" > '16' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Rank has a Bronze larger than 1, and a Silver larger than 0, and a Nation of norway (host nation), and a Total larger ... |
What is the Surface of the court in the match with a Score of 4 6, 6 4, 3 6? | CREATE TABLE table_name_16 (
surface VARCHAR,
score VARCHAR
) | SELECT surface FROM table_name_16 WHERE score = "4–6, 6–4, 3–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 is the Surface of the court in the match with a Score of 4 6, 6 4, 3 6? ### Input: CREATE TABLE table_name_16 (
sur... |
If the home team was footscray which venue did they play it? | CREATE TABLE table_51607 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_51607 WHERE "Home team" = 'footscray' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: If the home team was footscray which venue did they play it? ### Input: CREATE TABLE table_51607 (
"Home team" text,
... |
Count the number of different complaint type codes. | CREATE TABLE staff (
staff_id number,
gender text,
first_name text,
last_name text,
email_address text,
phone_number text
)
CREATE TABLE customers (
customer_id number,
customer_type_code text,
address_line_1 text,
address_line_2 text,
town_city text,
state text,
ema... | SELECT COUNT(DISTINCT complaint_type_code) FROM complaints | 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: Count the number of different complaint type codes. ### Input: CREATE TABLE staff (
staff_id number,
gender text,
... |
What is the highest Lane, when Mark is 46.65, and when React is greater than 0.251? | CREATE TABLE table_name_44 (
lane INTEGER,
mark VARCHAR,
react VARCHAR
) | SELECT MAX(lane) FROM table_name_44 WHERE mark = "46.65" AND react > 0.251 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Lane, when Mark is 46.65, and when React is greater than 0.251? ### Input: CREATE TABLE table_name_44 (
... |
A scatter chart shows the correlation between Team_ID and ACC_Percent . | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT Team_ID, ACC_Percent FROM basketball_match | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A scatter chart shows the correlation between Team_ID and ACC_Percent . ### Input: CREATE TABLE basketball_match (
Team_... |
In which week was attendance at 50,814? | CREATE TABLE table_42912 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT COUNT("Week") FROM table_42912 WHERE "Attendance" = '50,814' | 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 which week was attendance at 50,814? ### Input: CREATE TABLE table_42912 (
"Week" real,
"Date" text,
"Opponen... |
please list all the flights from BOSTON to DENVER which serve meals | 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 food_service (
meal_code text,
meal_number int,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight, food_service WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_ser... | 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: please list all the flights from BOSTON to DENVER which serve meals ### Input: CREATE TABLE fare (
fare_id int,
from... |
Top 100 most economical posts (site-wide). | CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAno... | SELECT Id AS "post_link", LENGTH(Body) AS Length, Score, (Score / CAST(NULLIF(LENGTH(Body), 0) AS FLOAT(9, 2))) AS Economy FROM Posts AS p ORDER BY Economy DESC LIMIT 100 | 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 100 most economical posts (site-wide). ### Input: CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
... |
Top Answerers for Tag: score = sum of answer scores/viewCount. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text te... | SELECT P.OwnerUserId AS "user_link", SUM(1000 * P.Score / Q.ViewCount) AS TotalScore, SUM(P.Score) AS TotalVotes, SUM(Q.ViewCount) AS TotalViews, COUNT(*) AS "#Answers" FROM Posts AS P INNER JOIN Posts AS Q ON Q.Id = P.ParentId INNER JOIN PostTags AS PT ON PT.PostId = P.ParentId INNER JOIN Tags AS T ON T.Id = PT.TagId ... | 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 Answerers for Tag: score = sum of answer scores/viewCount. ### Input: CREATE TABLE PostLinks (
Id number,
Creati... |
which country has the most fide rated players after germany ? | CREATE TABLE table_203_663 (
id number,
"country" text,
"zone" text,
"national federation" text,
"#gm" number,
"#fide" number,
"national championship" text
) | SELECT "country" FROM table_203_663 WHERE "country" <> 'germany' ORDER BY "#fide" 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: which country has the most fide rated players after germany ? ### Input: CREATE TABLE table_203_663 (
id number,
"co... |
what is the number of patients whose ethnicity is black/cape verdean and diagnoses long title is unspecified problem with head, neck, or trunk? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND diagnoses.long_title = "Unspecified problem with head, neck, or trunk" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose ethnicity is black/cape verdean and diagnoses long title is unspecified problem with he... |
How many values for attendance correspond to the 1986 Peach Bowl? | CREATE TABLE table_20213 (
"#" real,
"Season" real,
"Bowl game" text,
"Result" text,
"Opponent" text,
"Stadium" text,
"Location" text,
"Attendance" text
) | SELECT COUNT("Attendance") FROM table_20213 WHERE "Bowl game" = '1986 Peach Bowl' | 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 values for attendance correspond to the 1986 Peach Bowl? ### Input: CREATE TABLE table_20213 (
"#" real,
"S... |
Return the names and typical buying prices for all products. | CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_details text
)
CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic... | SELECT product_name, typical_buying_price FROM products | 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: Return the names and typical buying prices for all products. ### Input: CREATE TABLE characteristics (
characteristic_id... |
Name the tournament for top-5 more thn 1 and top-25 of 13 with wins of 3 | CREATE TABLE table_79797 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | SELECT "Tournament" FROM table_79797 WHERE "Top-5" > '1' AND "Top-25" = '13' AND "Wins" = '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: Name the tournament for top-5 more thn 1 and top-25 of 13 with wins of 3 ### Input: CREATE TABLE table_79797 (
"Tourname... |
Name the interview for peru delegate | CREATE TABLE table_287 (
"Delegate" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
) | SELECT "Interview" FROM table_287 WHERE "Delegate" = 'Peru' | 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 interview for peru delegate ### Input: CREATE TABLE table_287 (
"Delegate" text,
"Interview" text,
"Swi... |
List the state names and the number of customers living in each state. | CREATE TABLE customer_addresses (
address_id VARCHAR
)
CREATE TABLE addresses (
state_province_county VARCHAR,
address_id VARCHAR
) | SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the state names and the number of customers living in each state. ### Input: CREATE TABLE customer_addresses (
addr... |
Close Votes per Question, 2020. | 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 (LENGTH(Text) - LENGTH(REPLACE(Text, 'DisplayName', ''))) / 11 AS CloseVoters, COUNT(1) FROM PostHistory WHERE YEAR(CreationDate) = 2020 AND PostHistoryTypeId = 10 GROUP BY (LENGTH(Text) - LENGTH(REPLACE(Text, 'DisplayName', ''))) / 11 ORDER BY (LENGTH(Text) - LENGTH(REPLACE(Text, 'DisplayName', ''))) / 11 | 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: Close Votes per Question, 2020. ### Input: CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
Accepte... |
i need a flight from BOSTON to DENVER | CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE aircraft (... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER'... | 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 a flight from BOSTON to DENVER ### Input: CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,... |
what were the changes in heart rate in patient 3327 last measured on the first icu visit compared to the value first measured on the first icu visit? | 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 (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3327) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemi... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the changes in heart rate in patient 3327 last measured on the first icu visit compared to the value first measure... |
Where was the home court on April 14? | CREATE TABLE table_name_34 (
home VARCHAR,
date VARCHAR
) | SELECT home FROM table_name_34 WHERE date = "april 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: Where was the home court on April 14? ### Input: CREATE TABLE table_name_34 (
home VARCHAR,
date VARCHAR
) ### Respo... |
count the amount of patients who were prescribed atovaquone suspension in the same hospital encounter after having been diagnosed with crnry athrscl natve vssl until 2104. | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardi... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title =... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the amount of patients who were prescribed atovaquone suspension in the same hospital encounter after having been diag... |
What is Opponent in Final, when Date is '13 January 1992'? | CREATE TABLE table_58904 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in Final" text,
"Score in Final" text
) | SELECT "Opponent in Final" FROM table_58904 WHERE "Date" = '13 january 1992' | 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 Opponent in Final, when Date is '13 January 1992'? ### Input: CREATE TABLE table_58904 (
"Date" text,
"Tourn... |
i need flights that arrive in BALTIMORE from PITTSBURGH | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
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,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BAL... | 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 flights that arrive in BALTIMORE from PITTSBURGH ### Input: CREATE TABLE date_day (
month_number int,
day_num... |
Which Tournament has a Partner of mart n rodr guez? | CREATE TABLE table_name_19 (
tournament VARCHAR,
partner VARCHAR
) | SELECT tournament FROM table_name_19 WHERE partner = "martín rodríguez" | 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 Tournament has a Partner of mart n rodr guez? ### Input: CREATE TABLE table_name_19 (
tournament VARCHAR,
part... |
Who is the vacator when south carolina 4th is the district? | CREATE TABLE table_73404 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
) | SELECT "Vacator" FROM table_73404 WHERE "District" = 'South Carolina 4th' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the vacator when south carolina 4th is the district? ### Input: CREATE TABLE table_73404 (
"District" text,
"... |
What are the dates where the opponent was guillermo garc a-l pez albert portas? | CREATE TABLE table_69838 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Date" FROM table_69838 WHERE "Opponents" = 'guillermo garcía-lópez albert portas' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the dates where the opponent was guillermo garc a-l pez albert portas? ### Input: CREATE TABLE table_69838 (
"O... |
What country is the film directed by Michael Haneke from? | CREATE TABLE table_68198 (
"Year" real,
"English title" text,
"Original title" text,
"Country" text,
"Director'" text
) | SELECT "Country" FROM table_68198 WHERE "Director'" = 'michael haneke' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What country is the film directed by Michael Haneke from? ### Input: CREATE TABLE table_68198 (
"Year" real,
"Englis... |
what is the number of patients whose diagnoses long title is acute glomerulonephritis with other specified pathological lesion in kidney and drug route is iv drip? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Acute glomerulonephritis with other specified pathological lesion in kidney" AND prescripti... | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose diagnoses long title is acute glomerulonephritis with other specified pathological lesi... |
unable to swallow uncrushed oral medication in capsule form | CREATE TABLE table_train_78 (
"id" int,
"mini_mental_state_examination_mmse" int,
"consent" bool,
"swallow_oral_medication" bool,
"rosen_modified_hachinski_ischemic_score" int,
"NOUSE" float
) | SELECT * FROM table_train_78 WHERE swallow_oral_medication = 0 | 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: unable to swallow uncrushed oral medication in capsule form ### Input: CREATE TABLE table_train_78 (
"id" int,
"mini... |
Which Winner has a Country of norway, and a FIS Nordic World Ski Championships of 1924? | CREATE TABLE table_name_97 (
winner VARCHAR,
country VARCHAR,
fis_nordic_world_ski_championships VARCHAR
) | SELECT winner FROM table_name_97 WHERE country = "norway" AND fis_nordic_world_ski_championships = "1924" | 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 Winner has a Country of norway, and a FIS Nordic World Ski Championships of 1924? ### Input: CREATE TABLE table_name_9... |
What is the Days, hours, minutes for 21 26 October? | CREATE TABLE table_name_81 (
days VARCHAR,
_hours VARCHAR,
_minutes VARCHAR,
dates VARCHAR
) | SELECT days, _hours, _minutes FROM table_name_81 WHERE dates = "21 – 26 october" | 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 Days, hours, minutes for 21 26 October? ### Input: CREATE TABLE table_name_81 (
days VARCHAR,
_hours VAR... |
What is the total number of Year(s) Won, when Player is Ed Furgol, and when To Par is greater than 12? | CREATE TABLE table_50191 (
"Player" text,
"Country" text,
"Year(s) won" real,
"Total" real,
"To par" real,
"Finish" text
) | SELECT COUNT("Year(s) won") FROM table_50191 WHERE "Player" = 'ed furgol' AND "To par" > '12' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of Year(s) Won, when Player is Ed Furgol, and when To Par is greater than 12? ### Input: CREATE TAB... |
What are the names of the top 8 countries by total invoice size and what are those sizes. Plot them as bar chart. | CREATE TABLE albums (
id INTEGER,
title VARCHAR(160),
artist_id INTEGER
)
CREATE TABLE customers (
id INTEGER,
first_name VARCHAR(40),
last_name VARCHAR(20),
company VARCHAR(80),
address VARCHAR(70),
city VARCHAR(40),
state VARCHAR(40),
country VARCHAR(40),
postal_code V... | SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8 | 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: What are the names of the top 8 countries by total invoice size and what are those sizes. Plot them as bar chart. ### Input:... |
Name the total number of domestic mail for 7853 for total frieght and mail | CREATE TABLE table_1754531_4 (
domestic_mail VARCHAR,
total_freight_and_mail VARCHAR
) | SELECT COUNT(domestic_mail) FROM table_1754531_4 WHERE total_freight_and_mail = 7853 | 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 total number of domestic mail for 7853 for total frieght and mail ### Input: CREATE TABLE table_1754531_4 (
dom... |
Which Score has a Competition of world cup qualifying, and a Brazil scorers of baltazar, and a Date of march 14, 1954? | CREATE TABLE table_name_65 (
score VARCHAR,
date VARCHAR,
competition VARCHAR,
brazil_scorers VARCHAR
) | SELECT score FROM table_name_65 WHERE competition = "world cup qualifying" AND brazil_scorers = "baltazar" AND date = "march 14, 1954" | 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 Score has a Competition of world cup qualifying, and a Brazil scorers of baltazar, and a Date of march 14, 1954? ### I... |
When 2008 t is the original number what is the lowest year? | CREATE TABLE table_24614 (
"Original number" text,
"UIC number" text,
"Name" text,
"Constructer" text,
"constructor number" real,
"Year" real,
"Withdrawn" text,
"Kilometers worked" real
) | SELECT MIN("Year") FROM table_24614 WHERE "Original number" = '2008 T' | 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 2008 t is the original number what is the lowest year? ### Input: CREATE TABLE table_24614 (
"Original number" text... |
How many total credits are offered by each department? | CREATE TABLE time_slot (
time_slot_id text,
day text,
start_hr number,
start_min number,
end_hr number,
end_min number
)
CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE... | SELECT SUM(credits), dept_name FROM course GROUP BY dept_name | 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: How many total credits are offered by each department? ### Input: CREATE TABLE time_slot (
time_slot_id text,
day te... |
Name the episode for vic reeves and claudia winkleman | CREATE TABLE table_23292220_7 (
episode VARCHAR,
seans_team VARCHAR
) | SELECT episode FROM table_23292220_7 WHERE seans_team = "Vic Reeves and Claudia Winkleman" | 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 episode for vic reeves and claudia winkleman ### Input: CREATE TABLE table_23292220_7 (
episode VARCHAR,
se... |
Plot how many minister by grouped by minister as a bar graph, and list in desc by the y axis. | CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
... | SELECT Minister, COUNT(Minister) FROM party GROUP BY Minister ORDER BY COUNT(Minister) 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: Plot how many minister by grouped by minister as a bar graph, and list in desc by the y axis. ### Input: CREATE TABLE region... |
How much did the home team st kilda score? | CREATE TABLE table_name_76 (
home_team VARCHAR
) | SELECT home_team AS score FROM table_name_76 WHERE home_team = "st kilda" | 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 much did the home team st kilda score? ### Input: CREATE TABLE table_name_76 (
home_team VARCHAR
) ### Response: SEL... |
What is the Rank of the player with 158 Goals in more than 362 Matches? | CREATE TABLE table_name_85 (
rank VARCHAR,
goals VARCHAR,
matches VARCHAR
) | SELECT COUNT(rank) FROM table_name_85 WHERE goals = 158 AND matches > 362 | 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 Rank of the player with 158 Goals in more than 362 Matches? ### Input: CREATE TABLE table_name_85 (
rank VAR... |
what RENTAL CAR are available next sunday from DEN airport | CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_s... | SELECT DISTINCT ground_service.transport_type FROM airport, ground_service WHERE airport.airport_code = 'DEN' AND ground_service.airport_code = airport.airport_code AND ground_service.transport_type = 'RENTAL CAR' | 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 RENTAL CAR are available next sunday from DEN airport ### Input: CREATE TABLE airline (
airline_code varchar,
a... |
What is the 1944 result for the U.S. Championships? | CREATE TABLE table_name_52 (
tournament VARCHAR
) | SELECT 1944 FROM table_name_52 WHERE tournament = "u.s. championships" | 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 1944 result for the U.S. Championships? ### Input: CREATE TABLE table_name_52 (
tournament VARCHAR
) ### Res... |
How many viewers in millions watched the episode with the number 10.18? | CREATE TABLE table_25391981_20 (
viewers__millions_ VARCHAR,
episode_number VARCHAR
) | SELECT viewers__millions_ FROM table_25391981_20 WHERE episode_number = "10.18" | 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 viewers in millions watched the episode with the number 10.18? ### Input: CREATE TABLE table_25391981_20 (
view... |
how many patients received intracranial/cerebral perfusion pressure monitoring - csf drainage via ventriculostomy after the first procedure of the antiemetic - serotonin antagonist in the same month since 1 year ago? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartr... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiemetic - serotonin antagonist' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-1 yea... | 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 many patients received intracranial/cerebral perfusion pressure monitoring - csf drainage via ventriculostomy after the ... |
What race is on 26 June 2011? | CREATE TABLE table_43995 (
"Rank" text,
"Time" text,
"Athlete" text,
"Nation" text,
"Date" text,
"Race" text
) | SELECT "Race" FROM table_43995 WHERE "Date" = '26 june 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 race is on 26 June 2011? ### Input: CREATE TABLE table_43995 (
"Rank" text,
"Time" text,
"Athlete" text,
... |
what number of patients diagnosed with gangrene were transferred from hosp/extram? | 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 WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "GANGRENE" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of patients diagnosed with gangrene were transferred from hosp/extram? ### Input: CREATE TABLE diagnoses (
s... |
With an aggregate of 0-2, what is listed for home? | CREATE TABLE table_17968229_1 (
home__2nd_leg_ VARCHAR,
aggregate VARCHAR
) | SELECT home__2nd_leg_ FROM table_17968229_1 WHERE aggregate = "0-2" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: With an aggregate of 0-2, what is listed for home? ### Input: CREATE TABLE table_17968229_1 (
home__2nd_leg_ VARCHAR,
... |
what's the total number of position with driver robby gordon | CREATE TABLE table_10160447_1 (
position VARCHAR,
driver VARCHAR
) | SELECT COUNT(position) FROM table_10160447_1 WHERE driver = "Robby Gordon" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what's the total number of position with driver robby gordon ### Input: CREATE TABLE table_10160447_1 (
position VARCHAR... |
What is Doucet when Lawrance is 36? | CREATE TABLE table_16796 (
"Ward" text,
"Bello" text,
"Ben-Tahir" text,
"Doucet" text,
"Furtenbacher" text,
"Gauthier" text,
"Haydon" text,
"Larter" text,
"Lawrance" text,
"Libweshya" text,
"Liscumb" text
) | SELECT "Doucet" FROM table_16796 WHERE "Lawrance" = '36' | 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 Doucet when Lawrance is 36? ### Input: CREATE TABLE table_16796 (
"Ward" text,
"Bello" text,
"Ben-Tahir"... |
Show the title and the lowest rating among all movies in a bar chart. | CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
) | SELECT title, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the title and the lowest rating among all movies in a bar chart. ### Input: CREATE TABLE Rating (
rID int,
mID ... |
What was the injured entry for Venezuela? | CREATE TABLE table_name_16 (
injured VARCHAR,
country VARCHAR
) | SELECT injured FROM table_name_16 WHERE country = "venezuela" | 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 injured entry for Venezuela? ### Input: CREATE TABLE table_name_16 (
injured VARCHAR,
country VARCHAR
)... |
how did patient 028-47306 last visit in this year to the hospital? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '028-47306' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime DESC 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: how did patient 028-47306 last visit in this year to the hospital? ### Input: CREATE TABLE allergy (
allergyid number,
... |
What is Name, when Laps is '50', when Grid is greater than 9, when Team is 'Jim Beam Racing', and when Time/Retired is '+ 18.0s'? | CREATE TABLE table_48468 (
"Name" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT "Name" FROM table_48468 WHERE "Laps" = '50' AND "Grid" > '9' AND "Team" = 'jim beam racing' AND "Time/Retired" = '+ 18.0s' | 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 Name, when Laps is '50', when Grid is greater than 9, when Team is 'Jim Beam Racing', and when Time/Retired is '+ 18... |
Select posts with historic use of tag. | 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 PostId AS "post_link" FROM PostHistory WHERE PostHistoryTypeId IN (3, 6) AND Text LIKE '%<database-schema>%' | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Select posts with historic use of tag. ### Input: CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAns... |
Ignore movies whose director is NULL. For each director, what are the titles and ratings for all the movies they reviewed? Show the result by a pie chart. | CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
) | SELECT title, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" | 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: Ignore movies whose director is NULL. For each director, what are the titles and ratings for all the movies they reviewed? S... |
What stadiums had an attendance of 8,256? | CREATE TABLE table_19343 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" text,
"Date" text,
"Time" text,
"Report" text
) | SELECT "Ground" FROM table_19343 WHERE "Crowd" = '8,256' | 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 stadiums had an attendance of 8,256? ### Input: CREATE TABLE table_19343 (
"Home team" text,
"Home team score" ... |
The race tony bettenhausen 200 has what smallest rd? | CREATE TABLE table_72118 (
"Rd" real,
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | SELECT MIN("Rd") FROM table_72118 WHERE "Name" = 'Tony Bettenhausen 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: The race tony bettenhausen 200 has what smallest rd? ### Input: CREATE TABLE table_72118 (
"Rd" real,
"Name" text,
... |
how many players won at least later than 2010 ? | CREATE TABLE table_204_310 (
id number,
"month" text,
"year" number,
"player" text,
"county" text,
"club" text,
"position" number
) | SELECT COUNT("player") FROM table_204_310 WHERE "year" > 2010 | 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 won at least later than 2010 ? ### Input: CREATE TABLE table_204_310 (
id number,
"month" text,
... |
Who was the match against at the PRIDE 31 event? | CREATE TABLE table_50246 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Opponent" FROM table_50246 WHERE "Event" = 'pride 31' | 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 match against at the PRIDE 31 event? ### Input: CREATE TABLE table_50246 (
"Res." text,
"Record" text,
... |
What country offered a prize of 66400 US dollars? | CREATE TABLE table_31084 (
"Rk" real,
"Name" text,
"Country" text,
"Matches Played" real,
"Matches Won" real,
"Points" real,
"Prize Money (USD)" real
) | SELECT "Country" FROM table_31084 WHERE "Prize Money (USD)" = '66400' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What country offered a prize of 66400 US dollars? ### Input: CREATE TABLE table_31084 (
"Rk" real,
"Name" text,
... |
Who did the high rebounds for the team Minnesota? | CREATE TABLE table_29893 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High rebounds" FROM table_29893 WHERE "Team" = 'Minnesota' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who did the high rebounds for the team Minnesota? ### Input: CREATE TABLE table_29893 (
"Game" real,
"Date" text,
... |
between car plates of 80-84 what is the population in 1000 in year 1931? | CREATE TABLE table_57094 (
"car plates (since 1937)" text,
"Voivodeship Separate city" text,
"Capital" text,
"Area in 1000km\u00b2 (1930)" text,
"Population in 1000 (1931)" text
) | SELECT "Population in 1000 (1931)" FROM table_57094 WHERE "car plates (since 1937)" = '80-84' | 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: between car plates of 80-84 what is the population in 1000 in year 1931? ### Input: CREATE TABLE table_57094 (
"car plat... |
Count the Rank-Final which has a Year larger than 2008, and an Apparatus of balance beam, and a Rank-Qualifying larger than 4? | CREATE TABLE table_63827 (
"Year" real,
"Competition Description" text,
"Location" text,
"Apparatus" text,
"Rank-Final" real,
"Score-Final" real,
"Rank-Qualifying" real,
"Score-Qualifying" real
) | SELECT COUNT("Rank-Final") FROM table_63827 WHERE "Year" > '2008' AND "Apparatus" = 'balance beam' AND "Rank-Qualifying" > '4' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Count the Rank-Final which has a Year larger than 2008, and an Apparatus of balance beam, and a Rank-Qualifying larger than ... |
What is the natural change per year for the 34 IMR group? | CREATE TABLE table_29509 (
"Period" text,
"Live births per year" text,
"Deaths per year" text,
"Natural change per year" text,
"CBR*" text,
"CDR*" text,
"NC*" text,
"TFR*" text,
"IMR*" real,
"Life expectancy total" text,
"Life expectancy males" text,
"Life expectancy fema... | SELECT "Natural change per year" FROM table_29509 WHERE "IMR*" = '34' | 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 natural change per year for the 34 IMR group? ### Input: CREATE TABLE table_29509 (
"Period" text,
"Live... |
What is class I can take to fulfill the ULCS requirement and is easiest ? | CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city var... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | 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 is class I can take to fulfill the ULCS requirement and is easiest ? ### Input: CREATE TABLE comment_instructor (
i... |
What party does the incumbent from the Ohio 20 district belong to? | CREATE TABLE table_1342218_35 (
party VARCHAR,
district VARCHAR
) | SELECT party FROM table_1342218_35 WHERE district = "Ohio 20" | 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 party does the incumbent from the Ohio 20 district belong to? ### Input: CREATE TABLE table_1342218_35 (
party VARC... |
Which Class has a Weight of 203? | CREATE TABLE table_name_57 (
class VARCHAR,
weight VARCHAR
) | SELECT class FROM table_name_57 WHERE weight = 203 | 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 Class has a Weight of 203? ### Input: CREATE TABLE table_name_57 (
class VARCHAR,
weight VARCHAR
) ### Respons... |
what is the number of patients who have had a nicardipine hcl intake? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_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,
drug text,
dose... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'nicardipine hcl' AN... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients who have had a nicardipine hcl intake? ### Input: CREATE TABLE labevents (
row_id number,... |
List the name and the number of enrolled student for each course. Show bar chart. | CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),... | SELECT course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_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: List the name and the number of enrolled student for each course. Show bar chart. ### Input: CREATE TABLE Subjects (
sub... |
How many dates did David Savage get man of the match? | CREATE TABLE table_21355 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Competition" text,
"Man of the Match" text
) | SELECT COUNT("Date") FROM table_21355 WHERE "Man of the Match" = 'David Savage' | 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 dates did David Savage get man of the match? ### Input: CREATE TABLE table_21355 (
"Date" text,
"Opponent" ... |
what was the last single kitty wells released ? | CREATE TABLE table_204_500 (
id number,
"year" number,
"title" text,
"peak chart positions\nus country" number,
"peak chart positions\nus" number,
"album" text
) | SELECT "title" FROM table_204_500 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 last single kitty wells released ? ### Input: CREATE TABLE table_204_500 (
id number,
"year" number,
... |
What is the total number of Super Cup, when Title Playoff is '0', when Total is greater than 9, and when League is less than 11? | CREATE TABLE table_name_97 (
super_cup VARCHAR,
league VARCHAR,
title_playoff VARCHAR,
total VARCHAR
) | SELECT COUNT(super_cup) FROM table_name_97 WHERE title_playoff = 0 AND total > 9 AND league < 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 total number of Super Cup, when Title Playoff is '0', when Total is greater than 9, and when League is less than... |
What is the average number of rounds when fighting against Clay Guida? | CREATE TABLE table_name_54 (
round INTEGER,
opponent VARCHAR
) | SELECT AVG(round) FROM table_name_54 WHERE opponent = "clay guida" | 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 rounds when fighting against Clay Guida? ### Input: CREATE TABLE table_name_54 (
round INT... |
What are the details and star ratings of the three hotels with the lowest price ranges? | CREATE TABLE photos (
photo_id number,
tourist_attraction_id number,
name text,
description text,
filename text,
other_details text
)
CREATE TABLE ref_attraction_types (
attraction_type_code text,
attraction_type_description text
)
CREATE TABLE visits (
visit_id number,
tourist... | SELECT other_hotel_details, star_rating_code FROM hotels ORDER BY price_range LIMIT 3 | 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 details and star ratings of the three hotels with the lowest price ranges? ### Input: CREATE TABLE photos (
... |
What are the total number of podiums for more than 4 laps, and less than 149 races? | CREATE TABLE table_47056 (
"Season" text,
"Races" real,
"Wins" real,
"Podiums" real,
"Poles" real,
"Fastest Laps" real
) | SELECT COUNT("Podiums") FROM table_47056 WHERE "Fastest Laps" > '4' AND "Races" < '149' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the total number of podiums for more than 4 laps, and less than 149 races? ### Input: CREATE TABLE table_47056 (
... |
What are the number of the last names for all scholarship students?, list by the how many lname in ascending please. | CREATE TABLE Video_Games (
GameID INTEGER,
GName VARCHAR(40),
GType VARCHAR(40)
)
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 SportsInfo (
St... | SELECT LName, COUNT(LName) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.OnScholarship = 'Y' GROUP BY LName ORDER BY COUNT(LName) | 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: What are the number of the last names for all scholarship students?, list by the how many lname in ascending please. ### Inp... |
What was the score on August 19? | CREATE TABLE table_69354 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Time" text,
"Record" text
) | SELECT "Score" FROM table_69354 WHERE "Date" = 'august 19' | 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 on August 19? ### Input: CREATE TABLE table_69354 (
"Date" text,
"Opponent" text,
"Score" tex... |
Who is the head coach of the team, whose shirt sponsor is karstadt quelle versicherungen? | CREATE TABLE table_48625 (
"Team" text,
"Head coach" text,
"Team captain" text,
"Kitmaker" text,
"Shirt sponsor" text
) | SELECT "Head coach" FROM table_48625 WHERE "Shirt sponsor" = 'karstadt quelle versicherungen' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the head coach of the team, whose shirt sponsor is karstadt quelle versicherungen? ### Input: CREATE TABLE table_4862... |
what are the newly prescribed drugs for patient 022-6959 today compared to that yesterday? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '022-6959') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medicat... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the newly prescribed drugs for patient 022-6959 today compared to that yesterday? ### Input: CREATE TABLE microlab ... |
what is the average hospital cost that would involve a vitamin b12 lab test until 4 years ago? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'vitamin b12')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY cost.had... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the average hospital cost that would involve a vitamin b12 lab test until 4 years ago? ### Input: CREATE TABLE outpu... |
In how many locations did Game 13 take place? | CREATE TABLE table_17058116_5 (
location_attendance VARCHAR,
game VARCHAR
) | SELECT COUNT(location_attendance) FROM table_17058116_5 WHERE game = 13 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In how many locations did Game 13 take place? ### Input: CREATE TABLE table_17058116_5 (
location_attendance VARCHAR,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.