instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
when was his last competition ? | CREATE TABLE table_203_238 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | SELECT "year" FROM table_203_238 ORDER BY "year" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was his last competition ? ### Input: CREATE TABLE table_203_238 (
id number,
"year" number,
"competition" ... |
For the attribute Team_Name and ACC_Percent, show their proportion by a pie chart. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT Team_Name, ACC_Percent FROM basketball_match | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the attribute Team_Name and ACC_Percent, show their proportion by a pie chart. ### Input: CREATE TABLE university (
... |
On what date was their record 46-39? | CREATE TABLE table_5592 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Date" FROM table_5592 WHERE "Record" = '46-39' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what date was their record 46-39? ### Input: CREATE TABLE table_5592 (
"Date" text,
"Opponent" text,
"Score" ... |
HOW MANY YEARS DID MENS DOUBLES PLAYER HEIKI SORGE MEELIS MAISTE PLAY? | CREATE TABLE table_14903627_1 (
year VARCHAR,
mens_doubles VARCHAR
) | SELECT COUNT(year) FROM table_14903627_1 WHERE mens_doubles = "Heiki Sorge Meelis Maiste" | 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 YEARS DID MENS DOUBLES PLAYER HEIKI SORGE MEELIS MAISTE PLAY? ### Input: CREATE TABLE table_14903627_1 (
year V... |
What's the team of the player from St. Francis Xavier College? | CREATE TABLE table_16318 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "CFL Team" FROM table_16318 WHERE "College" = 'St. Francis Xavier' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the team of the player from St. Francis Xavier College? ### Input: CREATE TABLE table_16318 (
"Pick #" real,
... |
What was the score for the game when the record was 37-27? | CREATE TABLE table_2855 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Score" FROM table_2855 WHERE "Record" = '37-27' | 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 for the game when the record was 37-27? ### Input: CREATE TABLE table_2855 (
"Game" real,
"Date" ... |
Top users by the number of times they earned 200/day. This query finds the top users by the number of times they've earned 200/day, and gives indication about the progress towards Epic and Legendary badges.
Think of it as the number of times Mortarboard badge could have been earned | CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE ReviewTaskResults (
Id number,
Review... | SELECT Id AS "user_link", (SELECT COUNT(TotalRep) FROM (SELECT SUM(CASE Votes.VoteTypeId WHEN 1 THEN 15 WHEN 2 THEN 10 WHEN 9 THEN BountyAmount END) AS TotalRep, Votes.CreationDate AS CreationDate FROM Posts INNER JOIN Votes ON Votes.PostId = Posts.Id WHERE Posts.OwnerUserId = U.Id AND Posts.CommunityOwnedDate IS NULL ... | 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 users by the number of times they earned 200/day. This query finds the top users by the number of times they've earned 2... |
Name the number of v core for model number mobile athlon 64 3000+ | CREATE TABLE table_29399 (
"Model Number" text,
"Frequency" text,
"L2 Cache" text,
"HT" text,
"Mult. 1" text,
"V Core" text,
"TDP" text,
"Socket" text,
"Release Date" text,
"Part Number(s)" text
) | SELECT COUNT("V Core") FROM table_29399 WHERE "Model Number" = 'Mobile Athlon 64 3000+' | 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 number of v core for model number mobile athlon 64 3000+ ### Input: CREATE TABLE table_29399 (
"Model Number" t... |
What is the 7th runner-up of the country with a 10th runner-up greater than 0, a 9th runner-up greater than 0, and an 8th runner-up greater than 1? | CREATE TABLE table_75070 (
"Rank" real,
"Country/Territory" text,
"Nuestra Belleza Latina" real,
"1st runner-up" real,
"2nd runner-up" real,
"3rd runner-up" real,
"4th runner-up" real,
"5th runner-up" real,
"6th runner-up" real,
"7th runner-up" real,
"8th runner-up" real,
... | SELECT SUM("7th runner-up") FROM table_75070 WHERE "10th runner-up" > '0' AND "9th runner-up" > '0' AND "8th runner-up" > '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: What is the 7th runner-up of the country with a 10th runner-up greater than 0, a 9th runner-up greater than 0, and an 8th ru... |
count the number of patients whose insurance is private and year of birth is less than 1887? | 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 WHERE demographic.insurance = "Private" AND demographic.dob_year < "1887" | 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 insurance is private and year of birth is less than 1887? ### Input: CREATE TABLE diagnos... |
Where is the City of Douala? | CREATE TABLE table_name_59 (
country VARCHAR,
city VARCHAR
) | SELECT country FROM table_name_59 WHERE city = "douala" | 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 is the City of Douala? ### Input: CREATE TABLE table_name_59 (
country VARCHAR,
city VARCHAR
) ### Response: S... |
Which heat and lane was in rank of 22? | CREATE TABLE table_4612 (
"Rank" real,
"Heat (Lane)" text,
"Name" text,
"Nationality" text,
"Time" text
) | SELECT "Heat (Lane)" FROM table_4612 WHERE "Rank" = '22' | 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 heat and lane was in rank of 22? ### Input: CREATE TABLE table_4612 (
"Rank" real,
"Heat (Lane)" text,
"Na... |
Which sum of # 100 has a Season of 1990, and an Against of warwickshire? | CREATE TABLE table_5482 (
"# 100" real,
"Season" text,
"Playing For" text,
"Against" text,
"Score" text
) | SELECT SUM("# 100") FROM table_5482 WHERE "Season" = '1990' AND "Against" = 'warwickshire' | 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 sum of # 100 has a Season of 1990, and an Against of warwickshire? ### Input: CREATE TABLE table_5482 (
"# 100" re... |
On what date was the record set with a time of 1:07.18? | CREATE TABLE table_49190 (
"Event" text,
"Time" text,
"Name" text,
"Nation" text,
"Games" text,
"Date" text
) | SELECT "Date" FROM table_49190 WHERE "Time" = '1:07.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: On what date was the record set with a time of 1:07.18? ### Input: CREATE TABLE table_49190 (
"Event" text,
"Time" t... |
When was the mcdonald's lpga championship? | CREATE TABLE table_17335602_1 (
date VARCHAR,
tournament VARCHAR
) | SELECT date FROM table_17335602_1 WHERE tournament = "McDonald's LPGA Championship" | 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 mcdonald's lpga championship? ### Input: CREATE TABLE table_17335602_1 (
date VARCHAR,
tournament VARCH... |
popular db access programming languages. | CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Descr... | SELECT COUNT(DISTINCT P.Id) AS num_questions, t_dbname.TagName FROM Posts AS P INNER JOIN PostTags AS pt ON pt.PostId = P.Id INNER JOIN Tags AS t_lang ON t_lang.Id = pt.TagId INNER JOIN PostTags AS pt_db ON pt_db.PostId = P.Id INNER JOIN Tags AS t_dbname ON t_dbname.Id = pt_db.TagId WHERE t_lang.TagName IN ('c++', 'jav... | 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: popular db access programming languages. ### Input: CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
Po... |
What is Appearances, when Postion [F ] is 'Defender', and when Date to [H ] is '1938'? | CREATE TABLE table_9522 (
"Name" text,
"Nationality" text,
"Position [F ]" text,
"Date from [G ]" text,
"Date to [H ]" text,
"Appearances" real,
"Goals" real,
"Club source [I ]" text
) | SELECT "Appearances" FROM table_9522 WHERE "Position [F ]" = 'defender' AND "Date to [H ]" = '1938' | 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 Appearances, when Postion [F ] is 'Defender', and when Date to [H ] is '1938'? ### Input: CREATE TABLE table_9522 (
... |
What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010. | CREATE TABLE table_name_51 (
meg_whitman__r_ VARCHAR,
date_s__administered VARCHAR
) | SELECT meg_whitman__r_ FROM table_name_51 WHERE date_s__administered = "october 21, 2010" | 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 percent of the vote went to Meg Whitman in the poll taken on October 21, 2010. ### Input: CREATE TABLE table_name_51 (
... |
how many towns or villages have a population of at least 5 but less than 10 ? | CREATE TABLE table_203_568 (
id number,
"town/village" text,
"population" number,
"postal code" text,
"municipality" text,
"island" text,
"location" text
) | SELECT COUNT("town/village") FROM table_203_568 WHERE "population" >= 5 AND "population" < 10 | 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 towns or villages have a population of at least 5 but less than 10 ? ### Input: CREATE TABLE table_203_568 (
id... |
What is the original air date for episode 4? | CREATE TABLE table_23399481_3 (
original_air_date VARCHAR,
season__number VARCHAR
) | SELECT original_air_date FROM table_23399481_3 WHERE season__number = 4 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the original air date for episode 4? ### Input: CREATE TABLE table_23399481_3 (
original_air_date VARCHAR,
s... |
Which Drobo (2nd) has a Drobo S (2nd) of 5? | CREATE TABLE table_11041 (
"Drobo (1st)" text,
"Drobo (2nd)" text,
"Drobo S" text,
"Drobo S (2nd)" text,
"Drobo FS" text,
"Drobo Mini" text,
"Drobo 5D" text
) | SELECT "Drobo (2nd)" FROM table_11041 WHERE "Drobo S (2nd)" = '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: Which Drobo (2nd) has a Drobo S (2nd) of 5? ### Input: CREATE TABLE table_11041 (
"Drobo (1st)" text,
"Drobo (2nd)" ... |
What is the lowest Hong Kong value with a 0 Brisbane value and a greater than 0 Kuala Lumpur value? | CREATE TABLE table_name_52 (
hong_kong INTEGER,
brisbane VARCHAR,
kuala_lumpur VARCHAR
) | SELECT MIN(hong_kong) FROM table_name_52 WHERE brisbane = 0 AND kuala_lumpur > 0 | 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 Hong Kong value with a 0 Brisbane value and a greater than 0 Kuala Lumpur value? ### Input: CREATE TABLE ... |
What is the nickname of the school with an enrollment of 2386? | CREATE TABLE table_11658094_3 (
nickname VARCHAR,
enrollment VARCHAR
) | SELECT nickname FROM table_11658094_3 WHERE enrollment = 2386 | 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 nickname of the school with an enrollment of 2386? ### Input: CREATE TABLE table_11658094_3 (
nickname VARCH... |
was there any medicine prescribed since 176 months ago for patient 021-141335? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medi... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-141335')) AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_T... | 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: was there any medicine prescribed since 176 months ago for patient 021-141335? ### Input: CREATE TABLE vitalperiodic (
v... |
Find the name of the ship that is steered by the youngest captain. | CREATE TABLE ship (
ship_id number,
name text,
type text,
built_year number,
class text,
flag text
)
CREATE TABLE captain (
captain_id number,
name text,
ship_id number,
age text,
class text,
rank text
) | SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age 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: Find the name of the ship that is steered by the youngest captain. ### Input: CREATE TABLE ship (
ship_id number,
na... |
Get Most Viewed For Tag. | CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId nu... | SELECT * FROM (SELECT p.*, ViewCount / DATEDIFF(dd, CreationDate, GETUTCDATE()) AS ViewRate FROM Tags AS t JOIN PostTags AS pt ON t.Id = pt.TagId JOIN Posts AS p ON pt.PostId = p.Id WHERE t.TagName = 'microsoftgraph') AS tmp ORDER BY ViewRate DESC | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Get Most Viewed For Tag. ### Input: CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
... |
how many hours has it been since the last time carvedilol 6.25 mg po tabs was prescribed to patient 010-16572 in the current hospital encounter? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '010-16... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many hours has it been since the last time carvedilol 6.25 mg po tabs was prescribed to patient 010-16572 in the current... |
who has the most bronze medals ? | CREATE TABLE table_203_374 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "nation" FROM table_203_374 ORDER BY "bronze" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who has the most bronze medals ? ### Input: CREATE TABLE table_203_374 (
id number,
"rank" number,
"nation" text... |
What provinces were formed from New Munster? | CREATE TABLE table_275023_1 (
province VARCHAR,
formed_from VARCHAR
) | SELECT province FROM table_275023_1 WHERE formed_from = "New Munster" | 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 provinces were formed from New Munster? ### Input: CREATE TABLE table_275023_1 (
province VARCHAR,
formed_from ... |
Who was the team guest captain for episode 2? | CREATE TABLE table_25816476_2 (
team_guest_captain VARCHAR,
episode VARCHAR
) | SELECT team_guest_captain FROM table_25816476_2 WHERE episode = 2 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the team guest captain for episode 2? ### Input: CREATE TABLE table_25816476_2 (
team_guest_captain VARCHAR,
... |
has patient 006-50099 been prescribed furosemide 80 mg po tabs until 13 months ago. | 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 COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-50099')) AND medication.drugname = 'furosemide 80 mg po tabs' AND DATE... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has patient 006-50099 been prescribed furosemide 80 mg po tabs until 13 months ago. ### Input: CREATE TABLE cost (
costi... |
provide the number of patients whose insurance is medicaid and procedure long title is combined right and left heart angiocardiography? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | 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 = "Combined right and left heart angiocardiography" | 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 insurance is medicaid and procedure long title is combined right and left heart angioca... |
Show the account id and the number of transactions for each accoun. Show scatter chart. | CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
c... | SELECT account_id, COUNT(*) FROM Financial_Transactions GROUP BY account_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: Show the account id and the number of transactions for each accoun. Show scatter chart. ### Input: CREATE TABLE Customers (
... |
For each state, when was the last time the average score data was collected? | CREATE TABLE finrev_fed_17 (
state_code number,
idcensus number,
school_district text,
nces_id text,
yr_data number,
t_fed_rev number,
c14 number,
c25 number
)
CREATE TABLE finrev_fed_key_17 (
state_code number,
state text,
#_records text
)
CREATE TABLE ndecoreexcel_math_gr... | SELECT state, MAX(year) FROM ndecoreexcel_math_grade8 GROUP BY state | studentmathscore | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each state, when was the last time the average score data was collected? ### Input: CREATE TABLE finrev_fed_17 (
sta... |
What is the Record of the game with an Attendance of more than 16,124 and a Score of 6 3? | CREATE TABLE table_79632 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text,
"Arena" text,
"Points" real
) | SELECT "Record" FROM table_79632 WHERE "Attendance" > '16,124' AND "Score" = '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: What is the Record of the game with an Attendance of more than 16,124 and a Score of 6 3? ### Input: CREATE TABLE table_7963... |
What are the former counties of the Great Grimsby district? | CREATE TABLE table_30216 (
"District" text,
"Status" text,
"Date abolished" text,
"Former county" text,
"Successor" text
) | SELECT "Former county" FROM table_30216 WHERE "District" = 'Great Grimsby' | 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 former counties of the Great Grimsby district? ### Input: CREATE TABLE table_30216 (
"District" text,
"... |
provide the number of patients whose insurance is government and procedure short title is open reduc-int fix femur? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Open reduc-int fix femur" | 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 insurance is government and procedure short title is open reduc-int fix femur? ### Inpu... |
What Elector was Elevated on December 18, 1182? | CREATE TABLE table_78928 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
) | SELECT "Elector" FROM table_78928 WHERE "Elevated" = 'december 18, 1182' | 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 Elector was Elevated on December 18, 1182? ### Input: CREATE TABLE table_78928 (
"Elector" text,
"Place of birt... |
When sweden is the country what is the highest production in 2010 (1,000 ton)? | CREATE TABLE table_31108 (
"Rank 2011" real,
"Country" text,
"Production in 2011 (1,000 ton)" real,
"Share 2011" text,
"Rank 2010" real,
"Production in 2010 (1,000 ton)" real
) | SELECT MAX("Production in 2010 (1,000 ton)") FROM table_31108 WHERE "Country" = 'Sweden' | 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 sweden is the country what is the highest production in 2010 (1,000 ton)? ### Input: CREATE TABLE table_31108 (
"Ra... |
What is the oldest year that the Royal Philharmonic Orchestra released a record with Decca Records? | CREATE TABLE table_name_63 (
year_of_recording INTEGER,
orchestra VARCHAR,
record_company VARCHAR
) | SELECT MIN(year_of_recording) FROM table_name_63 WHERE orchestra = "royal philharmonic orchestra" AND record_company = "decca records" | 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 oldest year that the Royal Philharmonic Orchestra released a record with Decca Records? ### Input: CREATE TABLE ... |
Among the patients born before the year 2056, how many of them had the lab test for other body fluid? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2056" 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: Among the patients born before the year 2056, how many of them had the lab test for other body fluid? ### Input: CREATE TABL... |
How many counties have a population of 2266? | CREATE TABLE table_25348 (
"County" text,
"Population" real,
"Unemployment Rate" text,
"Market Income Per Capita" text,
"Poverty Rate" text,
"Status" text
) | SELECT COUNT("County") FROM table_25348 WHERE "Population" = '2266' | 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 counties have a population of 2266? ### Input: CREATE TABLE table_25348 (
"County" text,
"Population" real,... |
patient 030-34260 has received a diagnosis in their current hospital encounter? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-34260' AND patient.hospitaldischargetime IS NULL)) | 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: patient 030-34260 has received a diagnosis in their current hospital encounter? ### Input: CREATE TABLE treatment (
trea... |
for the first time in 03/this year, what was the drug that patient 40116 was prescribed via iv bolus route? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40116) AND prescriptions.route = 'iv bolus' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m'... | 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: for the first time in 03/this year, what was the drug that patient 40116 was prescribed via iv bolus route? ### Input: CREAT... |
What venue had an away team of south melbourne? | CREATE TABLE table_11166 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_11166 WHERE "Away team" = 'south melbourne' | 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 venue had an away team of south melbourne? ### Input: CREATE TABLE table_11166 (
"Home team" text,
"Home team s... |
What was the most recent year the venue was Barcelona, Spain? | CREATE TABLE table_7804 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Event" text
) | SELECT MAX("Year") FROM table_7804 WHERE "Venue" = 'barcelona, spain' | 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 most recent year the venue was Barcelona, Spain? ### Input: CREATE TABLE table_7804 (
"Year" real,
"Tou... |
For all employees in the Finance department, compare the total number of different job id using a bar chart, and could you list by the bar in descending? | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T2.DEPARTMENT_NAME = 'Finance' GROUP BY JOB_ID ORDER BY 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 all employees in the Finance department, compare the total number of different job id using a bar chart, and could you l... |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of price , and group by attribute name, show in desc by the y axis. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum ... |
What was 1961's qual? | CREATE TABLE table_45152 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | SELECT "Qual" FROM table_45152 WHERE "Year" = '1961' | 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 1961's qual? ### Input: CREATE TABLE table_45152 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" t... |
Name the english name for orach, zarev | CREATE TABLE table_19975 (
"No." real,
"English name" text,
"Bulgarian name" text,
"Bulgarian name ( Transliteration )" text,
"Old Bulgarian Names" text,
"Old Bulgarian name (Transliteration)" text,
"Old Bulgarian name - Meaning" text
) | SELECT "English name" FROM table_19975 WHERE "Old Bulgarian name (Transliteration)" = 'Orach, Zarev' | 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 english name for orach, zarev ### Input: CREATE TABLE table_19975 (
"No." real,
"English name" text,
"B... |
what are the three most frequent drugs that were prescribed within 2 months to the patients aged 20s after having been diagnosed with nb obsrv suspct infect, until 2 years ago? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
value... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... | 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 frequent drugs that were prescribed within 2 months to the patients aged 20s after having been diagn... |
What is the average year of the games with the date December 26? | CREATE TABLE table_name_84 (
year INTEGER,
date VARCHAR
) | SELECT AVG(year) FROM table_name_84 WHERE date = "december 26" | 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 year of the games with the date December 26? ### Input: CREATE TABLE table_name_84 (
year INTEGER,
... |
Display a bar chart for what is the total revenue of companies started by founder?, and could you list in asc by the total number of revenue? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT Founder, SUM(Revenue) FROM Manufacturers GROUP BY Founder ORDER BY SUM(Revenue) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Display a bar chart for what is the total revenue of companies started by founder?, and could you list in asc by the total n... |
what are the top five most common procedures in 2102? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE icustays (
row_id number,
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE STRFTIME('%y', procedures_icd.charttime) = '2102' GROUP BY procedures_icd.icd9_code) AS t1 ... | 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 top five most common procedures in 2102? ### Input: CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_... |
Which Game has a Score of 122 125? | CREATE TABLE table_name_74 (
game VARCHAR,
score VARCHAR
) | SELECT game FROM table_name_74 WHERE score = "122–125" | 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 Game has a Score of 122 125? ### Input: CREATE TABLE table_name_74 (
game VARCHAR,
score VARCHAR
) ### Respons... |
Who is the rookie goalkeeper Rob Scherr who played before week 6? | CREATE TABLE table_6044 (
"Month" text,
"Week" real,
"Offensive" text,
"Defensive" text,
"Goalkeeper" text,
"Rookie" text
) | SELECT "Rookie" FROM table_6044 WHERE "Goalkeeper" = 'rob scherr' AND "Week" < '6' | 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 rookie goalkeeper Rob Scherr who played before week 6? ### Input: CREATE TABLE table_6044 (
"Month" text,
... |
what is the nme of the song performed by billy vaughn? | CREATE TABLE table_72488 (
"Position" real,
"Artist" text,
"Song title" text,
"Highest position" real,
"Points" real
) | SELECT "Song title" FROM table_72488 WHERE "Artist" = 'Billy Vaughn' | 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 nme of the song performed by billy vaughn? ### Input: CREATE TABLE table_72488 (
"Position" real,
"Artis... |
how many of the patients belonging to asian ethnic origin were unmarried? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "ASIAN" | 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 of the patients belonging to asian ethnic origin were unmarried? ### Input: CREATE TABLE lab (
subject_id text,... |
Name the name of 36.0n | CREATE TABLE table_16799784_2 (
name VARCHAR,
latitude VARCHAR
) | SELECT name FROM table_16799784_2 WHERE latitude = "36.0N" | 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 name of 36.0n ### Input: CREATE TABLE table_16799784_2 (
name VARCHAR,
latitude VARCHAR
) ### Response: SEL... |
What is the top league that pays the most to their players? | CREATE TABLE hall_of_fame (
player_id text,
yearid number,
votedby text,
ballots text,
needed text,
votes text,
inducted text,
category text,
needed_note text
)
CREATE TABLE player_award (
player_id text,
award_id text,
year number,
league_id text,
tie text,
... | SELECT league_id FROM salary GROUP BY league_id ORDER BY SUM(salary) DESC LIMIT 1 | thehistoryofbaseball | Below are sql tables 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 top league that pays the most to their players? ### Input: CREATE TABLE hall_of_fame (
player_id text,
y... |
how many of the patients aged below 31 were treated with sodium fluoride (dental gel)? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "31" AND prescriptions.drug = "Sodium Fluoride (Dental Gel)" | 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 of the patients aged below 31 were treated with sodium fluoride (dental gel)? ### Input: CREATE TABLE diagnoses (
... |
With the pick of 1 Cecil Martin has what number as the overall? | CREATE TABLE table_name_38 (
overall VARCHAR,
pick VARCHAR,
name VARCHAR
) | SELECT COUNT(overall) FROM table_name_38 WHERE pick = 1 AND name = "cecil martin" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: With the pick of 1 Cecil Martin has what number as the overall? ### Input: CREATE TABLE table_name_38 (
overall VARCHAR,... |
get me patient 6215's yearly maximum weight until 09/2103. | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT MAX(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 = 6215)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit... | 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: get me patient 6215's yearly maximum weight until 09/2103. ### Input: CREATE TABLE admissions (
row_id number,
subje... |
What is the number of patients admitted before 2184 who had overdose as their primary disease? | 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.diagnosis = "OVERDOSE" AND demographic.admityear < "2184" | 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 admitted before 2184 who had overdose as their primary disease? ### Input: CREATE TABLE demog... |
What Player is from Argentina and whose position is a guard-forward? | CREATE TABLE table_4316 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Toronto" text,
"School/Club Team" text
) | SELECT "Player" FROM table_4316 WHERE "Position" = 'guard-forward' AND "Nationality" = 'argentina' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Player is from Argentina and whose position is a guard-forward? ### Input: CREATE TABLE table_4316 (
"Player" text,... |
What is Competition, when Date is 30 December 2005? | CREATE TABLE table_name_96 (
competition VARCHAR,
date VARCHAR
) | SELECT competition FROM table_name_96 WHERE date = "30 december 2005" | 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 Competition, when Date is 30 December 2005? ### Input: CREATE TABLE table_name_96 (
competition VARCHAR,
dat... |
What is the most recent year georgia tech chose a linebacker? | CREATE TABLE table_47686 (
"Year [A ]" real,
"Pick" text,
"Player" text,
"Position" text,
"College" text
) | SELECT MAX("Year [A ]") FROM table_47686 WHERE "Position" = 'linebacker' AND "College" = 'georgia tech' | 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 most recent year georgia tech chose a linebacker? ### Input: CREATE TABLE table_47686 (
"Year [A ]" real,
... |
How many different products are produced in each headquarter city Visualize by bar chart, sort in ascending by the y axis. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many different products are produced in each headquarter city Visualize by bar chart, sort in ascending by the y axis. #... |
Which Player had a From club of atl tico madrid? | CREATE TABLE table_6762 (
"Date" text,
"Pos." text,
"Player" text,
"From club" text,
"Transfer fee" text
) | SELECT "Player" FROM table_6762 WHERE "From club" = 'atlético madrid' | 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 Player had a From club of atl tico madrid? ### Input: CREATE TABLE table_6762 (
"Date" text,
"Pos." text,
... |
Who were the batting partners in Colombo? | CREATE TABLE table_45683 (
"Wicket" text,
"Runs" text,
"Batting partners" text,
"Batting team" text,
"Fielding team" text,
"Venue" text,
"Season" text
) | SELECT "Batting partners" FROM table_45683 WHERE "Venue" = 'colombo' | 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 were the batting partners in Colombo? ### Input: CREATE TABLE table_45683 (
"Wicket" text,
"Runs" text,
"Bat... |
Who was the Opponent on a Hard (i) Surface? | CREATE TABLE table_35324 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Opponent" FROM table_35324 WHERE "Surface" = 'hard (i)' | 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 Opponent on a Hard (i) Surface? ### Input: CREATE TABLE table_35324 (
"Date" text,
"Tournament" text,
... |
What is the age group for figure skating? | CREATE TABLE table_68955 (
"Sport" text,
"Competition name" text,
"Competing entities" text,
"Age groups" text,
"Held every" text
) | SELECT "Age groups" FROM table_68955 WHERE "Sport" = 'figure skating' | 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 age group for figure skating? ### Input: CREATE TABLE table_68955 (
"Sport" text,
"Competition name" tex... |
With a To par of 1, what is Player Henrik Stenson's Score? | CREATE TABLE table_60674 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Score" FROM table_60674 WHERE "To par" = '–1' AND "Player" = 'henrik stenson' | 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: With a To par of 1, what is Player Henrik Stenson's Score? ### Input: CREATE TABLE table_60674 (
"Place" text,
"Play... |
What is every state and District of Columbia with 60.0% overweight or obese adults? | CREATE TABLE table_22730 (
"State and District of Columbia" text,
"Obese adults" text,
"Overweight (incl. obese) adults" text,
"Obese children and adolescents" text,
"Obesity rank" real
) | SELECT "State and District of Columbia" FROM table_22730 WHERE "Overweight (incl. obese) adults" = '60.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: What is every state and District of Columbia with 60.0% overweight or obese adults? ### Input: CREATE TABLE table_22730 (
... |
Who were the runner(s)-up when the winning score was 10 (69-68-74-67=278)? | CREATE TABLE table_40276 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | SELECT "Margin of victory" FROM table_40276 WHERE "Winning score" = '–10 (69-68-74-67=278)' | 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 were the runner(s)-up when the winning score was 10 (69-68-74-67=278)? ### Input: CREATE TABLE table_40276 (
"Date" ... |
Name the vacator for died august 13, 1826 | CREATE TABLE table_225102_4 (
vacator VARCHAR,
reason_for_change VARCHAR
) | SELECT vacator FROM table_225102_4 WHERE reason_for_change = "Died August 13, 1826" | 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 vacator for died august 13, 1826 ### Input: CREATE TABLE table_225102_4 (
vacator VARCHAR,
reason_for_chang... |
Which Drawn has a Points of 6, and a Against larger than 16? | CREATE TABLE table_name_17 (
drawn INTEGER,
points VARCHAR,
against VARCHAR
) | SELECT SUM(drawn) FROM table_name_17 WHERE points = 6 AND against > 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: Which Drawn has a Points of 6, and a Against larger than 16? ### Input: CREATE TABLE table_name_17 (
drawn INTEGER,
... |
Name the Non-Suited Match that has greater than 6 Number of Decks. | CREATE TABLE table_name_60 (
non_suited_match VARCHAR,
number_of_decks INTEGER
) | SELECT non_suited_match FROM table_name_60 WHERE number_of_decks > 6 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the Non-Suited Match that has greater than 6 Number of Decks. ### Input: CREATE TABLE table_name_60 (
non_suited_ma... |
What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played? | CREATE TABLE table_name_38 (
points INTEGER,
drawn VARCHAR,
played VARCHAR
) | SELECT MIN(points) FROM table_name_38 WHERE drawn < 2 AND 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: What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played? ### Input: CREATE TABLE... |
number of competitions | CREATE TABLE table_203_238 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | SELECT COUNT("competition") FROM table_203_238 | 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: number of competitions ### Input: CREATE TABLE table_203_238 (
id number,
"year" number,
"competition" text,
... |
What is the T4 Place Player with a Score of 71-74-66=211? | CREATE TABLE table_name_57 (
player VARCHAR,
place VARCHAR,
score VARCHAR
) | SELECT player FROM table_name_57 WHERE place = "t4" AND score = 71 - 74 - 66 = 211 | 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 T4 Place Player with a Score of 71-74-66=211? ### Input: CREATE TABLE table_name_57 (
player VARCHAR,
pl... |
What as the production code for the episode directed by Robert Duncan McNeill? | CREATE TABLE table_26762 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Original air date" text,
"Production code" text
) | SELECT "Production code" FROM table_26762 WHERE "Directed by" = 'Robert Duncan McNeill' | 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 as the production code for the episode directed by Robert Duncan McNeill? ### Input: CREATE TABLE table_26762 (
"No... |
Where should I begin if I want to take a computing infrastructure course ? | 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 course.department, course.name, course.number FROM area, course WHERE area.area LIKE '%computing infrastructure%' AND course.course_id = area.course_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: Where should I begin if I want to take a computing infrastructure course ? ### Input: CREATE TABLE ta (
campus_job_id in... |
what was the name of the drug that was prescribed to patient 27362 last time through the oral route in 07/last year? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE icustays (
row_id number,
s... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27362) AND prescriptions.route = 'oral' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', pr... | 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 name of the drug that was prescribed to patient 27362 last time through the oral route in 07/last year? ### Inp... |
Show all book categories and the number of books in each category with a bar chart. | CREATE TABLE book_club (
book_club_id int,
Year int,
Author_or_Editor text,
Book_Title text,
Publisher text,
Category text,
Result text
)
CREATE TABLE culture_company (
Company_name text,
Type text,
Incorporated_in text,
Group_Equity_Shareholding real,
book_club_id text,... | SELECT Category, COUNT(*) FROM book_club GROUP BY Category | 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 book categories and the number of books in each category with a bar chart. ### Input: CREATE TABLE book_club (
... |
Name the most points for champion, won in the final against am lie mauresmo | CREATE TABLE table_1973321_5 (
points INTEGER,
status VARCHAR
) | SELECT MAX(points) FROM table_1973321_5 WHERE status = "Champion, won in the final against Amélie Mauresmo" | 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 most points for champion, won in the final against am lie mauresmo ### Input: CREATE TABLE table_1973321_5 (
po... |
What is City, when State is California, when AAM Accredited is No, when ASTC Member is Yes, and when AAM Member is No? | CREATE TABLE table_42124 (
"City" text,
"State" text,
"AAM Accredited" text,
"AAM Member" text,
"ASTC Member" text
) | SELECT "City" FROM table_42124 WHERE "State" = 'california' AND "AAM Accredited" = 'no' AND "ASTC Member" = 'yes' AND "AAM Member" = 'no' | 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 City, when State is California, when AAM Accredited is No, when ASTC Member is Yes, and when AAM Member is No? ### I... |
Name what succeeded by for foam | CREATE TABLE table_1398 (
"Headphone Model" text,
"Headphone Class" text,
"Sensitivity (dB)" text,
"Impedance (Ohms)" real,
"Driver-matched dB" text,
"Construction" text,
"Earpads" text,
"Termination" text,
"Succeeded by" text
) | SELECT "Succeeded by" FROM table_1398 WHERE "Earpads" = 'Foam' | 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 what succeeded by for foam ### Input: CREATE TABLE table_1398 (
"Headphone Model" text,
"Headphone Class" text,... |
flights from SAN JOSE to ST. PAUL | CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE month (
... | 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 = 'SAN JOSE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. P... | 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: flights from SAN JOSE to ST. PAUL ### Input: CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_day... |
Which From club has a Date of 20 oct. 2008? | CREATE TABLE table_name_49 (
from_club VARCHAR,
date VARCHAR
) | SELECT from_club FROM table_name_49 WHERE date = "20 oct. 2008" | 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 From club has a Date of 20 oct. 2008? ### Input: CREATE TABLE table_name_49 (
from_club VARCHAR,
date VARCHAR
... |
How many performances of each location? Show me the proportion using a pie chart. | CREATE TABLE member_attendance (
Member_ID int,
Performance_ID int,
Num_of_Pieces int
)
CREATE TABLE member (
Member_ID text,
Name text,
Nationality text,
Role text
)
CREATE TABLE performance (
Performance_ID real,
Date text,
Host text,
Location text,
Attendance int
) | SELECT Location, COUNT(Location) FROM performance GROUP BY Location | 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 performances of each location? Show me the proportion using a pie chart. ### Input: CREATE TABLE member_attendance ... |
What country is the show aired on TVNZ? | CREATE TABLE table_14523485_9 (
country VARCHAR,
channel VARCHAR
) | SELECT country FROM table_14523485_9 WHERE channel = "TVNZ" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What country is the show aired on TVNZ? ### Input: CREATE TABLE table_14523485_9 (
country VARCHAR,
channel VARCHAR
... |
Return a bar chart on what are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?, I want to sort by the bars in asc please. | CREATE TABLE product (
product_id int,
product text,
dimensions text,
dpi real,
pages_per_minute_color real,
max_page_size text,
interface text
)
CREATE TABLE district (
District_ID int,
District_name text,
Headquartered_City text,
City_Population real,
City_Area real
)
... | SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 ORDER BY District_name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart on what are the district names and city populations for all districts that between 200,000 and 2,000,000 ... |
What ship was built in 2012? | CREATE TABLE table_12259 (
"Built" real,
"Ship" text,
"Operator" text,
"Tonnage" text,
"Flag" text
) | SELECT "Ship" FROM table_12259 WHERE "Built" = '2012' | 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 ship was built in 2012? ### Input: CREATE TABLE table_12259 (
"Built" real,
"Ship" text,
"Operator" text,
... |
In what district was keith ellison the incumbent? | CREATE TABLE table_25030512_26 (
district VARCHAR,
incumbent VARCHAR
) | SELECT district FROM table_25030512_26 WHERE incumbent = "Keith Ellison" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what district was keith ellison the incumbent? ### Input: CREATE TABLE table_25030512_26 (
district VARCHAR,
incu... |
What is the grid total for david coulthard? | CREATE TABLE table_name_76 (
grid INTEGER,
driver VARCHAR
) | SELECT SUM(grid) FROM table_name_76 WHERE driver = "david coulthard" | 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 grid total for david coulthard? ### Input: CREATE TABLE table_name_76 (
grid INTEGER,
driver VARCHAR
) #... |
what is the place where the person is luke donald | CREATE TABLE table_28498999_6 (
country VARCHAR,
player VARCHAR
) | SELECT country FROM table_28498999_6 WHERE player = "Luke Donald" | 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 place where the person is luke donald ### Input: CREATE TABLE table_28498999_6 (
country VARCHAR,
player... |
what number of married patients underwent the procedure titled radiotherapeut proc nec? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.short_title = "Radiotherapeut proc NEC" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of married patients underwent the procedure titled radiotherapeut proc nec? ### Input: CREATE TABLE prescription... |
Name the style for 27 | CREATE TABLE table_28677723_14 (
style VARCHAR,
total VARCHAR
) | SELECT style FROM table_28677723_14 WHERE total = 27 | 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 style for 27 ### Input: CREATE TABLE table_28677723_14 (
style VARCHAR,
total VARCHAR
) ### Response: SELEC... |
Show the hometown of all members, I want to sort by the X-axis in asc. | CREATE TABLE branch (
Branch_ID int,
Name text,
Open_year text,
Address_road text,
City text,
membership_amount text
)
CREATE TABLE purchase (
Member_ID int,
Branch_ID text,
Year text,
Total_pounds real
)
CREATE TABLE membership_register_branch (
Member_ID int,
Branch_I... | SELECT Hometown, COUNT(Hometown) FROM member GROUP BY Hometown ORDER BY Hometown | 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 hometown of all members, I want to sort by the X-axis in asc. ### Input: CREATE TABLE branch (
Branch_ID int,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.