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 episode number in the series had 2.528 million u.s. viewers? | CREATE TABLE table_24223834_3 (
no_in_series VARCHAR,
us_viewers__in_millions_ VARCHAR
) | SELECT no_in_series FROM table_24223834_3 WHERE us_viewers__in_millions_ = "2.528" | 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 episode number in the series had 2.528 million u.s. viewers? ### Input: CREATE TABLE table_24223834_3 (
no_in_serie... |
What is the name of the 375 crest length? | CREATE TABLE table_15895 (
"Name" text,
"Canton" text,
"Height (meters)" real,
"Crest length (meters)" real,
"Type" text,
"Year of construction" real,
"Name of the Lake" text
) | SELECT "Name" FROM table_15895 WHERE "Crest length (meters)" = '375' | 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 name of the 375 crest length? ### Input: CREATE TABLE table_15895 (
"Name" text,
"Canton" text,
"Hei... |
What is the date of the GC competition when the opponents are 1. FC Nuremberg? | CREATE TABLE table_51612 (
"Date" text,
"Opponents" text,
"Score" text,
"Competition" text,
"Match Report" text
) | SELECT "Date" FROM table_51612 WHERE "Opponents" = '1. fc nuremberg' AND "Competition" = 'gc' | 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 of the GC competition when the opponents are 1. FC Nuremberg? ### Input: CREATE TABLE table_51612 (
"Da... |
what is the number of patients whose marital status is divorced and procedure short title is contr abd arteriogrm 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 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.marital_status = "DIVORCED" AND procedures.short_title = "Contr abd arteriogrm 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 is the number of patients whose marital status is divorced and procedure short title is contr abd arteriogrm nec? ### I... |
What is the Outcome when All England Open is the Opponent in the final? | CREATE TABLE table_75045 (
"Outcome" text,
"Event" text,
"Year" text,
"Venue" text,
"Opponent in the final" text
) | SELECT "Outcome" FROM table_75045 WHERE "Opponent in the final" = 'all england open' | 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 Outcome when All England Open is the Opponent in the final? ### Input: CREATE TABLE table_75045 (
"Outcome" ... |
What digital channel corresponds to virtual channel 5.2? | CREATE TABLE table_30608 (
"Callsign" text,
"City of license" text,
"Virtual channel" text,
"Digital channel" text,
"Network" text
) | SELECT "Digital channel" FROM table_30608 WHERE "Virtual channel" = '5.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 digital channel corresponds to virtual channel 5.2? ### Input: CREATE TABLE table_30608 (
"Callsign" text,
"Cit... |
Name the Founded which has a Affiliation of private/methodist? | CREATE TABLE table_name_6 (
founded INTEGER,
affiliation VARCHAR
) | SELECT MAX(founded) FROM table_name_6 WHERE affiliation = "private/methodist" | 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 Founded which has a Affiliation of private/methodist? ### Input: CREATE TABLE table_name_6 (
founded INTEGER,
... |
For each title, use a bar chart to show the number of films, I want to rank in desc by the x-axis please. | CREATE TABLE market (
Market_ID int,
Country text,
Number_cities int
)
CREATE TABLE film (
Film_ID int,
Title text,
Studio text,
Director text,
Gross_in_dollar int
)
CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID ... | SELECT Title, COUNT(Title) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title 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 each title, use a bar chart to show the number of films, I want to rank in desc by the x-axis please. ### Input: CREATE ... |
In this semester which courses offered ? | 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 gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 ORDER BY course.department | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In this semester which courses offered ? ### Input: CREATE TABLE student_record (
student_id int,
course_id int,
... |
Who was the visiting team on May 7? | CREATE TABLE table_name_55 (
visitor VARCHAR,
date VARCHAR
) | SELECT visitor FROM table_name_55 WHERE date = "may 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: Who was the visiting team on May 7? ### Input: CREATE TABLE table_name_55 (
visitor VARCHAR,
date VARCHAR
) ### Resp... |
Which Title has a Director of rowell santiago? | CREATE TABLE table_34864 (
"Year" text,
"Title" text,
"Role" text,
"Producer" text,
"Director" text
) | SELECT "Title" FROM table_34864 WHERE "Director" = 'rowell santiago' | 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 Title has a Director of rowell santiago? ### Input: CREATE TABLE table_34864 (
"Year" text,
"Title" text,
... |
How many countries did Utah Bulwark's owner come from? | CREATE TABLE table_24546 (
"Year" real,
"Horse" text,
"Driver" text,
"Trainer" text,
"Country of owner" text,
"Odds of winner" text,
"Winning time (km rate)" text
) | SELECT COUNT("Country of owner") FROM table_24546 WHERE "Horse" = 'Utah Bulwark' | 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 countries did Utah Bulwark's owner come from? ### Input: CREATE TABLE table_24546 (
"Year" real,
"Horse" te... |
provide the number of patients whose age is less than 61 and lab test name is prostate specific antigen? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "61" AND lab.label = "Prostate Specific Antigen" | 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 age is less than 61 and lab test name is prostate specific antigen? ### Input: CREATE T... |
how many hours have passed since the the time patient 28447 was admitted to the icu? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28447) AND icustays.outtime IS NULL | 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 hours have passed since the the time patient 28447 was admitted to the icu? ### Input: CREATE TABLE procedures_icd ... |
Find the full names of faculties who are members of department with department number 520. | CREATE TABLE MEMBER_OF (
FacID VARCHAR,
DNO VARCHAR
)
CREATE TABLE FACULTY (
Fname VARCHAR,
Lname VARCHAR,
FacID VARCHAR
) | SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520 | 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: Find the full names of faculties who are members of department with department number 520. ### Input: CREATE TABLE MEMBER_OF... |
How many students play each sport Show bar chart, and sort bar in ascending order. | CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
... | SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY SportName | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many students play each sport Show bar chart, and sort bar in ascending order. ### Input: CREATE TABLE SportsInfo (
... |
Bar chart of mean salary from each dept name, could you list names from low to high order? | CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE instructor (
ID var... | SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name ORDER BY dept_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: Bar chart of mean salary from each dept name, could you list names from low to high order? ### Input: CREATE TABLE teaches (... |
What is the Attendance of the game on November 6, 1966? | CREATE TABLE table_62914 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_62914 WHERE "Date" = 'november 6, 1966' | 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 Attendance of the game on November 6, 1966? ### Input: CREATE TABLE table_62914 (
"Week" real,
"Date" te... |
Who was the bronze medal when the Asian Games were held in Busan? | CREATE TABLE table_35916 (
"Year" real,
"Location" text,
"Gold" text,
"Silver" text,
"Bronze" text
) | SELECT "Bronze" FROM table_35916 WHERE "Location" = 'busan' | 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 bronze medal when the Asian Games were held in Busan? ### Input: CREATE TABLE table_35916 (
"Year" real,
... |
Give me the comparison about the sum of School_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, order by the Y-axis in desc. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY SUM(School_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: Give me the comparison about the sum of School_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, order ... |
i'd like information on BOSTON to WASHINGTON | CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restrict... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHING... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i'd like information on BOSTON to WASHINGTON ### Input: CREATE TABLE fare_basis (
fare_basis_code text,
booking_clas... |
For all train stations not in London with a pie chart, show me the proportion of total_passengers of different names. | CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
... | SELECT Name, Total_Passengers FROM station WHERE Location <> 'London' | 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 train stations not in London with a pie chart, show me the proportion of total_passengers of different names. ### In... |
What was the group in the British Champion Stakes? | CREATE TABLE table_24850630_4 (
group VARCHAR,
race VARCHAR
) | SELECT group FROM table_24850630_4 WHERE race = "British Champion Stakes" | 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 group in the British Champion Stakes? ### Input: CREATE TABLE table_24850630_4 (
group VARCHAR,
race VA... |
What is the frequency where the power is 25kw? | CREATE TABLE table_12657 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power (kW)" text,
"Location" text
) | SELECT "Frequency" FROM table_12657 WHERE "Power (kW)" = '25kw' | 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 frequency where the power is 25kw? ### Input: CREATE TABLE table_12657 (
"Branding" text,
"Callsign" tex... |
What is the average To Par, when Score is '72-67-71-72=282'? | CREATE TABLE table_77423 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" real
) | SELECT AVG("To par") FROM table_77423 WHERE "Score" = '72-67-71-72=282' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average To Par, when Score is '72-67-71-72=282'? ### Input: CREATE TABLE table_77423 (
"Place" text,
"Pl... |
Frequency of 1.2 ghz, and a Release price ( USD ) of $70 is what socket? | CREATE TABLE table_name_91 (
socket VARCHAR,
frequency VARCHAR,
release_price___usd__ VARCHAR
) | SELECT socket FROM table_name_91 WHERE frequency = "1.2 ghz" AND release_price___usd__ = "$70" | 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: Frequency of 1.2 ghz, and a Release price ( USD ) of $70 is what socket? ### Input: CREATE TABLE table_name_91 (
socket ... |
What was the outcome on 11 October 2009, when his partner was Jordan Kerr? | CREATE TABLE table_name_72 (
outcome VARCHAR,
partner VARCHAR,
date VARCHAR
) | SELECT outcome FROM table_name_72 WHERE partner = "jordan kerr" AND date = "11 october 2009" | 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 outcome on 11 October 2009, when his partner was Jordan Kerr? ### Input: CREATE TABLE table_name_72 (
outco... |
Give a bar chart showing how many shops in each carrier, list by the the number of carrier in desc. | CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Dat... | SELECT Carrier, COUNT(Carrier) FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID GROUP BY Carrier ORDER BY COUNT(Carrier) 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: Give a bar chart showing how many shops in each carrier, list by the the number of carrier in desc. ### Input: CREATE TABLE ... |
Which Champion has a Venue of old waverly golf club? | CREATE TABLE table_34517 (
"Year" real,
"Champion" text,
"Country" text,
"Venue" text,
"Location" text,
"Score" text,
"To par" text,
"Purse ( $ )" real,
"Winner's share ($)" real
) | SELECT "Champion" FROM table_34517 WHERE "Venue" = 'old waverly golf club' | 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 Champion has a Venue of old waverly golf club? ### Input: CREATE TABLE table_34517 (
"Year" real,
"Champion" t... |
What nation had 135 Bronze medals? | CREATE TABLE table_name_89 (
bronze VARCHAR,
total VARCHAR
) | SELECT COUNT(bronze) FROM table_name_89 WHERE total = 135 | 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 nation had 135 Bronze medals? ### Input: CREATE TABLE table_name_89 (
bronze VARCHAR,
total VARCHAR
) ### Respo... |
Give me a pie chart showing the number of engineers for different skill description, and I want to list from low to high by the X. | CREATE TABLE Engineer_Visits (
engineer_visit_id INTEGER,
contact_staff_id INTEGER,
engineer_id INTEGER,
fault_log_entry_id INTEGER,
fault_status VARCHAR(10),
visit_start_datetime DATETIME,
visit_end_datetime DATETIME,
other_visit_details VARCHAR(255)
)
CREATE TABLE Asset_Parts (
as... | SELECT skill_description, COUNT(skill_description) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY skill_description ORDER BY skill_description | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me a pie chart showing the number of engineers for different skill description, and I want to list from low to high by ... |
Name the number of years for womens doubles being diana koleva emilia dimitrova and jeliazko valkov | CREATE TABLE table_19663 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
) | SELECT COUNT("Year") FROM table_19663 WHERE "Womens doubles" = 'Diana Koleva Emilia Dimitrova' AND "Mens singles" = 'Jeliazko Valkov' | 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 years for womens doubles being diana koleva emilia dimitrova and jeliazko valkov ### Input: CREATE TABLE ... |
Which Week had a Result of w 10-0, and an Attendance smaller than 58,571? | CREATE TABLE table_38349 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT COUNT("Week") FROM table_38349 WHERE "Result" = 'w 10-0' AND "Attendance" < '58,571' | 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 Week had a Result of w 10-0, and an Attendance smaller than 58,571? ### Input: CREATE TABLE table_38349 (
"Week" r... |
What is the Game # that scored 87-92? | CREATE TABLE table_79317 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text
) | SELECT SUM("Game") FROM table_79317 WHERE "Score" = '87-92' | 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 Game # that scored 87-92? ### Input: CREATE TABLE table_79317 (
"Game" real,
"Date" text,
"Opponent"... |
how many films were directed in the year 1961 by sridhar ? | CREATE TABLE table_203_204 (
id number,
"year" number,
"film" text,
"language" text,
"actors" text,
"music" text,
"banner" text,
"note" text
) | SELECT COUNT("film") FROM table_203_204 WHERE "year" = 1961 | 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 films were directed in the year 1961 by sridhar ? ### Input: CREATE TABLE table_203_204 (
id number,
"year"... |
Who was at home when the score was 2:2? | CREATE TABLE table_name_88 (
home VARCHAR,
score VARCHAR
) | SELECT home FROM table_name_88 WHERE score = "2: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 at home when the score was 2:2? ### Input: CREATE TABLE table_name_88 (
home VARCHAR,
score VARCHAR
) ### Re... |
what does patient 027-124213 change in systemicsystolic last measured on the last icu visit compared to the value first measured on the last icu visit? | 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 microlab (
microl... | SELECT (SELECT vitalperiodic.systemicsystolic FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-124213') AND NOT patient.unitdischarge... | 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 does patient 027-124213 change in systemicsystolic last measured on the last icu visit compared to the value first meas... |
How many INTs were there with an average less than 8, 0 long, and the player is Mike Douglass? | CREATE TABLE table_6298 (
"Player" text,
"Sacks" real,
"INT'S" real,
"Yards" real,
"Average" real,
"Long" text
) | SELECT COUNT("INT'S") FROM table_6298 WHERE "Average" < '8' AND "Long" = '0' AND "Player" = 'mike douglass' | 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 INTs were there with an average less than 8, 0 long, and the player is Mike Douglass? ### Input: CREATE TABLE table... |
how long was daniel pfister behind first place / | CREATE TABLE table_204_862 (
id number,
"rank" number,
"bib" number,
"athlete" text,
"country" text,
"run 1" text,
"run 2" text,
"total" text,
"behind" number
) | SELECT "behind" FROM table_204_862 WHERE "athlete" = 'daniel pfister' | 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 long was daniel pfister behind first place / ### Input: CREATE TABLE table_204_862 (
id number,
"rank" number,
... |
Who was the away team when Lincoln City was the home team? | CREATE TABLE table_name_19 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team FROM table_name_19 WHERE home_team = "lincoln city" | 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 away team when Lincoln City was the home team? ### Input: CREATE TABLE table_name_19 (
away_team VARCHAR,
... |
What is the lowest interview of Texas, with an average larger than 9.531? | CREATE TABLE table_54687 (
"State" text,
"Interview" real,
"Swimsuit" real,
"Evening Gown" real,
"Average" real
) | SELECT MIN("Interview") FROM table_54687 WHERE "State" = 'texas' AND "Average" > '9.531' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest interview of Texas, with an average larger than 9.531? ### Input: CREATE TABLE table_54687 (
"State" ... |
Who is the Opponent in the final after 1983 with an Outcome of runner-up? | CREATE TABLE table_42095 (
"Outcome" text,
"Date" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | SELECT "Opponent in the final" FROM table_42095 WHERE "Outcome" = 'runner-up' AND "Date" > '1983' | 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 Opponent in the final after 1983 with an Outcome of runner-up? ### Input: CREATE TABLE table_42095 (
"Outcome... |
Which Nation has a Lead of alexandra bruckmiller? | CREATE TABLE table_name_73 (
nation VARCHAR,
lead VARCHAR
) | SELECT nation FROM table_name_73 WHERE lead = "alexandra bruckmiller" | 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 Nation has a Lead of alexandra bruckmiller? ### Input: CREATE TABLE table_name_73 (
nation VARCHAR,
lead VARCH... |
how many bronze medals does togo have ? | CREATE TABLE table_203_70 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "bronze" FROM table_203_70 WHERE "nation" = 'togo' | 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 bronze medals does togo have ? ### Input: CREATE TABLE table_203_70 (
id number,
"rank" number,
"nation... |
Show institution names along with the number of proteins for each institution in a bar chart, and I want to list from low to high by the X. | CREATE TABLE building (
building_id text,
Name text,
Street_address text,
Years_as_tallest text,
Height_feet int,
Floors int
)
CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage real,
accession_number text,
sequence_length real,
seq... | SELECT Institution, COUNT(*) FROM Institution AS T1 JOIN protein AS T2 ON T1.Institution_id = T2.Institution_id GROUP BY T1.Institution_id ORDER BY Institution | 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 institution names along with the number of proteins for each institution in a bar chart, and I want to list from low to... |
What is the location is the winning driver is Bill Vukovich II? | CREATE TABLE table_2690 (
"Rnd" real,
"Date" text,
"Race Name" text,
"Length" text,
"Track" text,
"Location" text,
"Pole Position" text,
"Winning Driver" text
) | SELECT "Location" FROM table_2690 WHERE "Winning Driver" = 'Bill Vukovich II' | 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 location is the winning driver is Bill Vukovich II? ### Input: CREATE TABLE table_2690 (
"Rnd" real,
"Da... |
what is the top three most commonly performed microbiology test that the patients until 1 year ago had within the same month after receiving a 1 int mam-cor art bypass treatment? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the top three most commonly performed microbiology test that the patients until 1 year ago had within the same month... |
until 12/2103, how much did patient 027-186593 weigh for the first time? | 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 patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-186593') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) <= '2103-12' ORDER BY patient.unitadmittime 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: until 12/2103, how much did patient 027-186593 weigh for the first time? ### Input: CREATE TABLE vitalperiodic (
vitalpe... |
Which city has tasmania as the state/territory and a ICAO of ymhb? | CREATE TABLE table_36854 (
"City" text,
"State/Territory" text,
"IATA" text,
"ICAO" text,
"Airport" text,
"Begin" text
) | SELECT "City" FROM table_36854 WHERE "State/Territory" = 'tasmania' AND "ICAO" = 'ymhb' | 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 city has tasmania as the state/territory and a ICAO of ymhb? ### Input: CREATE TABLE table_36854 (
"City" text,
... |
which team took a shorter amount of time , ukraine or united states ? | CREATE TABLE table_204_735 (
id number,
"rank" number,
"team" text,
"names" text,
"time" text,
"qualification" text
) | SELECT "team" FROM table_204_735 WHERE "team" IN ('ukraine', 'united states') ORDER BY "time" LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which team took a shorter amount of time , ukraine or united states ? ### Input: CREATE TABLE table_204_735 (
id number,... |
what were the five most frequent microbiology tests ordered for patients who received venous cath nec earlier in the same hospital visit until 2102? | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
val... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_pro... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the five most frequent microbiology tests ordered for patients who received venous cath nec earlier in the same ho... |
calculate the minimum age of female patients who have left femur fracture primary disease. | 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 lab (
subject_id text,
hadm_id text,
... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "LEFT FEMUR FRACTURE" | 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 minimum age of female patients who have left femur fracture primary disease. ### Input: CREATE TABLE diagnoses... |
On week 13 what was the score of the game? | CREATE TABLE table_name_11 (
result VARCHAR,
week VARCHAR
) | SELECT result FROM table_name_11 WHERE week = 13 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On week 13 what was the score of the game? ### Input: CREATE TABLE table_name_11 (
result VARCHAR,
week VARCHAR
) ##... |
Create a pie chart showing acc_percent across team name. | 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: Create a pie chart showing acc_percent across team name. ### Input: CREATE TABLE university (
School_ID int,
School ... |
For the race held on 10/08/86, what was the circuit? | CREATE TABLE table_4913 (
"Date" text,
"Round" text,
"Circuit" text,
"Winning driver" text,
"Winning team" text,
"Winning car" text
) | SELECT "Circuit" FROM table_4913 WHERE "Date" = '10/08/86' | 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 race held on 10/08/86, what was the circuit? ### Input: CREATE TABLE table_4913 (
"Date" text,
"Round" text,... |
Can you tell me the sum of Draws that had the Wins smaller than 3, and the Byes larger than 2? | CREATE TABLE table_7686 (
"Ballarat FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT SUM("Draws") FROM table_7686 WHERE "Wins" < '3' AND "Byes" > '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: Can you tell me the sum of Draws that had the Wins smaller than 3, and the Byes larger than 2? ### Input: CREATE TABLE table... |
Accounts with my e-mail hash. Find all accounts with an e-mail hash equal to mine. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT COUNT(*) FROM Users WHERE NOT EmailHash 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: Accounts with my e-mail hash. Find all accounts with an e-mail hash equal to mine. ### Input: CREATE TABLE Users (
Id nu... |
Name the D 45 O with D 46 O of r 31 | CREATE TABLE table_name_97 (
d_45_o VARCHAR,
d_46_o VARCHAR
) | SELECT d_45_o FROM table_name_97 WHERE d_46_o = "r 31 √" | 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 D 45 O with D 46 O of r 31 ### Input: CREATE TABLE table_name_97 (
d_45_o VARCHAR,
d_46_o VARCHAR
) ### Res... |
Which player who won in 1977 and scored great than 155 was the closest to par? | CREATE TABLE table_name_96 (
to_par INTEGER,
year_s__won VARCHAR,
total VARCHAR
) | SELECT MAX(to_par) FROM table_name_96 WHERE year_s__won = "1977" AND total > 155 | 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 player who won in 1977 and scored great than 155 was the closest to par? ### Input: CREATE TABLE table_name_96 (
t... |
What is the Nominee from the Category that is best costume design? | CREATE TABLE table_name_64 (
nominee VARCHAR,
category VARCHAR
) | SELECT nominee FROM table_name_64 WHERE category = "best costume design" | 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 Nominee from the Category that is best costume design? ### Input: CREATE TABLE table_name_64 (
nominee VARCH... |
What was segment A when segment B was snowboards? | CREATE TABLE table_19892 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | SELECT "Segment A" FROM table_19892 WHERE "Segment B" = 'Snowboards' | 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 segment A when segment B was snowboards? ### Input: CREATE TABLE table_19892 (
"Series Ep." text,
"Episode"... |
What was the time for the winning horse Salford ii? | CREATE TABLE table_75689 (
"Year" real,
"Winner" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Distance (Miles)" text,
"Time" text
) | SELECT "Time" FROM table_75689 WHERE "Winner" = 'salford ii' | 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 time for the winning horse Salford ii? ### Input: CREATE TABLE table_75689 (
"Year" real,
"Winner" text... |
what is the turbo when the cores is standard power? | CREATE TABLE table_13846 (
"Model number" text,
"sSpec number" text,
"Cores" text,
"Frequency" text,
"Turbo" text,
"L2 cache" text,
"L3 cache" text,
"GPU model" text,
"GPU frequency" text,
"Socket" text,
"I/O bus" text,
"Release date" text,
"Part number(s)" text,
... | SELECT "Turbo" FROM table_13846 WHERE "Cores" = 'standard power' | 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 turbo when the cores is standard power? ### Input: CREATE TABLE table_13846 (
"Model number" text,
"sSpe... |
count the number of patients whose days of hospital stay is greater than 1 and diagnoses icd9 code is e8791? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.icd9_code = "E8791" | 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 days of hospital stay is greater than 1 and diagnoses icd9 code is e8791? ### Input: CREA... |
How many samples taken from producer Qingdao Suncare Nutritional Technology with a melamine content less than 53.4? | CREATE TABLE table_name_12 (
samples_taken INTEGER,
melamine_content_mg_kg_ VARCHAR,
producer VARCHAR
) | SELECT SUM(samples_taken) FROM table_name_12 WHERE melamine_content_mg_kg_ < 53.4 AND producer = "qingdao suncare nutritional technology" | 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 samples taken from producer Qingdao Suncare Nutritional Technology with a melamine content less than 53.4? ### Inpu... |
If the time on Wed aug 25 was 20' 09.25 112.324mph, what was the time on sat Aug 28? | CREATE TABLE table_26986076_1 (
sat_28_aug VARCHAR,
wed_25_aug VARCHAR
) | SELECT sat_28_aug FROM table_26986076_1 WHERE wed_25_aug = "20' 09.25 112.324mph" | 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: If the time on Wed aug 25 was 20' 09.25 112.324mph, what was the time on sat Aug 28? ### Input: CREATE TABLE table_26986076_... |
how many patients whose procedure long title is venous catheterization, not elsewhere classified? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Venous catheterization, not elsewhere classified" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose procedure long title is venous catheterization, not elsewhere classified? ### Input: CREATE TABLE pr... |
which nations won only 1 gold medal ? | CREATE TABLE table_204_771 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "nation" FROM table_204_771 WHERE "gold" = 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which nations won only 1 gold medal ? ### Input: CREATE TABLE table_204_771 (
id number,
"rank" number,
"nation"... |
What is the Score of the game on March 18? | CREATE TABLE table_name_5 (
score VARCHAR,
march VARCHAR
) | SELECT score FROM table_name_5 WHERE march = 18 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Score of the game on March 18? ### Input: CREATE TABLE table_name_5 (
score VARCHAR,
march VARCHAR
) ###... |
Which batter has a uni# of 31? | CREATE TABLE table_name_17 (
bats VARCHAR,
uni_number VARCHAR
) | SELECT bats FROM table_name_17 WHERE uni_number = 31 | 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 batter has a uni# of 31? ### Input: CREATE TABLE table_name_17 (
bats VARCHAR,
uni_number VARCHAR
) ### Respon... |
A bar chart about what are the student IDs and middle names of the students enrolled in at most two courses? | CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABL... | SELECT T2.middle_name, T1.student_id FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_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: A bar chart about what are the student IDs and middle names of the students enrolled in at most two courses? ### Input: CREA... |
score in posts information schema. | CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT * FROM information_schema.columns WHERE table_name = 'POSTS' AND column_name = 'score' | 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: score in posts information schema. ### Input: CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerI... |
what is lab test abnormal status of subject name stephanie suchan? | 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 lab.flag FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Stephanie Suchan" | 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 lab test abnormal status of subject name stephanie suchan? ### Input: CREATE TABLE prescriptions (
subject_id te... |
Show how many delegates in each party with a bar chart, sort by the x-axis in descending. | CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
A... | SELECT T2.Party, COUNT(T2.Party) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY T2.Party 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: Show how many delegates in each party with a bar chart, sort by the x-axis in descending. ### Input: CREATE TABLE election (... |
What year is the death for a birth of 1873 and higher than rank 28? | CREATE TABLE table_name_74 (
death VARCHAR,
birth VARCHAR,
rank VARCHAR
) | SELECT death FROM table_name_74 WHERE birth = 1873 AND rank > 28 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year is the death for a birth of 1873 and higher than rank 28? ### Input: CREATE TABLE table_name_74 (
death VARCHA... |
what was the sum of patient 025-55786's hospital bill during their stay on their first hospital visit? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number... | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-55786' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime 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: what was the sum of patient 025-55786's hospital bill during their stay on their first hospital visit? ### Input: CREATE TAB... |
Which Share of seats has Seats smaller than 52, and a Name of sdp liberal alliance, and a General election of 1983? | CREATE TABLE table_name_66 (
share_of_seats VARCHAR,
general_election VARCHAR,
seats VARCHAR,
name VARCHAR
) | SELECT share_of_seats FROM table_name_66 WHERE seats < 52 AND name = "sdp–liberal alliance" AND general_election = 1983 | 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 Share of seats has Seats smaller than 52, and a Name of sdp liberal alliance, and a General election of 1983? ### Inpu... |
Visualize a bar chart about the distribution of Sex and the sum of Height , and group by attribute Sex, and could you list in desc by the total number please? | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Sex, SUM(Height) FROM people GROUP BY Sex ORDER BY SUM(Height) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart about the distribution of Sex and the sum of Height , and group by attribute Sex, and could you list i... |
What is the highest wins a tournament with 3 cuts and more than 4 events has? | CREATE TABLE table_name_27 (
wins INTEGER,
cuts_made VARCHAR,
events VARCHAR
) | SELECT MAX(wins) FROM table_name_27 WHERE cuts_made = 3 AND events > 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 highest wins a tournament with 3 cuts and more than 4 events has? ### Input: CREATE TABLE table_name_27 (
wi... |
What was the type of ballot measures if the % of yes vote is 32.47%? | CREATE TABLE table_256286_8 (
type VARCHAR,
_percentage_yes VARCHAR
) | SELECT type FROM table_256286_8 WHERE _percentage_yes = "32.47%" | 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 type of ballot measures if the % of yes vote is 32.47%? ### Input: CREATE TABLE table_256286_8 (
type VARCH... |
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, could you list in ascending by the X-axis please? | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_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 was hired before 2002-06-21, return a bar chart about the distribution of job_id and the average of ... |
For NESLANG 435 , who was the most recent teacher ? | CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course_offeri... | 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: For NESLANG 435 , who was the most recent teacher ? ### Input: CREATE TABLE program_requirement (
program_id int,
ca... |
What are all the employee ids and the names of the countries in which they work Visualize by bar chart, I want to order in asc by the X-axis. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE... | SELECT COUNTRY_NAME, SUM(EMPLOYEE_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID JOIN locations AS T3 ON T2.LOCATION_ID = T3.LOCATION_ID JOIN countries AS T4 ON T3.COUNTRY_ID = T4.COUNTRY_ID GROUP BY COUNTRY_NAME ORDER BY COUNTRY_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: What are all the employee ids and the names of the countries in which they work Visualize by bar chart, I want to order in a... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and revenue , and group by attribute name, order by the y-axis in desc. | 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 T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T2.Revenue 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, visualize a bar chart about the distribution of name an... |
find the number of dead patients who had sternal wound infection primary disease. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "STERNAL WOUND INFECTION" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: find the number of dead patients who had sternal wound infection primary disease. ### Input: CREATE TABLE procedures (
s... |
When samai amari is the asian rider classification how many asian team classifications are there? | CREATE TABLE table_21573750_2 (
asian_team_classification VARCHAR,
asian_rider_classification VARCHAR
) | SELECT COUNT(asian_team_classification) FROM table_21573750_2 WHERE asian_rider_classification = "Samai Amari" | 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 samai amari is the asian rider classification how many asian team classifications are there? ### Input: CREATE TABLE ta... |
What is the acceleration 0 100km/h (0 62mph) when the transmission is 5-speed manual? | CREATE TABLE table_63238 (
"Engine" text,
"Production" text,
"Transmission" text,
"Power" text,
"Torque" text,
"Acceleration 0\u2013100km/h (0\u201362mph)" text,
"Top Speed" text
) | SELECT "Acceleration 0\u2013100km/h (0\u201362mph)" FROM table_63238 WHERE "Transmission" = '5-speed manual' | 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 acceleration 0 100km/h (0 62mph) when the transmission is 5-speed manual? ### Input: CREATE TABLE table_63238 (
... |
What was the conference matchup in the bowl game with a $3 million payout? | CREATE TABLE table_41013 (
"Bowl Game" text,
"Date" text,
"Stadium" text,
"City" text,
"Television" text,
"Conference Matchups" text,
"Payout ( US$ )" text
) | SELECT "Conference Matchups" FROM table_41013 WHERE "Payout ( US$ )" = '$3 million' | 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 conference matchup in the bowl game with a $3 million payout? ### Input: CREATE TABLE table_41013 (
"Bowl G... |
How many figures are there for Rank 07-11 when the world ranking is 4? | CREATE TABLE table_167354_2 (
rank_07_11 VARCHAR,
world_ranking VARCHAR
) | SELECT COUNT(rank_07_11) FROM table_167354_2 WHERE world_ranking = "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: How many figures are there for Rank 07-11 when the world ranking is 4? ### Input: CREATE TABLE table_167354_2 (
rank_07_... |
who had the fastest lap for round 1? | CREATE TABLE table_29686983_1 (
fastest_lap VARCHAR,
round VARCHAR
) | SELECT fastest_lap FROM table_29686983_1 WHERE round = 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: who had the fastest lap for round 1? ### Input: CREATE TABLE table_29686983_1 (
fastest_lap VARCHAR,
round VARCHAR
)... |
How many 'k_{\mathrm{h,cc}} = \frac{c_{\mathrm{aq}}}{c_{\mathrm{gas}}}i if its 'k_{\mathrm{h,px}} = \frac{p}{x}' is 14.97 10? | CREATE TABLE table_26350 (
"equation:" text,
"k_{\\mathrm{H,pc}} = \\frac{p}{c_\\mathrm{aq}}" text,
"k_{\\mathrm{H,cp}} = \\frac{c_\\mathrm{aq}}{p}" text,
"k_{\\mathrm{H,px}} = \\frac{p}{x}" text,
"k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" text
) | SELECT COUNT("k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}") FROM table_26350 WHERE "k_{\\mathrm{H,px}} = \\frac{p}{x}" = '14.97 × 10' | 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 'k_{\mathrm{h,cc}} = \frac{c_{\mathrm{aq}}}{c_{\mathrm{gas}}}i if its 'k_{\mathrm{h,px}} = \frac{p}{x}' is 14.97 10... |
Result of l, and a Date of 15-oct-64 had what score? | CREATE TABLE table_name_45 (
score VARCHAR,
result VARCHAR,
date VARCHAR
) | SELECT score FROM table_name_45 WHERE result = "l" AND date = "15-oct-64" | 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: Result of l, and a Date of 15-oct-64 had what score? ### Input: CREATE TABLE table_name_45 (
score VARCHAR,
result V... |
Which Name has Ends of 30 june 2010, and a Nation of eng, and Since larger than 2007? | CREATE TABLE table_name_2 (
name VARCHAR,
since VARCHAR,
ends VARCHAR,
nat VARCHAR
) | SELECT name FROM table_name_2 WHERE ends = "30 june 2010" AND nat = "eng" AND since > 2007 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Name has Ends of 30 june 2010, and a Nation of eng, and Since larger than 2007? ### Input: CREATE TABLE table_name_2 (... |
TeX.SX \\ corruption (tabs) with edit link. | CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name tex... | SELECT p.Id AS "post_link", 'site://posts/' + CAST(p.Id AS TEXT) + '/edit|' + 'Edit' AS "edit_link", p.CreationDate FROM Posts AS p WHERE ((REPLACE(REPLACE(p.Body, '\\', ''), CHAR(9), 'X') LIKE '%\X%')) ORDER BY p.CreationDate 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: TeX.SX \\ corruption (tabs) with edit link. ### Input: CREATE TABLE Badges (
Id number,
UserId number,
Name text... |
What is the pseudoknot prediction of the software named tfold? | CREATE TABLE table_name_65 (
_ VARCHAR,
knots_knots VARCHAR,
name VARCHAR
) | SELECT knots_knots AS :_pseudoknot_prediction, _ FROM table_name_65 WHERE name = "tfold" | 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 pseudoknot prediction of the software named tfold? ### Input: CREATE TABLE table_name_65 (
_ VARCHAR,
kn... |
has any sennosides-docusate sodium 8.6-50 mg po tabs been prescribed to patient 017-88691 since 137 months ago? | 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 treatment (
treat... | 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 = '017-88691')) AND medication.drugname = 'sennosides-docusate sodium 8.6-50 ... | 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 any sennosides-docusate sodium 8.6-50 mg po tabs been prescribed to patient 017-88691 since 137 months ago? ### Input: C... |
how many times is the building type residential and the locale yashodham? | CREATE TABLE table_13716 (
"Sr No" real,
"Name" text,
"Locale" text,
"Height" text,
"Floors" real,
"Building Type" text
) | SELECT COUNT("Sr No") FROM table_13716 WHERE "Building Type" = 'residential' AND "Locale" = 'yashodham' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times is the building type residential and the locale yashodham? ### Input: CREATE TABLE table_13716 (
"Sr No" ... |
what is the venue when the score is 10-0 on 1997-06-22? | CREATE TABLE table_name_15 (
venue VARCHAR,
score VARCHAR,
date VARCHAR
) | SELECT venue FROM table_name_15 WHERE score = "10-0" AND date = "1997-06-22" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the venue when the score is 10-0 on 1997-06-22? ### Input: CREATE TABLE table_name_15 (
venue VARCHAR,
score... |
What was the standing in the season that the pct% was 0.769? | CREATE TABLE table_2110959_1 (
standing VARCHAR,
pct__percentage VARCHAR
) | SELECT standing FROM table_2110959_1 WHERE pct__percentage = "0.769" | 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 standing in the season that the pct% was 0.769? ### Input: CREATE TABLE table_2110959_1 (
standing VARCHAR,... |
If the games won are 5, what is the best winning average? | CREATE TABLE table_27533947_1 (
best_winning_average VARCHAR,
games_won VARCHAR
) | SELECT best_winning_average FROM table_27533947_1 WHERE games_won = 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: If the games won are 5, what is the best winning average? ### Input: CREATE TABLE table_27533947_1 (
best_winning_averag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.