instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
Which opponent has a save of smith (22)?
CREATE TABLE table_name_65 ( opponent VARCHAR, save VARCHAR )
SELECT opponent FROM table_name_65 WHERE save = "smith (22)"
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 opponent has a save of smith (22)? ### Input: CREATE TABLE table_name_65 ( opponent VARCHAR, save VARCHAR ) ##...
What was the result of the home game against Derby County?
CREATE TABLE table_name_71 ( win_draw_lose VARCHAR, venue VARCHAR, team VARCHAR )
SELECT win_draw_lose FROM table_name_71 WHERE venue = "home" AND team = "derby 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: What was the result of the home game against Derby County? ### Input: CREATE TABLE table_name_71 ( win_draw_lose VARCHAR...
tell me the average arterial bp [systolic] of patient 16472 until 08/15/2105?
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16472)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte...
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 average arterial bp [systolic] of patient 16472 until 08/15/2105? ### Input: CREATE TABLE transfers ( row_id...
Which Total has a Club of darlington, and a League goals of 13, and a League Cup goals of 1?
CREATE TABLE table_43812 ( "Club" text, "League goals" text, "FA Cup goals" text, "League Cup goals" text, "Total" real )
SELECT SUM("Total") FROM table_43812 WHERE "Club" = 'darlington' AND "League goals" = '13' AND "League Cup goals" = '1'
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 Total has a Club of darlington, and a League goals of 13, and a League Cup goals of 1? ### Input: CREATE TABLE table_4...
Top SO users from germany.
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Po...
SELECT DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%germany%' OR Location LIKE '%Germany%' OR Location LIKE N'%DE%' OR Location LIKE N'%de%' OR Location LIKE N'%deutschland%' ORDER BY Reputation DESC LIMIT 3000
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 SO users from germany. ### Input: CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time,...
age 65 years and older
CREATE TABLE table_train_103 ( "id" int, "systolic_blood_pressure_sbp" int, "epilepsy" bool, "diastolic_blood_pressure_dbp" int, "heart_rate" int, "seizure_disorder" bool, "age" float, "NOUSE" float )
SELECT * FROM table_train_103 WHERE age >= 65
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: age 65 years and older ### Input: CREATE TABLE table_train_103 ( "id" int, "systolic_blood_pressure_sbp" int, "e...
Which Location has a Frequency of 102.5 fm?
CREATE TABLE table_name_4 ( location VARCHAR, frequency VARCHAR )
SELECT location FROM table_name_4 WHERE frequency = "102.5 fm"
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 Location has a Frequency of 102.5 fm? ### Input: CREATE TABLE table_name_4 ( location VARCHAR, frequency VARCH...
What is the smallest crowd for victoria park?
CREATE TABLE table_name_89 ( crowd INTEGER, venue VARCHAR )
SELECT MIN(crowd) FROM table_name_89 WHERE venue = "victoria park"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest crowd for victoria park? ### Input: CREATE TABLE table_name_89 ( crowd INTEGER, venue VARCHAR )...
What episode number in the season is titled 'stray'?
CREATE TABLE table_73846 ( "Season no." real, "Series no." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
SELECT MAX("Season no.") FROM table_73846 WHERE "Title" = 'Stray'
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 episode number in the season is titled 'stray'? ### Input: CREATE TABLE table_73846 ( "Season no." real, "Serie...
What is the position for the pick number 17?
CREATE TABLE table_439 ( "Overall Pick #" real, "AFL Team" text, "Player" text, "Position" text, "College" text )
SELECT "Position" FROM table_439 WHERE "Overall Pick #" = '17'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the position for the pick number 17? ### Input: CREATE TABLE table_439 ( "Overall Pick #" real, "AFL Team" t...
WHAT WAS THE NUMBER OF THE ONLY FORWARD-CENTER TO MAKE THE ROSTER?
CREATE TABLE table_15621965_18 ( no INTEGER, position VARCHAR )
SELECT MIN(no) FROM table_15621965_18 WHERE position = "Forward-Center"
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 NUMBER OF THE ONLY FORWARD-CENTER TO MAKE THE ROSTER? ### Input: CREATE TABLE table_15621965_18 ( no INTEGE...
What was the class position of the team that was in the 4th position?
CREATE TABLE table_77295 ( "Year" real, "Team" text, "Co-Drivers" text, "Class" text, "Laps" real, "Pos." text, "Class Pos." text )
SELECT "Class Pos." FROM table_77295 WHERE "Pos." = '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: What was the class position of the team that was in the 4th position? ### Input: CREATE TABLE table_77295 ( "Year" real,...
How many accounts for each customer? Show a bar chart that groups by customer's last name.
CREATE TABLE Product_Categories ( production_type_code VARCHAR(15), product_type_description VARCHAR(80), vat_rating DECIMAL(19,4) ) CREATE TABLE Accounts ( account_id INTEGER, customer_id INTEGER, date_account_opened DATETIME, account_name VARCHAR(50), other_account_details VARCHAR(255...
SELECT customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many accounts for each customer? Show a bar chart that groups by customer's last name. ### Input: CREATE TABLE Product_C...
Name the date for eastern creek raceway
CREATE TABLE table_2446333_2 ( date VARCHAR, circuit VARCHAR )
SELECT date FROM table_2446333_2 WHERE circuit = "Eastern Creek Raceway"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the date for eastern creek raceway ### Input: CREATE TABLE table_2446333_2 ( date VARCHAR, circuit VARCHAR ) ##...
Name the least total kurdistan list
CREATE TABLE table_26850 ( "Governorate" text, "Kurdistan Democratic Party" real, "Patriotic Union of Kurdistan" real, "Total Kurdistan List" real, "Total Governorate Seats" real )
SELECT MIN("Total Kurdistan List") FROM table_26850
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 least total kurdistan list ### Input: CREATE TABLE table_26850 ( "Governorate" text, "Kurdistan Democratic ...
What is the earliest week that shows a record of 8 5?
CREATE TABLE table_name_40 ( week INTEGER, record VARCHAR )
SELECT MIN(week) FROM table_name_40 WHERE record = "8–5"
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 earliest week that shows a record of 8 5? ### Input: CREATE TABLE table_name_40 ( week INTEGER, record V...
Create a pie chart showing the number of carrier across carrier.
CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stoc...
SELECT Carrier, COUNT(Carrier) FROM phone GROUP BY Carrier
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: Create a pie chart showing the number of carrier across carrier. ### Input: CREATE TABLE market ( Market_ID int, Dis...
how many patients whose admission type is emergency and diagnoses icd9 code is 56210?
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 WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.icd9_code = "56210"
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 admission type is emergency and diagnoses icd9 code is 56210? ### Input: CREATE TABLE lab ( subj...
How many series originally aired before 1999 with more than 7 episodes and a DVD Region 1 release date of 16 april 2013?
CREATE TABLE table_45278 ( "Series Number" real, "Number of Episodes" real, "Original Air Date" real, "DVD Region 2 release date" text, "DVD Region 1 release date" text )
SELECT COUNT("Series Number") FROM table_45278 WHERE "Original Air Date" < '1999' AND "Number of Episodes" > '7' AND "DVD Region 1 release date" = '16 april 2013'
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 series originally aired before 1999 with more than 7 episodes and a DVD Region 1 release date of 16 april 2013? ###...
What away is there for the q3 round?
CREATE TABLE table_name_68 ( away VARCHAR, round VARCHAR )
SELECT away FROM table_name_68 WHERE round = "q3"
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 away is there for the q3 round? ### Input: CREATE TABLE table_name_68 ( away VARCHAR, round VARCHAR ) ### Respo...
how many competitions had a score of 1-0 at most ?
CREATE TABLE table_203_652 ( id number, "goal" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text )
SELECT COUNT(*) FROM table_203_652 WHERE "score" = '1-0'
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 competitions had a score of 1-0 at most ? ### Input: CREATE TABLE table_203_652 ( id number, "goal" number,...
What is the total number of Silver for the Nation with more than 1 Bronze and a Rank less than 5?
CREATE TABLE table_66695 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT COUNT("Silver") FROM table_66695 WHERE "Bronze" > '1' AND "Rank" < '5'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of Silver for the Nation with more than 1 Bronze and a Rank less than 5? ### Input: CREATE TABLE ta...
who was the sooners opponent after usc ?
CREATE TABLE table_204_617 ( id number, "date" text, "opponent#" text, "rank#" text, "site" text, "tv" text, "result" text, "attendance" number )
SELECT "opponent#" FROM table_204_617 WHERE "date" > (SELECT "date" FROM table_204_617 WHERE "opponent#" = 'usc') ORDER BY "date" 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: who was the sooners opponent after usc ? ### Input: CREATE TABLE table_204_617 ( id number, "date" text, "oppone...
list the top five most common drugs that patients were prescribed within 2 months after being prescribed oxycodone (sustained release) since 1 year ago.
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE cost ( row_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 = 'oxycodone (sustained release)' AND DATETIME(prescriptions.startda...
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: list the top five most common drugs that patients were prescribed within 2 months after being prescribed oxycodone (sustaine...
list all flights on sunday from SAN FRANCISCO to PITTSBURGH nonstop
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_co...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((flight.stops = 0) AND date_day.day_number = 27 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AN...
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: list all flights on sunday from SAN FRANCISCO to PITTSBURGH nonstop ### Input: CREATE TABLE month ( month_number int, ...
How many times was the high rebounds by marcus camby (18)?
CREATE TABLE table_29902 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Date") FROM table_29902 WHERE "High rebounds" = 'Marcus Camby (18)'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many times was the high rebounds by marcus camby (18)? ### Input: CREATE TABLE table_29902 ( "Game" real, "Date"...
What sponsor has the head coach Samad Marfavi?
CREATE TABLE table_29469 ( "Team" text, "Head coach" text, "Team captain" text, "Kit maker" text, "Shirt sponsor" text, "Past Season" text )
SELECT "Shirt sponsor" FROM table_29469 WHERE "Head coach" = 'Samad Marfavi'
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 sponsor has the head coach Samad Marfavi? ### Input: CREATE TABLE table_29469 ( "Team" text, "Head coach" text,...
what is date of birth and primary disease of subject name brian brock?
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.dob, demographic.diagnosis FROM demographic WHERE demographic.name = "Brian Brock"
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 date of birth and primary disease of subject name brian brock? ### Input: CREATE TABLE lab ( subject_id text, ...
Find the number of the enrollment date for all the tests that have 'Pass' result, and could you order x axis from high to low order please?
CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Student_Tests_Taken ( registration_id IN...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment ORDER BY date_of_enrolment 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: Find the number of the enrollment date for all the tests that have 'Pass' result, and could you order x axis from high to lo...
What is the Opponent at the Honda Center on March 29?
CREATE TABLE table_61636 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text, "Arena" text, "Points" real )
SELECT "Opponent" FROM table_61636 WHERE "Arena" = 'honda center' AND "Date" = 'march 29'
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 Opponent at the Honda Center on March 29? ### Input: CREATE TABLE table_61636 ( "Date" text, "Opponent" ...
Which team drafted Ron Annear?
CREATE TABLE table_2850912_10 ( nhl_team VARCHAR, player VARCHAR )
SELECT nhl_team FROM table_2850912_10 WHERE player = "Ron Annear"
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 team drafted Ron Annear? ### Input: CREATE TABLE table_2850912_10 ( nhl_team VARCHAR, player VARCHAR ) ### Res...
How many wins has a podiums greater than 1 and 9 as the races with a season after 1984?
CREATE TABLE table_name_13 ( wins VARCHAR, season VARCHAR, podiums VARCHAR, races VARCHAR )
SELECT COUNT(wins) FROM table_name_13 WHERE podiums > 1 AND races = 9 AND season > 1984
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 wins has a podiums greater than 1 and 9 as the races with a season after 1984? ### Input: CREATE TABLE table_name_1...
how many album entries are there ?
CREATE TABLE table_204_244 ( id number, "year" number, "album" text, "peak\nus" number, "peak\nus\nholiday" number, "certifications\n(sales threshold)" text )
SELECT COUNT("album") FROM table_204_244
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 album entries are there ? ### Input: CREATE TABLE table_204_244 ( id number, "year" number, "album" tex...
What is the highest value for col(m) when prominence(m) is 3755?
CREATE TABLE table_22713 ( "Rank" real, "Peak" text, "Country" text, "Island" text, "Elevation (m)" real, "Prominence (m)" real, "Col (m)" real )
SELECT MAX("Col (m)") FROM table_22713 WHERE "Prominence (m)" = '3755'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest value for col(m) when prominence(m) is 3755? ### Input: CREATE TABLE table_22713 ( "Rank" real, ...
what is the monthly minimum output (ml)-closed/suction drain right abdomen bulb 19 fr. output that patient 027-203413 has had since 11/07/2104?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND intakeoutput.celllabel = 'outp...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the monthly minimum output (ml)-closed/suction drain right abdomen bulb 19 fr. output that patient 027-203413 has ha...
How many times is the ethnic group other: total?
CREATE TABLE table_282413_3 ( ethnic_group VARCHAR )
SELECT COUNT(2001 AS __percentage) FROM table_282413_3 WHERE ethnic_group = "Other: Total"
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 times is the ethnic group other: total? ### Input: CREATE TABLE table_282413_3 ( ethnic_group VARCHAR ) ### Res...
Where is bobby jones (a)?
CREATE TABLE table_50184 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" text )
SELECT "Place" FROM table_50184 WHERE "Player" = 'bobby jones (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: Where is bobby jones (a)? ### Input: CREATE TABLE table_50184 ( "Place" text, "Player" text, "Country" text, ...
Find the number of students whose age is younger than the average age and group by students' last name in a bar chart, could you display by the x-axis from high to low?
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) 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 Has_amenity ( dormid...
SELECT LName, COUNT(LName) FROM Student WHERE Age < (SELECT AVG(Age) FROM Student) GROUP BY LName ORDER BY LName 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: Find the number of students whose age is younger than the average age and group by students' last name in a bar chart, could...
What is Goals, when Assists is greater than 28, and when Player is Steve Walker?
CREATE TABLE table_name_89 ( goals VARCHAR, assists VARCHAR, player VARCHAR )
SELECT goals FROM table_name_89 WHERE assists > 28 AND player = "steve walker"
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 Goals, when Assists is greater than 28, and when Player is Steve Walker? ### Input: CREATE TABLE table_name_89 ( ...
What is the average Byes that has Ballarat FL of Sunbury against more than 1167?
CREATE TABLE table_name_70 ( byes INTEGER, ballarat_fl VARCHAR, against VARCHAR )
SELECT AVG(byes) FROM table_name_70 WHERE ballarat_fl = "sunbury" AND against > 1167
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 Byes that has Ballarat FL of Sunbury against more than 1167? ### Input: CREATE TABLE table_name_70 ( ...
Name the gdp world rank for asian rank being 20
CREATE TABLE table_2249029_1 ( gdp_world_rank VARCHAR, asian_rank VARCHAR )
SELECT gdp_world_rank FROM table_2249029_1 WHERE asian_rank = 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: Name the gdp world rank for asian rank being 20 ### Input: CREATE TABLE table_2249029_1 ( gdp_world_rank VARCHAR, as...
List all the MCs with 5 appearances who were inducted in 2007?
CREATE TABLE table_29160596_1 ( top_mc VARCHAR, appearances VARCHAR, year_inducted VARCHAR )
SELECT top_mc FROM table_29160596_1 WHERE appearances = 5 AND year_inducted = 2007
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List all the MCs with 5 appearances who were inducted in 2007? ### Input: CREATE TABLE table_29160596_1 ( top_mc VARCHAR...
what comes after fiskeby if
CREATE TABLE table_204_361 ( id number, "tie no" number, "home team" text, "score" text, "away team" text )
SELECT "home team" FROM table_204_361 WHERE id = (SELECT id FROM table_204_361 WHERE "home team" = 'fiskeby if') + 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 comes after fiskeby if ### Input: CREATE TABLE table_204_361 ( id number, "tie no" number, "home team" text...
since 1 year ago what were the three most frequent medications prescribed during the same hospital visit to the patients of age 40s after they had been diagnosed with alcohol withdrawal?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, su...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 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_...
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 1 year ago what were the three most frequent medications prescribed during the same hospital visit to the patients of ...
For what country does the golfer play who has a score of 72-65=137?
CREATE TABLE table_name_47 ( country VARCHAR, score VARCHAR )
SELECT country FROM table_name_47 WHERE score = 72 - 65 = 137
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 what country does the golfer play who has a score of 72-65=137? ### Input: CREATE TABLE table_name_47 ( country VARC...
When was the runner-up Jane Geddes?
CREATE TABLE table_name_35 ( year VARCHAR, runner_up VARCHAR )
SELECT year FROM table_name_35 WHERE runner_up = "jane geddes"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the runner-up Jane Geddes? ### Input: CREATE TABLE table_name_35 ( year VARCHAR, runner_up VARCHAR ) ### Re...
what is the nationality when the ship is willerby?
CREATE TABLE table_45309 ( "Date" text, "Ship" text, "Type" text, "Nationality" text, "Tonnage GRT" real, "Fate" text )
SELECT "Nationality" FROM table_45309 WHERE "Ship" = 'willerby'
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 nationality when the ship is willerby? ### Input: CREATE TABLE table_45309 ( "Date" text, "Ship" text, ...
What are the examples for the Australian ?
CREATE TABLE table_60037 ( "Letter" text, "American" text, "British" text, "Australian" text, "Examples" text )
SELECT "Examples" FROM table_60037 WHERE "Australian" = 'æ'
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 examples for the Australian ? ### Input: CREATE TABLE table_60037 ( "Letter" text, "American" text, ...
What is the Date with a Leading scorer with maurice williams (25), and a Score with 102 105?
CREATE TABLE table_57891 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Record" text )
SELECT "Date" FROM table_57891 WHERE "Leading scorer" = 'maurice williams (25)' AND "Score" = '102–105'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Date with a Leading scorer with maurice williams (25), and a Score with 102 105? ### Input: CREATE TABLE table_5...
when was patient 030-52395 received an intake for the first time since 03/26/2102.
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate n...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52395')) AND intakeoutput.cellpath LIKE '%intake%...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was patient 030-52395 received an intake for the first time since 03/26/2102. ### Input: CREATE TABLE cost ( costid...
What's the highest capacity for a position of 5 in 2004?
CREATE TABLE table_name_81 ( capacity INTEGER, position_in_2004 VARCHAR )
SELECT MAX(capacity) FROM table_name_81 WHERE position_in_2004 = "5"
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 highest capacity for a position of 5 in 2004? ### Input: CREATE TABLE table_name_81 ( capacity INTEGER, p...
what is discharge time of subject id 6983?
CREATE TABLE procedures ( 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 demographic.dischtime FROM demographic WHERE demographic.subject_id = "6983"
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 discharge time of subject id 6983? ### Input: CREATE TABLE procedures ( subject_id text, hadm_id text, i...
What is the NBA draft for ohio state?
CREATE TABLE table_51428 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
SELECT "NBA Draft" FROM table_51428 WHERE "College" = 'ohio state'
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 NBA draft for ohio state? ### Input: CREATE TABLE table_51428 ( "Player" text, "Height" text, "Schoo...
what country won the same number of bronze as great britain , yet did not win a gold medal ?
CREATE TABLE table_203_206 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT "nation" FROM table_203_206 WHERE "nation" <> 'great britain' AND "bronze" = (SELECT "bronze" FROM table_203_206 WHERE "nation" = 'great britain') AND "gold" = 0
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 country won the same number of bronze as great britain , yet did not win a gold medal ? ### Input: CREATE TABLE table_2...
when was patient 015-96048 last prescribed for tylenol on their last hospital visit?
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 medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-96048' AND NOT patient.hospitaldischargetime IS NULL ORDER...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was patient 015-96048 last prescribed for tylenol on their last hospital visit? ### Input: CREATE TABLE intakeoutput ( ...
What is the incumbent for pennsylvania 15
CREATE TABLE table_1342013_37 ( incumbent VARCHAR, district VARCHAR )
SELECT incumbent FROM table_1342013_37 WHERE district = "Pennsylvania 15"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the incumbent for pennsylvania 15 ### Input: CREATE TABLE table_1342013_37 ( incumbent VARCHAR, district VAR...
At what Venue was the Home team score 17.19 (121)?
CREATE TABLE table_55019 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Venue" FROM table_55019 WHERE "Home team score" = '17.19 (121)'
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: At what Venue was the Home team score 17.19 (121)? ### Input: CREATE TABLE table_55019 ( "Home team" text, "Home tea...
What was the playoff result where the league did not qualify in the Open Cup in 1998?
CREATE TABLE table_2402864_1 ( playoffs VARCHAR, open_cup VARCHAR, year VARCHAR )
SELECT playoffs FROM table_2402864_1 WHERE open_cup = "Did not qualify" AND year = 1998
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 playoff result where the league did not qualify in the Open Cup in 1998? ### Input: CREATE TABLE table_2402864_...
Who was the driver in 1964?
CREATE TABLE table_name_83 ( driver VARCHAR, year VARCHAR )
SELECT driver FROM table_name_83 WHERE year = "1964"
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 driver in 1964? ### Input: CREATE TABLE table_name_83 ( driver VARCHAR, year VARCHAR ) ### Response: SEL...
which is the first church located in los angeles ?
CREATE TABLE table_203_274 ( id number, "church name" text, "address" text, "community" text, "school" text )
SELECT "church name" FROM table_203_274 WHERE "community" = 'los angeles' ORDER BY id 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 is the first church located in los angeles ? ### Input: CREATE TABLE table_203_274 ( id number, "church name" ...
what is the lowest round2 when round5 is 71 and round4 is more than 64?
CREATE TABLE table_8511 ( "Rank" real, "Team" text, "Round1" real, "Round2" real, "Round3" real, "Round4" real, "Round5" real, "Total Points" real )
SELECT MIN("Round2") FROM table_8511 WHERE "Round5" = '71' AND "Round4" > '64'
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 lowest round2 when round5 is 71 and round4 is more than 64? ### Input: CREATE TABLE table_8511 ( "Rank" real...
What was the attendance for the game against miami dolphins?
CREATE TABLE table_66129 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "TV Time" text, "Attendance" text )
SELECT "Attendance" FROM table_66129 WHERE "Opponent" = 'miami dolphins'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance for the game against miami dolphins? ### Input: CREATE TABLE table_66129 ( "Week" real, "Dat...
What was the score of the game on December 11?
CREATE TABLE table_17360840_6 ( score VARCHAR, date VARCHAR )
SELECT score FROM table_17360840_6 WHERE date = "December 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 was the score of the game on December 11? ### Input: CREATE TABLE table_17360840_6 ( score VARCHAR, date VARCHA...
What is the date they played against fitzroy?
CREATE TABLE table_name_10 ( date VARCHAR, away_team VARCHAR )
SELECT date FROM table_name_10 WHERE away_team = "fitzroy"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the date they played against fitzroy? ### Input: CREATE TABLE table_name_10 ( date VARCHAR, away_team VARCHA...
What is the place of the song 'Never Change'?
CREATE TABLE table_40447 ( "Draw" real, "Artist" text, "Song" text, "Result" text, "Place" real )
SELECT SUM("Place") FROM table_40447 WHERE "Song" = 'never change'
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 place of the song 'Never Change'? ### Input: CREATE TABLE table_40447 ( "Draw" real, "Artist" text, ...
For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id, rank in descending by the the number of job id.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID ...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY COUNT(JOB_ID) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the amount of job...
Show the number of companies whose headquarters are not from USA fpr each main industry in a bar chart, show X-axis in ascending order please.
CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) ...
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY Main_Industry
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of companies whose headquarters are not from USA fpr each main industry in a bar chart, show X-axis in ascen...
What song placed higher than#4?
CREATE TABLE table_64035 ( "Draw" real, "Artist" text, "Song" text, "Percentage" text, "Place" real )
SELECT "Song" FROM table_64035 WHERE "Place" > '4'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What song placed higher than#4? ### Input: CREATE TABLE table_64035 ( "Draw" real, "Artist" text, "Song" text, ...
What year was the Beaudesert suburb club founded
CREATE TABLE table_name_95 ( founded VARCHAR, suburb VARCHAR )
SELECT founded FROM table_name_95 WHERE suburb = "beaudesert"
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 year was the Beaudesert suburb club founded ### Input: CREATE TABLE table_name_95 ( founded VARCHAR, suburb VAR...
Visualize a bar chart about the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by weekday.
CREATE TABLE Ref_Detention_Type ( detention_type_code VARCHAR(10), detention_type_description VARCHAR(80) ) CREATE TABLE Detention ( detention_id INTEGER, detention_type_code VARCHAR(10), teacher_id INTEGER, datetime_detention_start DATETIME, datetime_detention_end DATETIME, detention_s...
SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental 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: Visualize a bar chart about the distribution of date_address_to and the amount of date_address_to , and group by attribute o...
How was the player in the position of Center acquired?
CREATE TABLE table_41725 ( "Name" text, "Position" text, "Number" real, "School/Club Team" text, "Season" text, "Acquisition via" text )
SELECT "Acquisition via" FROM table_41725 WHERE "Position" = 'center'
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 was the player in the position of Center acquired? ### Input: CREATE TABLE table_41725 ( "Name" text, "Position"...
Catalog Nebdj068 was released when?
CREATE TABLE table_39879 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text )
SELECT "Date" FROM table_39879 WHERE "Catalog" = 'nebdj068'
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: Catalog Nebdj068 was released when? ### Input: CREATE TABLE table_39879 ( "Region" text, "Date" text, "Label" te...
What is average age for different job title Visualize by bar chart, I want to rank by the bars from low to high.
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY job
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is average age for different job title Visualize by bar chart, I want to rank by the bars from low to high. ### Input: ...
What was the To par score for the tournament with a margin of victory of 1 stroke?
CREATE TABLE table_40653 ( "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "To par" FROM table_40653 WHERE "Margin of victory" = '1 stroke'
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 To par score for the tournament with a margin of victory of 1 stroke? ### Input: CREATE TABLE table_40653 ( ...
On what date did the Brisbane Lions (1) win?
CREATE TABLE table_56418 ( "Season" text, "Cup FinalDate" text, "WinningTeam" text, "Score" text, "LosingTeam" text, "Cup Final Attendance" text )
SELECT "Cup FinalDate" FROM table_56418 WHERE "WinningTeam" = 'brisbane lions (1)'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date did the Brisbane Lions (1) win? ### Input: CREATE TABLE table_56418 ( "Season" text, "Cup FinalDate" te...
What is the winning span for the name of bernard gallacher?
CREATE TABLE table_23078 ( "Rank" text, "Name" text, "Lifespan" text, "Country" text, "Wins" real, "Majors" real, "Winning span" text, "Span (years)" real )
SELECT "Winning span" FROM table_23078 WHERE "Name" = 'Bernard Gallacher'
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 winning span for the name of bernard gallacher? ### Input: CREATE TABLE table_23078 ( "Rank" text, "Name...
count the number of patients whose ethnicity is black/african american and year of birth is less than 2076?
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.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2076"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose ethnicity is black/african american and year of birth is less than 2076? ### Input: CREAT...
What is every year where opponent in the final is John Mcenroe at Wimbledon?
CREATE TABLE table_23235767_1 ( year VARCHAR, opponent_in_the_final VARCHAR, championship VARCHAR )
SELECT year FROM table_23235767_1 WHERE opponent_in_the_final = "John McEnroe" AND championship = "Wimbledon"
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 year where opponent in the final is John Mcenroe at Wimbledon? ### Input: CREATE TABLE table_23235767_1 ( ...
What was the home team for the game with more than 25,000 crowd?
CREATE TABLE table_33727 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Home team" FROM table_33727 WHERE "Crowd" > '25,000'
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 home team for the game with more than 25,000 crowd? ### Input: CREATE TABLE table_33727 ( "Home team" text,...
What's the performance of Dire Tune?
CREATE TABLE table_name_89 ( performance VARCHAR, athlete VARCHAR )
SELECT performance FROM table_name_89 WHERE athlete = "dire tune"
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 performance of Dire Tune? ### Input: CREATE TABLE table_name_89 ( performance VARCHAR, athlete VARCHAR ) ...
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of last_name and salary , show in descending by the X.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT LAST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about t...
What circuit had rnd 3?
CREATE TABLE table_26503 ( "Rnd" real, "Circuit" text, "LMP Winning Team" text, "LMPC Winning Team" text, "GT Winning Team" text, "GTC Winning Team" text, "Results" text )
SELECT "Circuit" FROM table_26503 WHERE "Rnd" = '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 circuit had rnd 3? ### Input: CREATE TABLE table_26503 ( "Rnd" real, "Circuit" text, "LMP Winning Team" tex...
Which date released had a Democratic Alternative value of 1% and Labour of 34%?
CREATE TABLE table_66678 ( "Date(s) Released" text, "Polling institute" text, "Nationalist" text, "Labour" text, "Democratic Alternative" text, "Undecided/ No answer" text, "Lead" text )
SELECT "Date(s) Released" FROM table_66678 WHERE "Democratic Alternative" = '1%' AND "Labour" = '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: Which date released had a Democratic Alternative value of 1% and Labour of 34%? ### Input: CREATE TABLE table_66678 ( "D...
What was the score in the match against Kim Tiilikainen?
CREATE TABLE table_68453 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
SELECT "Score" FROM table_68453 WHERE "Opponent" = 'kim tiilikainen'
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 in the match against Kim Tiilikainen? ### Input: CREATE TABLE table_68453 ( "Date" text, "Tournam...
What is the wattage/TDP associated with model name 4x0?
CREATE TABLE table_26575 ( "Processor" text, "Brand name" text, "Model (list)" text, "Cores" real, "L2 Cache" text, "Socket" text, "TDP" text )
SELECT "TDP" FROM table_26575 WHERE "Model (list)" = '4x0'
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 wattage/TDP associated with model name 4x0? ### Input: CREATE TABLE table_26575 ( "Processor" text, "Bra...
Name a music director, belonging to a year after 2003?
CREATE TABLE table_name_86 ( music_director VARCHAR, year INTEGER )
SELECT music_director FROM table_name_86 WHERE year > 2003
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 a music director, belonging to a year after 2003? ### Input: CREATE TABLE table_name_86 ( music_director VARCHAR, ...
Find the average age of students living in each city with a bar chart.
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Student ( StuID INTEGE...
SELECT city_code, AVG(Age) FROM Student GROUP BY city_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: Find the average age of students living in each city with a bar chart. ### Input: CREATE TABLE Lives_in ( stuid INTEGER,...
What are the reigns and days held of all wrestlers?
CREATE TABLE elimination ( elimination_id text, wrestler_id text, team text, eliminated_by text, elimination_move text, time text ) CREATE TABLE wrestler ( wrestler_id number, name text, reign text, days_held text, location text, event text )
SELECT reign, days_held FROM wrestler
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 reigns and days held of all wrestlers? ### Input: CREATE TABLE elimination ( elimination_id text, wrest...
what was the first drug that was prescribed to patient 030-56105 through im route in 03/last year?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, ...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-56105')) AND medication.routeadmin = 'im' AND DATETIME(medicati...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the first drug that was prescribed to patient 030-56105 through im route in 03/last year? ### Input: CREATE TABLE i...
how many days has passed since patient 14671 had a creatinine laboratory test for the last time in the current hospital encounter?
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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime t...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'creatinine') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671 AND admissio...
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 many days has passed since patient 14671 had a creatinine laboratory test for the last time in the current hospital enco...
what was the prescription drug that patient 27172 had received two or more times in 10/this year?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icust...
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 ye...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the prescription drug that patient 27172 had received two or more times in 10/this year? ### Input: CREATE TABLE la...
What is the verb meaning for Saugen in part 1?
CREATE TABLE table_44583 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
SELECT "Verb meaning" FROM table_44583 WHERE "Part 1" = 'saugen'
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 verb meaning for Saugen in part 1? ### Input: CREATE TABLE table_44583 ( "Class" text, "Part 1" text, ...
What date did the away team Mansfield Town play?
CREATE TABLE table_name_56 ( date VARCHAR, away_team VARCHAR )
SELECT date FROM table_name_56 WHERE away_team = "mansfield town"
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 did the away team Mansfield Town play? ### Input: CREATE TABLE table_name_56 ( date VARCHAR, away_team VAR...
count the number of patients who were diagnosed with valvular stenosis - aortic but did not come back to hospital within 2 months until 1 year ago.
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'valvular stenosis - aortic' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 ye...
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: count the number of patients who were diagnosed with valvular stenosis - aortic but did not come back to hospital within 2 m...
When was the team, whose captain is Matt Smith, founded?
CREATE TABLE table_17914 ( "Team" text, "Location" text, "Stadium" text, "Founded" real, "Joined" real, "Head Coach" text, "Captain" text )
SELECT "Founded" FROM table_17914 WHERE "Captain" = 'Matt Smith'
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 was the team, whose captain is Matt Smith, founded? ### Input: CREATE TABLE table_17914 ( "Team" text, "Locatio...
List the physicians' employee ids together with their primary affiliation departments' ids. Plot them as scatter chart.
CREATE TABLE Room ( RoomNumber INTEGER, RoomType VARCHAR(30), BlockFloor INTEGER, BlockCode INTEGER, Unavailable BOOLEAN ) CREATE TABLE Affiliated_With ( Physician INTEGER, Department INTEGER, PrimaryAffiliation BOOLEAN ) CREATE TABLE Appointment ( AppointmentID INTEGER, Patien...
SELECT Physician, Department FROM Affiliated_With WHERE PrimaryAffiliation = 1
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 physicians' employee ids together with their primary affiliation departments' ids. Plot them as scatter chart. ### ...
What is the lowest number of three pointers in games where the number of rebounds was 178?
CREATE TABLE table_22824324_2 ( three_pointers INTEGER, rebounds VARCHAR )
SELECT MIN(three_pointers) FROM table_22824324_2 WHERE rebounds = 178
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest number of three pointers in games where the number of rebounds was 178? ### Input: CREATE TABLE table_228...
What is the grand slam in 1987, when round shows first round, and Ivan Lendl won?
CREATE TABLE table_62130 ( "Year" real, "Grand Slam" text, "Round" text, "Winner" text, "Loser" text )
SELECT "Grand Slam" FROM table_62130 WHERE "Year" = '1987' AND "Round" = 'first round' AND "Winner" = 'ivan lendl'
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 grand slam in 1987, when round shows first round, and Ivan Lendl won? ### Input: CREATE TABLE table_62130 ( ...
How many faculty is there in total in the year of 2002?
CREATE TABLE faculty ( faculty INTEGER, YEAR VARCHAR )
SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002
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 faculty is there in total in the year of 2002? ### Input: CREATE TABLE faculty ( faculty INTEGER, YEAR VARC...
What is the traffic direction of 70th street?
CREATE TABLE table_56945 ( "Street" text, "West" text, "East" text, "# of lanes" text, "Traffic direction" text )
SELECT "Traffic direction" FROM table_56945 WHERE "Street" = '70th street'
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 traffic direction of 70th street? ### Input: CREATE TABLE table_56945 ( "Street" text, "West" text, ...