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 college has paul seiler as a player?
CREATE TABLE table_name_22 ( college VARCHAR, player VARCHAR )
SELECT college FROM table_name_22 WHERE player = "paul seiler"
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 college has paul seiler as a player? ### Input: CREATE TABLE table_name_22 ( college VARCHAR, player VARCHAR ) ...
What's listed as the Issue Price (BU) [Clarification Needed] with a Mintage (Proof) of 29,586?
CREATE TABLE table_name_57 ( issue_price__bu_ VARCHAR, _clarification_needed_ VARCHAR, mintage__proof_ VARCHAR )
SELECT issue_price__bu_ AS "_clarification_needed_" FROM table_name_57 WHERE mintage__proof_ = "29,586"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's listed as the Issue Price (BU) [Clarification Needed] with a Mintage (Proof) of 29,586? ### Input: CREATE TABLE table...
How many episodes with different series numbers were seen by 8.69 people in the US?
CREATE TABLE table_19995378_1 ( no_in_season VARCHAR, us_viewers__millions_ VARCHAR )
SELECT COUNT(no_in_season) FROM table_19995378_1 WHERE us_viewers__millions_ = "8.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: How many episodes with different series numbers were seen by 8.69 people in the US? ### Input: CREATE TABLE table_19995378_1...
How much Bronze has a Gold larger than 0, and a Total smaller than 1?
CREATE TABLE table_name_88 ( bronze VARCHAR, gold VARCHAR, total VARCHAR )
SELECT COUNT(bronze) FROM table_name_88 WHERE gold > 0 AND total < 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How much Bronze has a Gold larger than 0, and a Total smaller than 1? ### Input: CREATE TABLE table_name_88 ( bronze VAR...
calculate the total number of patients who had radical neck dissection, unilateral
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 prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Radical neck dissection, unilateral"
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: calculate the total number of patients who had radical neck dissection, unilateral ### Input: CREATE TABLE lab ( subject...
Show all countries and the number of people from each country in a pie chart.
CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of t...
SELECT Country, COUNT(*) FROM people GROUP BY Country
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 all countries and the number of people from each country in a pie chart. ### Input: CREATE TABLE people ( People_ID...
return me the paper in Databases area with the most citations .
CREATE TABLE domain_keyword ( did int, kid int ) CREATE TABLE cite ( cited int, citing int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE domain ( did int, na...
SELECT publication.title FROM domain, domain_publication, publication WHERE domain.did = domain_publication.did AND domain.name = 'Databases' AND publication.pid = domain_publication.pid ORDER BY publication.citation_num DESC LIMIT 1
academic
Below are sql tables 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 me the paper in Databases area with the most citations . ### Input: CREATE TABLE domain_keyword ( did int, ki...
List the names of members who did not attend any performance.
CREATE TABLE member ( member_id text, name text, nationality text, role text ) CREATE TABLE performance ( performance_id number, date text, host text, location text, attendance number ) CREATE TABLE member_attendance ( member_id number, performance_id number, num_of_pie...
SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM member_attendance)
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: List the names of members who did not attend any performance. ### Input: CREATE TABLE member ( member_id text, name ...
What is the least total number of medals when the bronze medals is 1, and Czech Republic (CZE) is the nation?
CREATE TABLE table_13456 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MIN("Total") FROM table_13456 WHERE "Bronze" = '1' AND "Nation" = 'czech republic (cze)'
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 least total number of medals when the bronze medals is 1, and Czech Republic (CZE) is the nation? ### Input: CRE...
Posts per day versus total badges earned.
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, Last...
SELECT DATE(p.CreationDate) AS PostDate, COUNT(p.Id) AS Posts, (SELECT COUNT(b.Id) / 100 FROM Badges AS b WHERE b.UserId = u.Id AND b.Date <= DATE(p.CreationDate)) AS BadgesEarned FROM Posts AS p, Users AS u WHERE u.Id = @UserId AND p.OwnerUserId = u.Id GROUP BY DATE(p.CreationDate), u.Id ORDER BY DATE(p.CreationDate)
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 per day versus total badges earned. ### Input: CREATE TABLE Votes ( Id number, PostId number, VoteTypeId n...
How many rounds have an Overall larger than 17, and a Position of quarterback?
CREATE TABLE table_32303 ( "Round" real, "Overall" real, "Player" text, "Position" text, "College" text )
SELECT COUNT("Round") FROM table_32303 WHERE "Overall" > '17' AND "Position" = 'quarterback'
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 rounds have an Overall larger than 17, and a Position of quarterback? ### Input: CREATE TABLE table_32303 ( "Ro...
What are the emails and phone numbers of custoemrs who have never filed a complaint?
CREATE TABLE complaints ( complaint_id number, product_id number, customer_id number, complaint_outcome_code text, complaint_status_code text, complaint_type_code text, date_complaint_raised time, date_complaint_closed time, staff_id number ) CREATE TABLE customers ( customer_id...
SELECT email_address, phone_number FROM customers WHERE NOT customer_id IN (SELECT customer_id 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: What are the emails and phone numbers of custoemrs who have never filed a complaint? ### Input: CREATE TABLE complaints ( ...
Which Surface has a score of 7-5, 5-7, 6-3?
CREATE TABLE table_66438 ( "Date" text, "Tournament" text, "Surface" text, "Partnering" text, "Opponents in the final" text, "Score" text )
SELECT "Surface" FROM table_66438 WHERE "Score" = '7-5, 5-7, 6-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 Surface has a score of 7-5, 5-7, 6-3? ### Input: CREATE TABLE table_66438 ( "Date" text, "Tournament" text, ...
Which round did the bout that led to a 1-0 record end in?
CREATE TABLE table_64276 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT "Round" FROM table_64276 WHERE "Record" = '1-0'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which round did the bout that led to a 1-0 record end in? ### Input: CREATE TABLE table_64276 ( "Res." text, "Record...
what were his points when he was in 8th position?
CREATE TABLE table_27260 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F.L." real, "Podiums" real, "Points" text, "Position" text )
SELECT "Points" FROM table_27260 WHERE "Position" = '8th'
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 were his points when he was in 8th position? ### Input: CREATE TABLE table_27260 ( "Season" real, "Series" text...
Give me the descriptions of the service types that cost more than 100.
CREATE TABLE products ( product_id text, product_name text, product_price number, product_description text, other_product_service_details text ) CREATE TABLE customers ( customer_id text, address_id number, customer_name text, customer_phone text, customer_email_address text, ...
SELECT T1.service_type_description FROM ref_service_types AS T1 JOIN services AS T2 ON T1.service_type_code = T2.service_type_code WHERE T2.product_price > 100
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: Give me the descriptions of the service types that cost more than 100. ### Input: CREATE TABLE products ( product_id tex...
Who is the incumbent of Florida 9?
CREATE TABLE table_18140 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text, "Candidates" text )
SELECT "Incumbent" FROM table_18140 WHERE "District" = 'Florida 9'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the incumbent of Florida 9? ### Input: CREATE TABLE table_18140 ( "District" text, "Incumbent" text, "Par...
provide the number of patients whose diagnoses icd9 code is v4511 and lab test fluid is other body fluid?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "V4511" AND lab.fluid = "Other Body Fluid"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses icd9 code is v4511 and lab test fluid is other body fluid? ### Input: CREATE ...
What was the record when the score was 11-10?
CREATE TABLE table_name_85 ( record VARCHAR, score VARCHAR )
SELECT record FROM table_name_85 WHERE score = "11-10"
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 record when the score was 11-10? ### Input: CREATE TABLE table_name_85 ( record VARCHAR, score VARCHAR ...
find the number of medicaid patients who had transplant from live non-related donor.
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Transplant from live non-related donor"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of medicaid patients who had transplant from live non-related donor. ### Input: CREATE TABLE lab ( subje...
how many patients have a diagnosis of malignant neoplastic bladder nec along with joint fluid lab test done?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Malig neo bladder NEC" AND lab.fluid = "Joint Fluid"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients have a diagnosis of malignant neoplastic bladder nec along with joint fluid lab test done? ### Input: CREA...
give the number of patients of hispanic/latino-puerto rican ethnicity who were admitted as newborn.
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_type = "NEWBORN" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the number of patients of hispanic/latino-puerto rican ethnicity who were admitted as newborn. ### Input: CREATE TABLE ...
what was the top position in which he finished ?
CREATE TABLE table_204_445 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT MIN("position") FROM table_204_445
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 top position in which he finished ? ### Input: CREATE TABLE table_204_445 ( id number, "year" number, ...
Rank in Germany based on reputation.
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Views, AccountId, Age, UpVotes, DownVotes FROM Users WHERE LOWER(Location) LIKE LOWER('%Germany%') AND Reputation >= 578 ORDER BY Reputation
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: Rank in Germany based on reputation. ### Input: CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, ...
what is the number of patients with a diagnoses of diaphragmatic hernia without mention of obstruction or gangrene who had urine lab test?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diaphragmatic hernia without mention of obstruction or gangrene" AND lab.fluid = "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: what is the number of patients with a diagnoses of diaphragmatic hernia without mention of obstruction or gangrene who had u...
How many times is the score 98 90?
CREATE TABLE table_17287 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Location Attendance") FROM table_17287 WHERE "Score" = '98–90'
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 is the score 98 90? ### Input: CREATE TABLE table_17287 ( "Game" real, "Date" text, "Team" text, ...
show the flights from PITTSBURGH to SAN FRANCISCO again on monday
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 airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE time_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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 21 AND date_day.month_number = 2...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show the flights from PITTSBURGH to SAN FRANCISCO again on monday ### Input: CREATE TABLE fare_basis ( fare_basis_code t...
What is GDP 2012 Millions of Euro, when Population in Millions is less than 1.3, and when GDP (Nominal) Per Capita 2012 Euro is 20,700(p)?
CREATE TABLE table_name_51 ( gdp_2012_millions_of_euro VARCHAR, population_in_millions VARCHAR, gdp__nominal__per_capita_2012_euro VARCHAR )
SELECT gdp_2012_millions_of_euro FROM table_name_51 WHERE population_in_millions < 1.3 AND gdp__nominal__per_capita_2012_euro = "20,700(p)"
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 GDP 2012 Millions of Euro, when Population in Millions is less than 1.3, and when GDP (Nominal) Per Capita 2012 Euro...
Who is Winning driver on 18 may?
CREATE TABLE table_6340 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text )
SELECT "Winning driver" FROM table_6340 WHERE "Date" = '18 may'
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 Winning driver on 18 may? ### Input: CREATE TABLE table_6340 ( "Name" text, "Circuit" text, "Date" text, ...
find me the cheapest one way fare i can get from BOSTON to DENVER
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airline ( airline_co...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find me the cheapest one way fare i can get from BOSTON to DENVER ### Input: CREATE TABLE airport ( airport_code varchar...
mean triplicate 12 _ lead ecg demonstrating qt interval ( corrected ) ( qtc ) > 450 msec in male and > 470 msec in female at the screening visit
CREATE TABLE table_train_214 ( "id" int, "gender" string, "lead_ecg" bool, "systolic_blood_pressure_sbp" int, "qt_interval" bool, "urine_dipstick_protein" int, "stroke" bool, "transient_ischemic_attack" bool, "qtc" int, "long_qt_syndrome" bool, "cardiovascular_disease" bool, ...
SELECT * FROM table_train_214 WHERE lead_ecg = 1 OR (qt_interval = 1 OR (gender = 'male' AND qtc > 450) OR (gender = 'female' AND qtc > 470))
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: mean triplicate 12 _ lead ecg demonstrating qt interval ( corrected ) ( qtc ) > 450 msec in male and > 470 msec in female at...
Name the class for 4th position with year before 2006
CREATE TABLE table_name_67 ( class VARCHAR, pos VARCHAR, year VARCHAR )
SELECT class FROM table_name_67 WHERE pos = "4th" AND year < 2006
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 class for 4th position with year before 2006 ### Input: CREATE TABLE table_name_67 ( class VARCHAR, pos VAR...
Retrieve the country that has published the most papers.
CREATE TABLE inst ( instid number, name text, country text ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE authors ( authid number, lname text, fname text )
SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Retrieve the country that has published the most papers. ### Input: CREATE TABLE inst ( instid number, name text, ...
how many performers appeared on the air date 21 january 2011 ?
CREATE TABLE table_203_784 ( id number, "no. in\nseries" number, "no. in\nseason" number, "performer" text, "appearance" text, "air date" text )
SELECT COUNT("performer") FROM table_203_784 WHERE "air date" = '21 january 2011'
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 performers appeared on the air date 21 january 2011 ? ### Input: CREATE TABLE table_203_784 ( id number, "n...
What is every entry for Friday August 26 when the entry for Wednesday August 24 is 23' 52.67 94.807mph?
CREATE TABLE table_30058355_7 ( fri_26_aug VARCHAR, wed_24_aug VARCHAR )
SELECT fri_26_aug FROM table_30058355_7 WHERE wed_24_aug = "23' 52.67 94.807mph"
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 every entry for Friday August 26 when the entry for Wednesday August 24 is 23' 52.67 94.807mph? ### Input: CREATE TA...
Who is the winner constructor with driver riccardo patrese?
CREATE TABLE table_57166 ( "Round" real, "Grand Prix" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text )
SELECT "Winning Constructor" FROM table_57166 WHERE "Winning Driver" = 'riccardo patrese'
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 winner constructor with driver riccardo patrese? ### Input: CREATE TABLE table_57166 ( "Round" real, "Gra...
What was the highest Interview score from a contestant who had a swimsuit score of 8.857 and an Average score over 9.097?
CREATE TABLE table_name_66 ( interview INTEGER, swimsuit VARCHAR, average VARCHAR )
SELECT MAX(interview) FROM table_name_66 WHERE swimsuit = 8.857 AND average > 9.097
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 Interview score from a contestant who had a swimsuit score of 8.857 and an Average score over 9.097? ##...
Number of users authored at least one post.
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 COUNT(DISTINCT OwnerUserId) FROM Posts
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Number of users authored at least one post. ### Input: CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number,...
For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?
CREATE TABLE table_name_21 ( ties INTEGER, games_played VARCHAR, wins VARCHAR, goals_against VARCHAR )
SELECT AVG(ties) FROM table_name_21 WHERE wins < 5 AND goals_against > 37 AND games_played < 8
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 teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties? ...
What team has a Record of 50 28?
CREATE TABLE table_46722 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Team" FROM table_46722 WHERE "Record" = '50–28'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What team has a Record of 50 28? ### Input: CREATE TABLE table_46722 ( "Game" real, "Date" text, "Team" text, ...
Who was the away team on 30 January 1988, when the home team was Everton?
CREATE TABLE table_58810 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT "Away team" FROM table_58810 WHERE "Home team" = 'everton' AND "Date" = '30 january 1988'
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 on 30 January 1988, when the home team was Everton? ### Input: CREATE TABLE table_58810 ( "Tie no"...
what is the price of a diagnosis for uterine leiomyoma nos?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, d...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'uterine leiomyoma nos'))
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 price of a diagnosis for uterine leiomyoma nos? ### Input: CREATE TABLE diagnoses_icd ( row_id number, s...
How many results are there with the original title of ani ohev otach roza ( )?
CREATE TABLE table_12369913_1 ( result VARCHAR, original_title VARCHAR )
SELECT COUNT(result) FROM table_12369913_1 WHERE original_title = "Ani Ohev Otach Roza (אני אוהב אותך רוזה)"
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 results are there with the original title of ani ohev otach roza ( )? ### Input: CREATE TABLE table_12369913_1 ( ...
What was the first leg score of the matchup with a 2nd leg of 80-70?
CREATE TABLE table_63986 ( "Team #1" text, "Agg." text, "Team #2" text, "1st leg" text, "2nd leg" text )
SELECT "1st leg" FROM table_63986 WHERE "2nd leg" = '80-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: What was the first leg score of the matchup with a 2nd leg of 80-70? ### Input: CREATE TABLE table_63986 ( "Team #1" tex...
What's the report about townsville crocodiles as an away team?
CREATE TABLE table_name_35 ( report VARCHAR, away_team VARCHAR )
SELECT report FROM table_name_35 WHERE away_team = "townsville crocodiles"
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 report about townsville crocodiles as an away team? ### Input: CREATE TABLE table_name_35 ( report VARCHAR, ...
How many draft picks is player byron dafoe?
CREATE TABLE table_2897457_2 ( pick__number VARCHAR, player VARCHAR )
SELECT COUNT(pick__number) FROM table_2897457_2 WHERE player = "Byron Dafoe"
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 draft picks is player byron dafoe? ### Input: CREATE TABLE table_2897457_2 ( pick__number VARCHAR, player V...
Find the names of stadiums that some Australian swimmers have been to, and count them by a pie chart
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimme...
SELECT T4.Name, COUNT(T4.Name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID JOIN event AS t3 ON t2.Event_ID = t3.ID JOIN stadium AS t4 ON t4.ID = t3.Stadium_ID WHERE t1.Nationality = 'Australia' GROUP BY T4.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: Find the names of stadiums that some Australian swimmers have been to, and count them by a pie chart ### Input: CREATE TABLE...
tell me the top three diagnosis that has the highest two year mortality rate?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt...
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: tell me the top three diagnosis that has the highest two year mortality rate? ### Input: CREATE TABLE microbiologyevents ( ...
What tournament was located in Colorado?
CREATE TABLE table_name_5 ( tournament VARCHAR, location VARCHAR )
SELECT tournament FROM table_name_5 WHERE location = "colorado"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What tournament was located in Colorado? ### Input: CREATE TABLE table_name_5 ( tournament VARCHAR, location VARCHAR...
What is the smallest losses when the wins are 5 and the against less than 1852?
CREATE TABLE table_41898 ( "Ballarat FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
SELECT MIN("Losses") FROM table_41898 WHERE "Wins" = '5' AND "Against" < '1852'
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 smallest losses when the wins are 5 and the against less than 1852? ### Input: CREATE TABLE table_41898 ( "B...
What value for university students and adult goes with male gender for minimum weight?
CREATE TABLE table_5335 ( "Specification" text, "Gender" text, "Junior High School (12\u201315 yrs)" text, "Senior High School (15\u201318 yrs)" text, "University students and Adults (18yrs+)" text )
SELECT "University students and Adults (18yrs+)" FROM table_5335 WHERE "Gender" = 'male' AND "Specification" = 'minimum weight'
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 value for university students and adult goes with male gender for minimum weight? ### Input: CREATE TABLE table_5335 ( ...
Of all the teachers , which one teaches PEDDENT 599 ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PEDDENT' AND course.number = 599 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offerin...
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: Of all the teachers , which one teaches PEDDENT 599 ? ### Input: CREATE TABLE course_offering ( offering_id int, cou...
how much is the cost of a drug called dorzolamide 2% ophth. soln.?
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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'dorzolamide 2% ophth. soln.')
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: how much is the cost of a drug called dorzolamide 2% ophth. soln.? ### Input: CREATE TABLE chartevents ( row_id number, ...
since 6 years ago, how many times patient 80119 had visited the hospital?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, war...
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 80119 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-6 year')
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 6 years ago, how many times patient 80119 had visited the hospital? ### Input: CREATE TABLE cost ( row_id number, ...
Name the 3 -credit courses .
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT name, number FROM course WHERE credits = 3 AND department = 'EECS'
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: Name the 3 -credit courses . ### Input: CREATE TABLE course_offering ( offering_id int, course_id int, semester ...
List the name of physicians who took some appointment.
CREATE TABLE appointment ( Physician VARCHAR ) CREATE TABLE physician ( name VARCHAR, EmployeeID VARCHAR )
SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
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 name of physicians who took some appointment. ### Input: CREATE TABLE appointment ( Physician VARCHAR ) CREATE...
Show all student ids who are older than 20.
CREATE TABLE Student ( StuID VARCHAR, age INTEGER )
SELECT StuID FROM Student WHERE age > 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: Show all student ids who are older than 20. ### Input: CREATE TABLE Student ( StuID VARCHAR, age INTEGER ) ### Respo...
Could I take class HHCR 710 as Core ?
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructo...
SELECT COUNT(*) > 0 FROM course, program, program_course WHERE course.department = 'HHCR' AND course.number = 710 AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Could I take class HHCR 710 as Core ? ### Input: CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of email and salary in a bar chart, list in asc by the x-axis.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE T...
SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL
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 body participated in 1973?
CREATE TABLE table_name_43 ( body VARCHAR, year VARCHAR )
SELECT body FROM table_name_43 WHERE year = "1973"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What body participated in 1973? ### Input: CREATE TABLE table_name_43 ( body VARCHAR, year VARCHAR ) ### Response: S...
Which country has an IATA of JFK?
CREATE TABLE table_name_3 ( country VARCHAR, iata VARCHAR )
SELECT country FROM table_name_3 WHERE iata = "jfk"
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 country has an IATA of JFK? ### Input: CREATE TABLE table_name_3 ( country VARCHAR, iata VARCHAR ) ### Respons...
What is average age of male for different job title?
CREATE TABLE Person ( job VARCHAR, age INTEGER, gender VARCHAR )
SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job
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 average age of male for different job title? ### Input: CREATE TABLE Person ( job VARCHAR, age INTEGER, ...
how many years did he play in less than 16 games ?
CREATE TABLE table_204_756 ( id number, "year" number, "team" text, "games" number, "combined tackles" number, "tackles" number, "assisted tackles" number, "sacks" number, "forced fumbles" number, "fumble recoveries" number, "fumble return yards" number, "interceptions" n...
SELECT COUNT("year") FROM table_204_756 WHERE "games" < 16
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 years did he play in less than 16 games ? ### Input: CREATE TABLE table_204_756 ( id number, "year" number,...
Is 510 taken by undergrads ?
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varch...
SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 510
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 510 taken by undergrads ? ### Input: CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) ...
which Score has a Partnering of dmitry tursunov?
CREATE TABLE table_name_63 ( score VARCHAR, partnering VARCHAR )
SELECT score FROM table_name_63 WHERE partnering = "dmitry tursunov"
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 Partnering of dmitry tursunov? ### Input: CREATE TABLE table_name_63 ( score VARCHAR, partnering V...
What year did Elf Team Tyrrell have 34 points?
CREATE TABLE table_15835 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" text )
SELECT AVG("Year") FROM table_15835 WHERE "Entrant" = 'elf team tyrrell' AND "Points" = '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 year did Elf Team Tyrrell have 34 points? ### Input: CREATE TABLE table_15835 ( "Year" real, "Entrant" text, ...
calculate the maximum age of unmarried patients who have gangrene primary disease.
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" 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: calculate the maximum age of unmarried patients who have gangrene primary disease. ### Input: CREATE TABLE diagnoses ( s...
How many students participated in tryouts for each college by descennding count. Show a pie chart.
CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) )
SELECT cName, COUNT(*) FROM Tryout GROUP BY cName ORDER BY COUNT(*) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many students participated in tryouts for each college by descennding count. Show a pie chart. ### Input: CREATE TABLE C...
What are the average byes of Bonnie Doon having more than 16 wins?
CREATE TABLE table_name_54 ( byes INTEGER, benalla_dfl VARCHAR, wins VARCHAR )
SELECT AVG(byes) FROM table_name_54 WHERE benalla_dfl = "bonnie doon" AND wins > 16
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 are the average byes of Bonnie Doon having more than 16 wins? ### Input: CREATE TABLE table_name_54 ( byes INTEGER,...
Give me the trend of how many receipt date by receipt date, and could you show in asc by the receipt_date?
CREATE TABLE Circulation_History ( document_id INTEGER, draft_number INTEGER, copy_number INTEGER, employee_id INTEGER ) CREATE TABLE Roles ( role_code CHAR(15), role_description VARCHAR(255) ) CREATE TABLE Documents_Mailed ( document_id INTEGER, mailed_to_address_id INTEGER, maili...
SELECT receipt_date, COUNT(receipt_date) FROM Documents ORDER BY 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: Give me the trend of how many receipt date by receipt date, and could you show in asc by the receipt_date? ### Input: CREATE...
How did the School/Club Team of Manuel Luis Quezon acquire their Forward?
CREATE TABLE table_42620 ( "Name" text, "Position" text, "Number" real, "School/Club Team" text, "Season" text, "Acquisition via" text )
SELECT "Acquisition via" FROM table_42620 WHERE "Position" = 'forward' AND "School/Club Team" = 'manuel luis quezon'
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 did the School/Club Team of Manuel Luis Quezon acquire their Forward? ### Input: CREATE TABLE table_42620 ( "Name" t...
What is the WR player?
CREATE TABLE table_49221 ( "Round" real, "Pick" text, "Player" text, "Position" text, "School/Club Team" text )
SELECT "Player" FROM table_49221 WHERE "Position" = 'wr'
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 WR player? ### Input: CREATE TABLE table_49221 ( "Round" real, "Pick" text, "Player" text, "Posi...
Name the attendance on april 17
CREATE TABLE table_name_15 ( attendance VARCHAR, date VARCHAR )
SELECT attendance FROM table_name_15 WHERE date = "april 17"
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 attendance on april 17 ### Input: CREATE TABLE table_name_15 ( attendance VARCHAR, date VARCHAR ) ### Respo...
what are the three most common procedures that followed within 2 months for patients who were given a contrast arteriogram-leg?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, a...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = 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 are the three most common procedures that followed within 2 months for patients who were given a contrast arteriogram-l...
What are the courses offered this semester ?
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 ORDER BY course.department
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the courses offered this semester ? ### Input: CREATE TABLE program_requirement ( program_id int, category ...
show flights from PITTSBURGH into SAN FRANCISCO
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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show flights from PITTSBURGH into SAN FRANCISCO ### Input: CREATE TABLE fare_basis ( fare_basis_code text, booking_c...
how many patients whose age is less than 81 and days of hospital stay is greater than 29?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "81" AND demographic.days_stay > "29"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose age is less than 81 and days of hospital stay is greater than 29? ### Input: CREATE TABLE demographi...
What is the record of game 26 with beno udrih (4) as the highest assists?
CREATE TABLE table_47031 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Record" FROM table_47031 WHERE "High assists" = 'beno udrih (4)' AND "Game" = '26'
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 record of game 26 with beno udrih (4) as the highest assists? ### Input: CREATE TABLE table_47031 ( "Game" r...
I want to see trend of the average of budget in billions by creation
CREATE TABLE head ( head_ID int, name text, born_state text, age real ) CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billions real, Num...
SELECT Creation, AVG(Budget_in_Billions) FROM department
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: I want to see trend of the average of budget in billions by creation ### Input: CREATE TABLE head ( head_ID int, nam...
Who was the winner against finalist Lina Krasnoroutskaya?
CREATE TABLE table_name_92 ( winner VARCHAR, finalist VARCHAR )
SELECT winner FROM table_name_92 WHERE finalist = "lina krasnoroutskaya"
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 winner against finalist Lina Krasnoroutskaya? ### Input: CREATE TABLE table_name_92 ( winner VARCHAR, fi...
What is 2000, when 1996 is 'A', when 1997 is 'A', and when 2007 is 'A'?
CREATE TABLE table_48509 ( "Tournament" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "Career WR"...
SELECT "2000" FROM table_48509 WHERE "1996" = 'a' AND "1997" = 'a' AND "2007" = 'a'
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 2000, when 1996 is 'A', when 1997 is 'A', and when 2007 is 'A'? ### Input: CREATE TABLE table_48509 ( "Tournamen...
What is the maximum total when the To par is +3?
CREATE TABLE table_59095 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
SELECT MAX("Total") FROM table_59095 WHERE "To par" = '+3'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the maximum total when the To par is +3? ### Input: CREATE TABLE table_59095 ( "Player" text, "Country" text...
Where did Geelong play as the away team?
CREATE TABLE table_name_62 ( venue VARCHAR, away_team VARCHAR )
SELECT venue FROM table_name_62 WHERE away_team = "geelong"
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 did Geelong play as the away team? ### Input: CREATE TABLE table_name_62 ( venue VARCHAR, away_team VARCHAR ) ...
What date has ny islanders as the visitor?
CREATE TABLE table_34997 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" text, "Record" text )
SELECT "Date" FROM table_34997 WHERE "Visitor" = 'ny islanders'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What date has ny islanders as the visitor? ### Input: CREATE TABLE table_34997 ( "Date" text, "Visitor" text, "S...
Before the year 2012, what award was given to the artist in the category of revelaci n pop del a o?
CREATE TABLE table_48512 ( "Year" real, "Award" text, "Nominated Work" text, "Category" text, "Result" text )
SELECT "Award" FROM table_48512 WHERE "Year" < '2012' AND "Category" = 'revelación pop del año'
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: Before the year 2012, what award was given to the artist in the category of revelaci n pop del a o? ### Input: CREATE TABLE ...
What is the average attendance on april 24?
CREATE TABLE table_53603 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT AVG("Attendance") FROM table_53603 WHERE "Date" = 'april 24'
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 attendance on april 24? ### Input: CREATE TABLE table_53603 ( "Date" text, "Opponent" text, ...
What are the ids and names of the architects who built at least 3 bridges , and rank y-axis in desc order.
CREATE TABLE architect ( id text, name text, nationality text, gender text ) CREATE TABLE bridge ( architect_id int, id int, name text, location text, length_meters real, length_feet real ) CREATE TABLE mill ( architect_id int, id int, location text, name text, ...
SELECT T1.name, T1.id FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id ORDER BY T1.id DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the ids and names of the architects who built at least 3 bridges , and rank y-axis in desc order. ### Input: CREATE...
What is the D 46 with a D 43 with r 3?
CREATE TABLE table_name_2 ( d_46_√ VARCHAR, d_43_√ VARCHAR )
SELECT d_46_√ FROM table_name_2 WHERE d_43_√ = "r 3"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the D 46 with a D 43 with r 3? ### Input: CREATE TABLE table_name_2 ( d_46_√ VARCHAR, d_43_√ VARCHAR ) ### R...
What are the highest losses that have points agaisnt less than 956, high park demons as the club, and points less than 16?
CREATE TABLE table_name_93 ( loses INTEGER, points VARCHAR, points_against VARCHAR, club VARCHAR )
SELECT MAX(loses) FROM table_name_93 WHERE points_against < 956 AND club = "high park demons" AND points < 16
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 are the highest losses that have points agaisnt less than 956, high park demons as the club, and points less than 16? #...
What rank was the team from Australia?
CREATE TABLE table_63443 ( "Rank" real, "Rowers" text, "Country" text, "Time" text, "Notes" text )
SELECT COUNT("Rank") FROM table_63443 WHERE "Country" = 'australia'
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 rank was the team from Australia? ### Input: CREATE TABLE table_63443 ( "Rank" real, "Rowers" text, "Countr...
Name the sum of roll for morrinsville school
CREATE TABLE table_71700 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" real, "Roll" real )
SELECT SUM("Roll") FROM table_71700 WHERE "Name" = 'morrinsville school'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the sum of roll for morrinsville school ### Input: CREATE TABLE table_71700 ( "Name" text, "Years" text, "G...
Draw a bar chart of transaction type versus the total number, and rank from low to high by the names.
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 Accounts ( account_id INTEGER, customer_id INTEGER, account_...
SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY transaction_type
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart of transaction type versus the total number, and rank from low to high by the names. ### Input: CREATE TABL...
How many courses are provided in each year? Visualize with a group line chart grouping by semester, I want to order X from in desc order.
CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_number varchar(7), time_slot_id varchar(4) ) CREATE TABLE takes ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), ...
SELECT year, COUNT(*) FROM section GROUP BY semester ORDER BY year 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: How many courses are provided in each year? Visualize with a group line chart grouping by semester, I want to order X from i...
Show all role codes and the number of employees in each role by a bar chart.
CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_...
SELECT Role_Code, COUNT(*) FROM Employees GROUP BY Role_Code
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show all role codes and the number of employees in each role by a bar chart. ### Input: CREATE TABLE All_Documents ( Doc...
How many starts are there?
CREATE TABLE table_25751 ( "Position" real, "Driver" text, "Points" real, "Starts" real, "Wins" real, "Top 5s" real, "Top 10s" real, "Winnings ($)" real )
SELECT MIN("Starts") FROM table_25751
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 starts are there? ### Input: CREATE TABLE table_25751 ( "Position" real, "Driver" text, "Points" real, ...
give me the number of patients who had single internal mammary-coronary artery bypass.
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "1 int mam-cor art bypass"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients who had single internal mammary-coronary artery bypass. ### Input: CREATE TABLE diagnoses ( ...
What is the gross capacity of the unit that started commercial operation on August 28, 1987?
CREATE TABLE table_53324 ( "Unit" text, "Reactor Type" text, "Net Capacity" text, "Gross Capacity" text, "Construction Start" text, "Grid Connection" text, "Commercial Operation" text, "Status" text )
SELECT "Gross Capacity" FROM table_53324 WHERE "Commercial Operation" = 'august 28, 1987'
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 gross capacity of the unit that started commercial operation on August 28, 1987? ### Input: CREATE TABLE table_5...
What is the type of the player whose transfer fee was 20m?
CREATE TABLE table_72485 ( "N" real, "P" text, "Name" text, "EU" text, "Country" text, "Age" real, "Type" text, "Moving from" text, "Transfer window" text, "Ends" text, "Transfer fee" text, "Source" text )
SELECT "Type" FROM table_72485 WHERE "Transfer fee" = '€20M'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the type of the player whose transfer fee was 20m? ### Input: CREATE TABLE table_72485 ( "N" real, "P" text,...
How many yards did the player with 87 attempts rush?
CREATE TABLE table_11157122_5 ( yards VARCHAR, attempts VARCHAR )
SELECT yards FROM table_11157122_5 WHERE attempts = 87
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 yards did the player with 87 attempts rush? ### Input: CREATE TABLE table_11157122_5 ( yards VARCHAR, attem...
Which Score has smaller than 1994, and a Partner of elizabeth sayers smylie?
CREATE TABLE table_75986 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
SELECT "Score" FROM table_75986 WHERE "Year" < '1994' AND "Partner" = 'elizabeth sayers smylie'
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 Score has smaller than 1994, and a Partner of elizabeth sayers smylie? ### Input: CREATE TABLE table_75986 ( "Outc...