instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
what are the three most frequently performed procedures for patients who previously received oxygen therapy (40% to 60%) - reduce fio2 as tolerated within 2 months in the previous year? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'oxygen therapy (40% to 60%) - reduce fio... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the three most frequently performed procedures for patients who previously received oxygen therapy (40% to 60%) - r... |
Return a pie chart on what are the number of rooms for each bed type? | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a pie chart on what are the number of rooms for each bed type? ### Input: CREATE TABLE Reservations (
Code INTEGE... |
Plot the total number by grouped by time of day as a bar graph, rank in ascending by the total number. | CREATE TABLE broadcast_share (
Channel_ID int,
Program_ID int,
Date text,
Share_in_percent real
)
CREATE TABLE program (
Program_ID int,
Name text,
Origin text,
Launch real,
Owner text
)
CREATE TABLE broadcast (
Channel_ID int,
Program_ID int,
Time_of_day text
)
CREATE... | SELECT Time_of_day, COUNT(*) FROM broadcast GROUP BY Time_of_day ORDER BY COUNT(*) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Plot the total number by grouped by time of day as a bar graph, rank in ascending by the total number. ### Input: CREATE TAB... |
In Penney's game what is the probability where the 1st player wins if the probability of a draw is 8.28% and the 2nd player chooses B BR? | CREATE TABLE table_16226 (
"1st players choice" text,
"2nd players choice" text,
"Probability 1st player wins" text,
"Probability 2nd player wins" text,
"Probability of a draw" text
) | SELECT "Probability 1st player wins" FROM table_16226 WHERE "Probability of a draw" = '8.28%' AND "2nd players choice" = 'B BR' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In Penney's game what is the probability where the 1st player wins if the probability of a draw is 8.28% and the 2nd player ... |
How many family friendly games are in the 1990s? | CREATE TABLE table_14160327_4 (
family_friendly VARCHAR,
decade VARCHAR
) | SELECT COUNT(family_friendly) FROM table_14160327_4 WHERE decade = "1990s" | 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 family friendly games are in the 1990s? ### Input: CREATE TABLE table_14160327_4 (
family_friendly VARCHAR,
... |
What is the Height of Junior Meghan Austin? | CREATE TABLE table_name_59 (
height VARCHAR,
year VARCHAR,
name VARCHAR
) | SELECT height FROM table_name_59 WHERE year = "junior" AND name = "meghan austin" | 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 Height of Junior Meghan Austin? ### Input: CREATE TABLE table_name_59 (
height VARCHAR,
year VARCHAR,
... |
What position is Sal Martinez? | CREATE TABLE table_name_32 (
position VARCHAR,
player VARCHAR
) | SELECT position FROM table_name_32 WHERE player = "sal martinez" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What position is Sal Martinez? ### Input: CREATE TABLE table_name_32 (
position VARCHAR,
player VARCHAR
) ### Respon... |
provide the number of patients whose admission year is less than 2167 and procedure icd9 code is 3532? | 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 prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.icd9_code = "3532" | 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 admission year is less than 2167 and procedure icd9 code is 3532? ### Input: CREATE TAB... |
How many matches were there in the round with 1,000,000 in prize money? | CREATE TABLE table_55269 (
"Round" text,
"Date" text,
"Matches" real,
"Clubs" text,
"New entries this round" text,
"Prize money" text
) | SELECT COUNT("Matches") FROM table_55269 WHERE "Prize money" = '£1,000,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: How many matches were there in the round with 1,000,000 in prize money? ### Input: CREATE TABLE table_55269 (
"Round" te... |
Name the highest grid for Laps more than 137 and rank is less than 8 | CREATE TABLE table_name_89 (
grid INTEGER,
laps VARCHAR,
rank VARCHAR
) | SELECT MAX(grid) FROM table_name_89 WHERE laps > 137 AND rank < 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: Name the highest grid for Laps more than 137 and rank is less than 8 ### Input: CREATE TABLE table_name_89 (
grid INTEGE... |
What role was nominated at the Sydney Film Festival? | CREATE TABLE table_name_56 (
role VARCHAR,
festival_organization VARCHAR
) | SELECT role FROM table_name_56 WHERE festival_organization = "sydney film festival" | 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 role was nominated at the Sydney Film Festival? ### Input: CREATE TABLE table_name_56 (
role VARCHAR,
festival_... |
Name the rank on channel for pilot | CREATE TABLE table_26688 (
"Episode number Production number" text,
"Title" text,
"Original airdate" text,
"Time of airing" text,
"Total viewers on Hallmark" real,
"Total viewers on Hallmark+1" real,
"Total viewers" real,
"Rank on channel" text
) | SELECT "Rank on channel" FROM table_26688 WHERE "Title" = 'Pilot' | 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 rank on channel for pilot ### Input: CREATE TABLE table_26688 (
"Episode number Production number" text,
"T... |
Who is the Opponent playing at 20:00 GMT at Camp Nou? | CREATE TABLE table_name_64 (
opponent VARCHAR,
time VARCHAR,
ground VARCHAR
) | SELECT opponent FROM table_name_64 WHERE time = "20:00 gmt" AND ground = "camp nou" | 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 is the Opponent playing at 20:00 GMT at Camp Nou? ### Input: CREATE TABLE table_name_64 (
opponent VARCHAR,
time... |
how many patients died after being diagnosed with dmii wo cmp nt st uncntr during the same hospital encounter since 6 years ago? | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm... | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FRO... | 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 patients died after being diagnosed with dmii wo cmp nt st uncntr during the same hospital encounter since 6 years ... |
Which Blackpool has a Preston North End smaller than 46, and a Competition of other, and a Draw larger than 1? | CREATE TABLE table_name_94 (
blackpool INTEGER,
draw VARCHAR,
preston_north_end VARCHAR,
competition VARCHAR
) | SELECT SUM(blackpool) FROM table_name_94 WHERE preston_north_end < 46 AND competition = "other" AND draw > 1 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Blackpool has a Preston North End smaller than 46, and a Competition of other, and a Draw larger than 1? ### Input: CR... |
what is patient 006-36108's first urine catheter output time on last month/30? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | 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 = '006-36108')) AND intakeoutput.cellpath LIKE '%output%... | 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 patient 006-36108's first urine catheter output time on last month/30? ### Input: CREATE TABLE microlab (
microl... |
What is the team's record when the NY rangers are at home with atlanta visting and lehtonen getting the decision? | CREATE TABLE table_name_25 (
record VARCHAR,
home VARCHAR,
decision VARCHAR,
visitor VARCHAR
) | SELECT record FROM table_name_25 WHERE decision = "lehtonen" AND visitor = "atlanta" AND home = "ny rangers" | 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 team's record when the NY rangers are at home with atlanta visting and lehtonen getting the decision? ### Input:... |
when was last the heartrate of patient 030-52327 measured today? | 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 vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52327')) AND NOT vitalperiodic.heartrate IS NUL... | 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 last the heartrate of patient 030-52327 measured today? ### Input: CREATE TABLE diagnosis (
diagnosisid number,... |
what was the average systemicmean on the last icu visit for patient 031-4987. | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
... | SELECT AVG(vitalperiodic.systemicmean) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987') AND NOT patient.unitdischargetime IS N... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the average systemicmean on the last icu visit for patient 031-4987. ### Input: CREATE TABLE lab (
labid number... |
For the headstamp id of h2, what was the color of the bullet tip? | CREATE TABLE table_16081 (
"Headstamp ID" text,
"Primer Annulus Color" text,
"Bullet Tip Color" text,
"Other Features" text,
"Functional Type" text
) | SELECT "Bullet Tip Color" FROM table_16081 WHERE "Headstamp ID" = 'H2' | 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: For the headstamp id of h2, what was the color of the bullet tip? ### Input: CREATE TABLE table_16081 (
"Headstamp ID" t... |
what is the rank (night) when the rating is more than 4.3 and the viewers (millions) is more than 10.72? | CREATE TABLE table_54456 (
"Episode" text,
"Rating" real,
"Share" real,
"Rating/Share (18-49)" text,
"Viewers (millions)" real,
"Rank (timeslot)" real,
"Rank (night)" real,
"Rank (week)" text
) | SELECT AVG("Rank (night)") FROM table_54456 WHERE "Rating" > '4.3' AND "Viewers (millions)" > '10.72' | 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 rank (night) when the rating is more than 4.3 and the viewers (millions) is more than 10.72? ### Input: CREATE T... |
What are the different card types, and how many cards are there of each, I want to order total number in descending order. | CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY COUNT(*) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the different card types, and how many cards are there of each, I want to order total number in descending order. #... |
Which College/junior/club team has a Round of 4? | CREATE TABLE table_13766 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"College/junior/club team" text
) | SELECT "College/junior/club team" FROM table_13766 WHERE "Round" = '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: Which College/junior/club team has a Round of 4? ### Input: CREATE TABLE table_13766 (
"Round" real,
"Pick" real,
... |
Tell mem the opponent for result of w 31-21 | CREATE TABLE table_name_52 (
opponent VARCHAR,
result VARCHAR
) | SELECT opponent FROM table_name_52 WHERE result = "w 31-21" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell mem the opponent for result of w 31-21 ### Input: CREATE TABLE table_name_52 (
opponent VARCHAR,
result VARCHAR... |
How many viewers in millions watched the episode with the production code 6acx16? | CREATE TABLE table_24859 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | SELECT "U.S. viewers (million)" FROM table_24859 WHERE "Production code" = '6ACX16' | 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 viewers in millions watched the episode with the production code 6acx16? ### Input: CREATE TABLE table_24859 (
... |
What is the pick number for the tight end who was picked after round 6? | CREATE TABLE table_name_67 (
pick VARCHAR,
round VARCHAR,
position VARCHAR
) | SELECT COUNT(pick) FROM table_name_67 WHERE round > 6 AND position = "tight end" | 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 pick number for the tight end who was picked after round 6? ### Input: CREATE TABLE table_name_67 (
pick VAR... |
when did patient 035-6788 receive the last test of a lab? | 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 patient (
uniquep... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-6788')) ORDER BY lab.labresulttime DESC LIMIT 1 | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 035-6788 receive the last test of a lab? ### Input: CREATE TABLE vitalperiodic (
vitalperiodicid number... |
What was the episode number for the episode viewed by 5.68 million viewers? | CREATE TABLE table_30166 (
"Series episode" real,
"Season episode" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (in million)" text
) | SELECT "Season episode" FROM table_30166 WHERE "U.S. viewers (in million)" = '5.68' | 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 episode number for the episode viewed by 5.68 million viewers? ### Input: CREATE TABLE table_30166 (
"Serie... |
what's the name of the diagnosis that patient 006-80884 was given for the last time since 2105? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
... | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884')) AND STRFTIME('%y', diagnosis.diagnosistime) >= '2105... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what's the name of the diagnosis that patient 006-80884 was given for the last time since 2105? ### Input: CREATE TABLE diag... |
What is the smallest number of extra points? | CREATE TABLE table_3283 (
"Player" text,
"Position" text,
"Starter" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | SELECT MIN("Extra points") FROM table_3283 | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest number of extra points? ### Input: CREATE TABLE table_3283 (
"Player" text,
"Position" text,
... |
Who had the women's win when Norway was the winner overall in season 2001/02? | CREATE TABLE table_name_68 (
winner VARCHAR,
season VARCHAR
) | SELECT winner AS Women FROM table_name_68 WHERE winner = "norway" AND season = "2001/02" | 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 had the women's win when Norway was the winner overall in season 2001/02? ### Input: CREATE TABLE table_name_68 (
wi... |
Find the names of all races held in 2017. | CREATE TABLE driverstandings (
driverstandingsid number,
raceid number,
driverid number,
points number,
position number,
positiontext text,
wins number
)
CREATE TABLE qualifying (
qualifyid number,
raceid number,
driverid number,
constructorid number,
number number,
... | SELECT name FROM races WHERE year = 2017 | 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 names of all races held in 2017. ### Input: CREATE TABLE driverstandings (
driverstandingsid number,
raceid... |
Which language do 87.5% of males speak? | CREATE TABLE table_name_44 (
males VARCHAR,
percentage___percentage_ VARCHAR
) | SELECT males FROM table_name_44 WHERE percentage___percentage_ = "87.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: Which language do 87.5% of males speak? ### Input: CREATE TABLE table_name_44 (
males VARCHAR,
percentage___percenta... |
Which height is associated with Franklin High School? | CREATE TABLE table_77980 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
) | SELECT "Height" FROM table_77980 WHERE "School" = 'franklin high school' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which height is associated with Franklin High School? ### Input: CREATE TABLE table_77980 (
"Player" text,
"Height" ... |
Name the prize pool for 706 (481 r, 346 a) | CREATE TABLE table_3260 (
"Date" text,
"Time (ET)" text,
"Event #" real,
"Event" text,
"Winner" text,
"Prize" text,
"Entries" text,
"Prize Pool" text,
"Elapsed Time" text
) | SELECT "Prize Pool" FROM table_3260 WHERE "Entries" = '706 (481 R, 346 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: Name the prize pool for 706 (481 r, 346 a) ### Input: CREATE TABLE table_3260 (
"Date" text,
"Time (ET)" text,
"... |
What is the total enrollment for the school in garden city, new york? | CREATE TABLE table_1969634_1 (
enrollment VARCHAR,
location VARCHAR
) | SELECT enrollment FROM table_1969634_1 WHERE location = "Garden City, New York" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total enrollment for the school in garden city, new york? ### Input: CREATE TABLE table_1969634_1 (
enrollme... |
How many points did the bills score when their opponent had 14 | CREATE TABLE table_20494 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Bills points" real,
"Opponents" real,
"Bills first downs" real,
"Record" text
) | SELECT "Bills points" FROM table_20494 WHERE "Opponents" = '14' | 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 points did the bills score when their opponent had 14 ### Input: CREATE TABLE table_20494 (
"Game" real,
"D... |
Where does the judge who serves Beacon Falls , Naugatuck , Middlebury , Prospect reside? | CREATE TABLE table_26758262_1 (
judges_residence VARCHAR,
municipalities_served VARCHAR
) | SELECT judges_residence FROM table_26758262_1 WHERE municipalities_served = "Beacon Falls , Naugatuck , Middlebury , Prospect" | 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 does the judge who serves Beacon Falls , Naugatuck , Middlebury , Prospect reside? ### Input: CREATE TABLE table_26758... |
Who did the Blue Jays lose to on July 16? | CREATE TABLE table_14606 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | SELECT "Loss" FROM table_14606 WHERE "Date" = 'july 16' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who did the Blue Jays lose to on July 16? ### Input: CREATE TABLE table_14606 (
"Date" text,
"Opponent" text,
"S... |
Draw a bar chart about the distribution of date_address_from and the sum of monthly_rental bin date_address_from by time. | CREATE TABLE Behavior_Incident (
incident_id INTEGER,
incident_type_code VARCHAR(10),
student_id INTEGER,
date_incident_start DATETIME,
date_incident_end DATETIME,
incident_summary VARCHAR(255),
recommendations VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Address_Types (
... | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses 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: Draw a bar chart about the distribution of date_address_from and the sum of monthly_rental bin date_address_from by time. ##... |
Who is the captain of Middlesbrough? | CREATE TABLE table_79810 (
"Club" text,
"Manager" text,
"Captain" text,
"Manufacturer" text,
"Sponsor" text
) | SELECT "Captain" FROM table_79810 WHERE "Club" = 'middlesbrough' | 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 captain of Middlesbrough? ### Input: CREATE TABLE table_79810 (
"Club" text,
"Manager" text,
"Captain... |
What is the Date with a Home that is hamilton wildcats? | CREATE TABLE table_75857 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
) | SELECT "Date" FROM table_75857 WHERE "Home" = 'hamilton wildcats' | 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 Home that is hamilton wildcats? ### Input: CREATE TABLE table_75857 (
"Date" text,
"Time" te... |
What venue is the home field of Richmond? | CREATE TABLE table_name_46 (
venue VARCHAR,
home_team VARCHAR
) | SELECT venue FROM table_name_46 WHERE home_team = "richmond" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What venue is the home field of Richmond? ### Input: CREATE TABLE table_name_46 (
venue VARCHAR,
home_team VARCHAR
)... |
What Venue has an Away Team Score of 9.12 (66)? | CREATE TABLE table_57423 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_57423 WHERE "Away team score" = '9.12 (66)' | 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 has an Away Team Score of 9.12 (66)? ### Input: CREATE TABLE table_57423 (
"Home team" text,
"Home team s... |
What is the sum of March, when Score is '2 - 2', and when Game is greater than 67? | CREATE TABLE table_9969 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Record" text
) | SELECT SUM("March") FROM table_9969 WHERE "Score" = '2 - 2' AND "Game" > '67' | 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 sum of March, when Score is '2 - 2', and when Game is greater than 67? ### Input: CREATE TABLE table_9969 (
... |
yankee stadium (i), and a Time of 3:00 has what attendance for this location? | CREATE TABLE table_79861 (
"Game" real,
"Date" text,
"Location" text,
"Time" text,
"Attendance" real
) | SELECT "Attendance" FROM table_79861 WHERE "Location" = 'yankee stadium (i)' AND "Time" = '3:00' | 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: yankee stadium (i), and a Time of 3:00 has what attendance for this location? ### Input: CREATE TABLE table_79861 (
"Gam... |
What Engine had a Finish of 27? | CREATE TABLE table_67021 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" text,
"Entrant" text
) | SELECT "Engine" FROM table_67021 WHERE "Finish" = '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 Engine had a Finish of 27? ### Input: CREATE TABLE table_67021 (
"Year" real,
"Chassis" text,
"Engine" text... |
Name the average total for gold less than 1 and rank less than 5 | CREATE TABLE table_70364 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Total") FROM table_70364 WHERE "Gold" < '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: Name the average total for gold less than 1 and rank less than 5 ### Input: CREATE TABLE table_70364 (
"Rank" real,
... |
tell me the price of a vancomycin - trough lab test? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'vancomycin - trough') | 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: tell me the price of a vancomycin - trough lab test? ### Input: CREATE TABLE allergy (
allergyid number,
patientunit... |
What was the location and it's corresponding attendance during the game against Los Angeles? | CREATE TABLE table_30049462_4 (
location_attendance VARCHAR,
team VARCHAR
) | SELECT location_attendance FROM table_30049462_4 WHERE team = "Los Angeles" | 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 location and it's corresponding attendance during the game against Los Angeles? ### Input: CREATE TABLE table_3... |
Latest activity across all sites.. | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
... | SELECT DisplayName, ProfileImageUrl FROM Users WHERE DisplayName LIKE '%M%' AND ProfileImageUrl != '' | 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: Latest activity across all sites.. ### Input: CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags... |
how many people attended the game in november against sunderland ? | CREATE TABLE table_204_318 (
id number,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" number,
"scorers" text
) | SELECT "attendance" FROM table_204_318 WHERE "date" = 11 AND "opponent" = 'sunderland' | 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 people attended the game in november against sunderland ? ### Input: CREATE TABLE table_204_318 (
id number,
... |
For those records from the products and each product's manufacturer, show me about the distribution of name and the average of code , and group by attribute name in a bar chart, and order total number in descending order please. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code 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, show me about the distribution of name and the average ... |
What Player has a To par of 2? | CREATE TABLE table_61671 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Player" FROM table_61671 WHERE "To par" = '–2' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Player has a To par of 2? ### Input: CREATE TABLE table_61671 (
"Place" text,
"Player" text,
"Country" text... |
Are any other requirements fulfilled for POLISH 432 besides general elective ? | CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE... | SELECT DISTINCT program_course.category FROM course, program_course WHERE course.department = 'POLISH' AND course.number = 432 AND program_course.course_id = course.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: Are any other requirements fulfilled for POLISH 432 besides general elective ? ### Input: CREATE TABLE student_record (
... |
Which located featured the first prize of 33500? | CREATE TABLE table_16966 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
) | SELECT "Location" FROM table_16966 WHERE "1st Prize( $ )" = '33500' | 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 located featured the first prize of 33500? ### Input: CREATE TABLE table_16966 (
"Date" text,
"Tournament" tex... |
What is the queens where richmond staten is 42%? | CREATE TABLE table_16449 (
"1973 Democratic initial primary" text,
"Manhattan" text,
"The Bronx" text,
"Brooklyn" text,
"Queens" text,
"Richmond [Staten Is.]" text,
"Total" real,
"%" text
) | SELECT "Queens" FROM table_16449 WHERE "Richmond [Staten Is.]" = '42%' | 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 queens where richmond staten is 42%? ### Input: CREATE TABLE table_16449 (
"1973 Democratic initial primary"... |
What's the tie number of Chelsea when they were home? | CREATE TABLE table_63326 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Tie no" FROM table_63326 WHERE "Home team" = 'chelsea' | 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 tie number of Chelsea when they were home? ### Input: CREATE TABLE table_63326 (
"Tie no" text,
"Home tea... |
What is the round of the pf position player from 1996 and the college/high school/club mississippi state? | CREATE TABLE table_50038 (
"Year" real,
"Round" text,
"Player" text,
"Nationality" text,
"Position" text,
"College/High School/Club" text
) | SELECT "Round" FROM table_50038 WHERE "Position" = 'pf' AND "Year" = '1996' AND "College/High School/Club" = 'mississippi 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 round of the pf position player from 1996 and the college/high school/club mississippi state? ### Input: CREATE ... |
How many date of appointment entries are there when the team is khazar lankaran? | CREATE TABLE table_29285 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | SELECT COUNT("Date of appointment") FROM table_29285 WHERE "Team" = 'Khazar Lankaran' | 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 date of appointment entries are there when the team is khazar lankaran? ### Input: CREATE TABLE table_29285 (
"... |
For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by weekday, I want to show by the the average of employee id in asc. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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 (
LOCATIO... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(EMPLOYEE_ID) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the ... |
Where is the school with state authority that has a roll of more than 157 students? | CREATE TABLE table_80078 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | SELECT "Area" FROM table_80078 WHERE "Authority" = 'state' AND "Roll" > '157' | 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 the school with state authority that has a roll of more than 157 students? ### Input: CREATE TABLE table_80078 (
... |
Who are the finals opponents for the match with partner Ricardo Hocevar? | CREATE TABLE table_name_44 (
opponents_in_the_final VARCHAR,
partnering VARCHAR
) | SELECT opponents_in_the_final FROM table_name_44 WHERE partnering = "ricardo hocevar" | 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 are the finals opponents for the match with partner Ricardo Hocevar? ### Input: CREATE TABLE table_name_44 (
opponen... |
what is the only nation to receive three gold medals ? | CREATE TABLE table_204_775 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "nation" FROM table_204_775 WHERE "gold" = 3 | 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 is the only nation to receive three gold medals ? ### Input: CREATE TABLE table_204_775 (
id number,
"rank" num... |
get me the long title of diagnoses and primary disease of patient betty campbell. | 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 demographic.diagnosis, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Betty Campbell" | 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: get me the long title of diagnoses and primary disease of patient betty campbell. ### Input: CREATE TABLE lab (
subject_... |
What kind of Republican ticket has a Prohibition ticket of stephen mead wing? | CREATE TABLE table_name_27 (
republican_ticket VARCHAR,
prohibition_ticket VARCHAR
) | SELECT republican_ticket FROM table_name_27 WHERE prohibition_ticket = "stephen mead wing" | 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 kind of Republican ticket has a Prohibition ticket of stephen mead wing? ### Input: CREATE TABLE table_name_27 (
re... |
Who drove the fastest lap at the Tenneco Automotive Grand Prix of Detroit? | CREATE TABLE table_16429 (
"Rnd" real,
"Race Name" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | SELECT "Fastest lap" FROM table_16429 WHERE "Race Name" = 'Tenneco Automotive Grand Prix of Detroit' | 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 drove the fastest lap at the Tenneco Automotive Grand Prix of Detroit? ### Input: CREATE TABLE table_16429 (
"Rnd" r... |
Tags Without Excerpt or Wiki (unbalanced). | 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 PostTypes (
Id number,
Name text
)
C... | SELECT c.TagName, c.CountPosts AS "Number of Posts", e.Body AS "Excerpt", w.Body AS "Wiki" FROM (SELECT t.TagName, t.ExcerptPostId, t.WikiPostId, COUNT(*) AS CountPosts FROM Tags AS t LEFT OUTER JOIN TagSynonyms AS s ON (t.TagName = s.SourceTagName) INNER JOIN PostTags AS p ON (p.TagId = t.Id) WHERE s.ApprovalDate IS N... | 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: Tags Without Excerpt or Wiki (unbalanced). ### Input: CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
... |
Which team was the visitor when Milt Palacio (15) was the leading scorer? | CREATE TABLE table_name_82 (
visitor VARCHAR,
leading_scorer VARCHAR
) | SELECT visitor FROM table_name_82 WHERE leading_scorer = "milt palacio (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: Which team was the visitor when Milt Palacio (15) was the leading scorer? ### Input: CREATE TABLE table_name_82 (
visito... |
Name the points for 212 respect toward opponents | CREATE TABLE table_226619_12 (
points VARCHAR,
respect_toward_opponents VARCHAR
) | SELECT points FROM table_226619_12 WHERE respect_toward_opponents = 212 | 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 points for 212 respect toward opponents ### Input: CREATE TABLE table_226619_12 (
points VARCHAR,
respect_t... |
what is the number of patients whose diagnoses short title is mv collision nos-driver and drug route is id? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Mv collision NOS-driver" AND prescriptions.route = "ID" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose diagnoses short title is mv collision nos-driver and drug route is id? ### Input: CREAT... |
What is the race in the 8th position? | CREATE TABLE table_76307 (
"Season" text,
"Series" text,
"Team Name" text,
"Races" real,
"Wins" real,
"Poles" real,
"F.L." real,
"Podiums" real,
"Points" text,
"Position" text
) | SELECT "Races" FROM table_76307 WHERE "Position" = '8th' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the race in the 8th position? ### Input: CREATE TABLE table_76307 (
"Season" text,
"Series" text,
"Team ... |
What was the pick number for the wide receiver drafted from Michigan State? | CREATE TABLE table_43314 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Pick #" FROM table_43314 WHERE "Position" = 'wide receiver' AND "College" = 'michigan 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 was the pick number for the wide receiver drafted from Michigan State? ### Input: CREATE TABLE table_43314 (
"Pick ... |
What's the report for the race name, XIII Grand Prix de l'Albigeois? | CREATE TABLE table_1140117_5 (
report VARCHAR,
race_name VARCHAR
) | SELECT report FROM table_1140117_5 WHERE race_name = "XIII Grand Prix de l'Albigeois" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the report for the race name, XIII Grand Prix de l'Albigeois? ### Input: CREATE TABLE table_1140117_5 (
report VA... |
What Country is Rocco Mediate from? | CREATE TABLE table_46750 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Country" FROM table_46750 WHERE "Player" = 'rocco mediate' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Country is Rocco Mediate from? ### Input: CREATE TABLE table_46750 (
"Place" text,
"Player" text,
"Country"... |
What date did the episode with a production code of 3x6316 originally air? | CREATE TABLE table_28116528_1 (
original_air_date VARCHAR,
production_code VARCHAR
) | SELECT original_air_date FROM table_28116528_1 WHERE production_code = "3X6316" | 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 episode with a production code of 3x6316 originally air? ### Input: CREATE TABLE table_28116528_1 (
or... |
What was the lowest attendance at a game when Pittsburgh was the home team? | CREATE TABLE table_name_68 (
attendance INTEGER,
home VARCHAR
) | SELECT MIN(attendance) FROM table_name_68 WHERE home = "pittsburgh" | 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 lowest attendance at a game when Pittsburgh was the home team? ### Input: CREATE TABLE table_name_68 (
atte... |
How many viewers in the UK did episode 50 have? | CREATE TABLE table_31528 (
"Episode no." real,
"US Airdate" text,
"US Total viewers" text,
"UK Airdate" text,
"UK Total viewers" text
) | SELECT "UK Total viewers" FROM table_31528 WHERE "Episode no." = '50' | 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 viewers in the UK did episode 50 have? ### Input: CREATE TABLE table_31528 (
"Episode no." real,
"US Airdat... |
How many users have a location in their profile. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId numb... | SELECT HasLocation, COUNT(*) FROM (SELECT Id AS "user_link", CASE WHEN Location IS NULL THEN 'No' ELSE 'Yes' END AS HasLocation FROM Users) AS t GROUP BY HasLocation | 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: How many users have a location in their profile. ### Input: CREATE TABLE PostNotices (
Id number,
PostId number,
... |
Name the recopa sudamericana 1992 for did not qualify for libertadores 1992 and round of 16 for bragantino | CREATE TABLE table_1165 (
"Team" text,
"Copa Libertadores 1992" text,
"Supercopa Sudamericana 1992" text,
"Copa CONMEBOL 1992" text,
"Recopa Sudamericana 1992" text,
"Intercontinental Cup 1992" text
) | SELECT "Recopa Sudamericana 1992" FROM table_1165 WHERE "Copa Libertadores 1992" = 'Did not qualify' AND "Copa CONMEBOL 1992" = 'Round of 16' AND "Team" = 'Bragantino' | 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 recopa sudamericana 1992 for did not qualify for libertadores 1992 and round of 16 for bragantino ### Input: CREATE... |
Questions with negative score favorited only by the OP. | CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT Posts.Id AS "post_link", Posts.FavoriteCount, Posts.Score, Posts.CreationDate, Votes.UserId AS "user_link" FROM Votes JOIN Posts ON (Posts.Id = Votes.PostId) WHERE Posts.FavoriteCount = 1 AND Posts.Score < 0 AND VoteTypeId = 5 AND Posts.PostTypeId = 1 AND Posts.OwnerUserId = Votes.UserId ORDER BY Posts.CreationD... | 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: Questions with negative score favorited only by the OP. ### Input: CREATE TABLE PostNoticeTypes (
Id number,
ClassId... |
Name the opponent when the result is w 16-15 and has home/away of home | CREATE TABLE table_name_37 (
opponent VARCHAR,
home_away VARCHAR,
result VARCHAR
) | SELECT opponent FROM table_name_37 WHERE home_away = "home" AND result = "w 16-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: Name the opponent when the result is w 16-15 and has home/away of home ### Input: CREATE TABLE table_name_37 (
opponent ... |
What are the notes for Happy Camp? | CREATE TABLE table_name_79 (
notes VARCHAR,
title VARCHAR
) | SELECT notes FROM table_name_79 WHERE title = "happy camp" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the notes for Happy Camp? ### Input: CREATE TABLE table_name_79 (
notes VARCHAR,
title VARCHAR
) ### Respon... |
What is the smallest frequency (kHz) that is in the location of Longview? | CREATE TABLE table_36968 (
"Frequency (kHz)" real,
"Call letters" text,
"Licensed location" text,
"Type" text,
"Format" text
) | SELECT MIN("Frequency (kHz)") FROM table_36968 WHERE "Licensed location" = 'longview' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest frequency (kHz) that is in the location of Longview? ### Input: CREATE TABLE table_36968 (
"Frequen... |
What was Raymond Floyd's score? | CREATE TABLE table_8818 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Score" FROM table_8818 WHERE "Player" = 'raymond floyd' | 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 Raymond Floyd's score? ### Input: CREATE TABLE table_8818 (
"Place" text,
"Player" text,
"Country" text... |
What's the score for a game over 56 with a record of 29-24-7 with a lundqvist decision? | CREATE TABLE table_name_18 (
score VARCHAR,
record VARCHAR,
game VARCHAR,
decision VARCHAR
) | SELECT score FROM table_name_18 WHERE game > 56 AND decision = "lundqvist" AND record = "29-24-7" | 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 score for a game over 56 with a record of 29-24-7 with a lundqvist decision? ### Input: CREATE TABLE table_name_1... |
List the names of all distinct wines ordered by price. | CREATE TABLE WINE (
Name VARCHAR,
price VARCHAR
) | SELECT DISTINCT Name FROM WINE ORDER BY price | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the names of all distinct wines ordered by price. ### Input: CREATE TABLE WINE (
Name VARCHAR,
price VARCHAR
) ... |
What tournament had an opponent of Els Callens Nancy Feber? | CREATE TABLE table_name_95 (
tournament VARCHAR,
opponents_in_the_final VARCHAR
) | SELECT tournament FROM table_name_95 WHERE opponents_in_the_final = "els callens nancy feber" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What tournament had an opponent of Els Callens Nancy Feber? ### Input: CREATE TABLE table_name_95 (
tournament VARCHAR,
... |
What school/club team is Trey Johnson on? | CREATE TABLE table_10015132_9 (
school_club_team VARCHAR,
player VARCHAR
) | SELECT school_club_team FROM table_10015132_9 WHERE player = "Trey Johnson" | 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 school/club team is Trey Johnson on? ### Input: CREATE TABLE table_10015132_9 (
school_club_team VARCHAR,
playe... |
What's the 2nd leg result in the round where Panionios is team #2? | CREATE TABLE table_19130829_4 (
team__number2 VARCHAR
) | SELECT 2 AS nd_leg FROM table_19130829_4 WHERE team__number2 = "Panionios" | 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 2nd leg result in the round where Panionios is team #2? ### Input: CREATE TABLE table_19130829_4 (
team__numb... |
When the share of votes equals 21.8%, what's the sum of the total amount of seats? | CREATE TABLE table_name_61 (
total_seats INTEGER,
share_of_votes VARCHAR
) | SELECT SUM(total_seats) FROM table_name_61 WHERE share_of_votes = "21.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: When the share of votes equals 21.8%, what's the sum of the total amount of seats? ### Input: CREATE TABLE table_name_61 (
... |
Calculate the total number of patients who had icd9 code v1006 and a duration of stay in hospital of more than 17 days | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "17" AND diagnoses.icd9_code = "V1006" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Calculate the total number of patients who had icd9 code v1006 and a duration of stay in hospital of more than 17 days ### I... |
what was the total population in 1801 ? | CREATE TABLE table_204_938 (
id number,
"year" number,
"edmonton\nhundred" number,
"elthorne\nhundred" number,
"gore\nhundred" number,
"isleworth\nhundred" number,
"ossulstone\nhundred\nholborn\ndivision" number,
"ossulstone\nhundred\nfinsbury\ndivision" number,
"ossulstone\nhundred\... | SELECT "total" FROM table_204_938 WHERE "year" = 1801 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the total population in 1801 ? ### Input: CREATE TABLE table_204_938 (
id number,
"year" number,
"edmon... |
What's the number & name for the date after 1954? | CREATE TABLE table_name_28 (
number_ VARCHAR,
_name VARCHAR,
date INTEGER
) | SELECT number_ & _name FROM table_name_28 WHERE date > 1954 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the number & name for the date after 1954? ### Input: CREATE TABLE table_name_28 (
number_ VARCHAR,
_name VAR... |
during this year was patient 009-10007 prescribed pantoprazole sodium 40 mg po tbec? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time... | 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 = '009-10007')) AND medication.drugname = 'pantoprazole sodium 40 mg po tbec'... | 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: during this year was patient 009-10007 prescribed pantoprazole sodium 40 mg po tbec? ### Input: CREATE TABLE cost (
cost... |
What was the attendance in week 6? | CREATE TABLE table_33181 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_33181 WHERE "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: What was the attendance in week 6? ### Input: CREATE TABLE table_33181 (
"Week" real,
"Date" text,
"Opponent" te... |
provide the number of patients whose insurance is private and lab test name is bilirubin, indirect? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Private" AND lab.label = "Bilirubin, Indirect" | 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 private and lab test name is bilirubin, indirect? ### Input: CREATE TABLE ... |
what is the name of the treatment that patient 006-43795 had been given two times during the first hospital encounter? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | 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 name of the treatment that patient 006-43795 had been given two times during the first hospital encounter? ### I... |
Which player's home town is Swift Current, AB? | CREATE TABLE table_67030 (
"Number" text,
"Player" text,
"Position" text,
"Height" text,
"Weight" text,
"Home Town" text
) | SELECT "Player" FROM table_67030 WHERE "Home Town" = 'swift current, ab' | 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's home town is Swift Current, AB? ### Input: CREATE TABLE table_67030 (
"Number" text,
"Player" text,
... |
systolic blood pressure ( supine ) >= 100 mmhg; | CREATE TABLE table_train_83 (
"id" int,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"diabetic" string,
"estimated_glomerular_filtration_rate_egfr" int,
"iq" int,
"geriatric_depression_scale_gds" int,
"NOUSE" float
) | SELECT * FROM table_train_83 WHERE systolic_blood_pressure_sbp >= 100 | 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: systolic blood pressure ( supine ) >= 100 mmhg; ### Input: CREATE TABLE table_train_83 (
"id" int,
"systolic_blood_p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.