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 was the number of patients that were discharged from hospital until 2100? | 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 COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) <= '2100' | 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 number of patients that were discharged from hospital until 2100? ### Input: CREATE TABLE vitalperiodic (
v... |
What was the home score when the away team scored 16.11 (107)? | CREATE TABLE table_57838 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_57838 WHERE "Away team score" = '16.11 (107)' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the home score when the away team scored 16.11 (107)? ### Input: CREATE TABLE table_57838 (
"Home team" text,
... |
What is the lowest rank (night) for having viewers (millions) 5.25? | CREATE TABLE table_16579 (
"#" real,
"Episode" text,
"Rating" text,
"Share" real,
"Rating/Share (18-49)" text,
"Viewers (millions)" text,
"Rank (timeslot)" real,
"Rank (night)" real,
"Rank (week)" text
) | SELECT MIN("Rank (night)") FROM table_16579 WHERE "Viewers (millions)" = '5.25' | 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 rank (night) for having viewers (millions) 5.25? ### Input: CREATE TABLE table_16579 (
"#" real,
... |
Which Year is the highest one that has a Reg Season of 3rd, western, and a Division larger than 2? | CREATE TABLE table_name_30 (
year INTEGER,
reg_season VARCHAR,
division VARCHAR
) | SELECT MAX(year) FROM table_name_30 WHERE reg_season = "3rd, western" AND division > 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: Which Year is the highest one that has a Reg Season of 3rd, western, and a Division larger than 2? ### Input: CREATE TABLE t... |
what are the flights between MEMPHIS and CINCINNATI on wednesday | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE days (
days_code varchar,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND date_day.day_number = 23 AND date_day.month_number = 4 AN... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the flights between MEMPHIS and CINCINNATI on wednesday ### Input: CREATE TABLE date_day (
month_number int,
... |
What's the average round for the OT position from tulane college with an overall over 38? | CREATE TABLE table_9931 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT AVG("Round") FROM table_9931 WHERE "Position" = 'ot' AND "College" = 'tulane' AND "Overall" > '38' | 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 average round for the OT position from tulane college with an overall over 38? ### Input: CREATE TABLE table_9931... |
what are the four most commonly prescribed drugs that were prescribed to male patients in their 50s in the same hospital encounter after they were diagnosed with tobacco use disorder in 2105? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the four most commonly prescribed drugs that were prescribed to male patients in their 50s in the same hospital enc... |
The score in the final is 2 6, 6 2, 6 0, on what surface? | CREATE TABLE table_73921 (
"Outcome" text,
"No." text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | SELECT "Surface" FROM table_73921 WHERE "Score in the final" = '2–6, 6–2, 6–0' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The score in the final is 2 6, 6 2, 6 0, on what surface? ### Input: CREATE TABLE table_73921 (
"Outcome" text,
"No.... |
What is Tournament, when Week is November 23? | CREATE TABLE table_46640 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winners" text,
"Finalists" text,
"Semifinalists" text
) | SELECT "Tournament" FROM table_46640 WHERE "Week" = 'november 23' | 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 Tournament, when Week is November 23? ### Input: CREATE TABLE table_46640 (
"Tournament" text,
"Surface" tex... |
What is the Location of the 'My Pacific' Theme? | CREATE TABLE table_63502 (
"Iteration" text,
"Year" real,
"Dates" text,
"Location" text,
"Theme" text
) | SELECT "Location" FROM table_63502 WHERE "Theme" = 'my pacific' | 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 of the 'My Pacific' Theme? ### Input: CREATE TABLE table_63502 (
"Iteration" text,
"Year" real,... |
Show student ids who don't have any sports. | CREATE TABLE Sportsinfo (
StuID VARCHAR
)
CREATE TABLE Student (
StuID VARCHAR
) | SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show student ids who don't have any sports. ### Input: CREATE TABLE Sportsinfo (
StuID VARCHAR
)
CREATE TABLE Student (... |
What tournament location has south korea as the country? | CREATE TABLE table_46089 (
"Year" real,
"Dates" text,
"Champion" text,
"Country" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Tournament location" text,
"Purse ( $ )" text,
"Winner's share ($)" text
) | SELECT "Tournament location" FROM table_46089 WHERE "Country" = 'south korea' | 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 tournament location has south korea as the country? ### Input: CREATE TABLE table_46089 (
"Year" real,
"Dates" ... |
What is the crystal structure for the formula yba 2 cu 3 o 7? | CREATE TABLE table_15972 (
"Formula" text,
"Notation" text,
"T c (K)" real,
"No. of Cu-O planes in unit cell" real,
"Crystal structure" text
) | SELECT "Crystal structure" FROM table_15972 WHERE "Formula" = 'YBa 2 Cu 3 O 7' | 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 crystal structure for the formula yba 2 cu 3 o 7? ### Input: CREATE TABLE table_15972 (
"Formula" text,
... |
what is the smallest aircraft available flying from PITTSBURGH to BALTIMORE arriving on 5 7 | CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, equipment_sequence, flight WHERE (((((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time) ... | 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: what is the smallest aircraft available flying from PITTSBURGH to BALTIMORE arriving on 5 7 ### Input: CREATE TABLE restrict... |
Give the number of patients whose marital status is married and were admitted before the year 2194. | 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 WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2194" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give the number of patients whose marital status is married and were admitted before the year 2194. ### Input: CREATE TABLE ... |
What year was transamerica field built in? | CREATE TABLE table_40341 (
"Venue" text,
"Location" text,
"Capacity" text,
"Owner" text,
"Environment" text,
"Year Built" text
) | SELECT "Year Built" FROM table_40341 WHERE "Venue" = 'transamerica field' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was transamerica field built in? ### Input: CREATE TABLE table_40341 (
"Venue" text,
"Location" text,
... |
What affiliation is Erie, Pennsylvania? | CREATE TABLE table_16381914_1 (
affiliation VARCHAR,
location VARCHAR
) | SELECT affiliation FROM table_16381914_1 WHERE location = "Erie, Pennsylvania" | 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 affiliation is Erie, Pennsylvania? ### Input: CREATE TABLE table_16381914_1 (
affiliation VARCHAR,
location VAR... |
which location has the most km ? | CREATE TABLE table_204_498 (
id number,
"location" text,
"building" text,
"year" number,
"km" number,
"monument" number
) | SELECT "location" FROM table_204_498 ORDER BY "km" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which location has the most km ? ### Input: CREATE TABLE table_204_498 (
id number,
"location" text,
"building" ... |
For entries with lost larger than 21 and goals for smaller than 36, what is the average drawn? | CREATE TABLE table_name_79 (
drawn INTEGER,
goals_for VARCHAR,
lost VARCHAR
) | SELECT AVG(drawn) FROM table_name_79 WHERE goals_for < 36 AND lost > 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: For entries with lost larger than 21 and goals for smaller than 36, what is the average drawn? ### Input: CREATE TABLE table... |
How many seasons have motopark team? | CREATE TABLE table_25981 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
) | SELECT COUNT("Season") FROM table_25981 WHERE "Team" = 'Motopark' | 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 seasons have motopark team? ### Input: CREATE TABLE table_25981 (
"Season" real,
"Series" text,
"Team" ... |
What is the DuBose Porter with Roy Barnes at 54%? | CREATE TABLE table_name_16 (
dubose_porter VARCHAR,
roy_barnes VARCHAR
) | SELECT dubose_porter FROM table_name_16 WHERE roy_barnes = "54%" | 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 DuBose Porter with Roy Barnes at 54%? ### Input: CREATE TABLE table_name_16 (
dubose_porter VARCHAR,
roy... |
Percentage of closed question per tag (among the posts that were not deleted). | CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress ... | WITH closed_cte AS (SELECT t.TagName AS tag, COUNT(q.Id) AS totalcount, COUNT(q.ClosedDate) AS closedcount, ROUND(COUNT(q.ClosedDate) * 100.0 / COUNT(q.Id), 2) AS percentage FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE q.PostTypeId = 1 GROUP BY t.TagName) S... | 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: Percentage of closed question per tag (among the posts that were not deleted). ### Input: CREATE TABLE FlagTypes (
Id nu... |
For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the average of employee_id bin hire_date by time. | 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),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | 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, a bar chart shows the distribution of hire_date and the average of... |
What is the pennant for 4 may 1943? | CREATE TABLE table_462 (
"Name" text,
"Pennant" text,
"Builder" text,
"Laid Down" text,
"Launched" text,
"Commissioned" text,
"Fate" text
) | SELECT "Pennant" FROM table_462 WHERE "Laid Down" = '4 May 1943' | 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 pennant for 4 may 1943? ### Input: CREATE TABLE table_462 (
"Name" text,
"Pennant" text,
"Builder" t... |
How many districts are respresented by Alex McMillan? | CREATE TABLE table_1341522_36 (
status VARCHAR,
incumbent VARCHAR
) | SELECT COUNT(status) FROM table_1341522_36 WHERE incumbent = "Alex McMillan" | 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 districts are respresented by Alex McMillan? ### Input: CREATE TABLE table_1341522_36 (
status VARCHAR,
inc... |
What was the home team score for essendon? | CREATE TABLE table_38752 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text,
"Report" text
) | SELECT "Home team score" FROM table_38752 WHERE "Home team" = 'essendon' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the home team score for essendon? ### Input: CREATE TABLE table_38752 (
"Home team" text,
"Home team score"... |
what is date of death and admission time of subject id 15898? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT demographic.dod, demographic.admittime FROM demographic WHERE demographic.subject_id = "15898" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is date of death and admission time of subject id 15898? ### Input: CREATE TABLE procedures (
subject_id text,
... |
A bar chart shows the distribution of meter_500 and ID , list by the X-axis in descending. | CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | SELECT meter_500, ID FROM swimmer ORDER BY meter_500 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: A bar chart shows the distribution of meter_500 and ID , list by the X-axis in descending. ### Input: CREATE TABLE record (
... |
What grid features 6 laps? | CREATE TABLE table_name_53 (
grid VARCHAR,
laps VARCHAR
) | SELECT grid FROM table_name_53 WHERE laps = 6 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What grid features 6 laps? ### Input: CREATE TABLE table_name_53 (
grid VARCHAR,
laps VARCHAR
) ### Response: SELECT... |
What is every value for passing yards per game if rushing yards per game is 113.6? | CREATE TABLE table_29554 (
"Season" text,
"Points per Game" text,
"Total Yards per Game" text,
"Rushing Yards per Game" text,
"Passing Yards per Game" text,
"Sacks" text,
"Interceptions" text
) | SELECT "Passing Yards per Game" FROM table_29554 WHERE "Rushing Yards per Game" = '113.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 is every value for passing yards per game if rushing yards per game is 113.6? ### Input: CREATE TABLE table_29554 (
... |
Find the number of users who posted some tweets. | CREATE TABLE tweets (
id number,
uid number,
text text,
createdate time
)
CREATE TABLE user_profiles (
uid number,
name text,
email text,
partitionid number,
followers number
)
CREATE TABLE follows (
f1 number,
f2 number
) | SELECT COUNT(DISTINCT uid) FROM tweets | 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 number of users who posted some tweets. ### Input: CREATE TABLE tweets (
id number,
uid number,
text te... |
How was the native american executed in July 1836? | CREATE TABLE table_69979 (
"Name" text,
"Date of Execution" text,
"Crime" text,
"Method" text,
"Race" text
) | SELECT "Method" FROM table_69979 WHERE "Race" = 'native american' AND "Date of Execution" = 'july 1836' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How was the native american executed in July 1836? ### Input: CREATE TABLE table_69979 (
"Name" text,
"Date of Execu... |
what were the five most common drugs prescribed to the female patients 20s within 2 months after being diagnosed with nephritis nos in oth dis since 5 years ago? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the five most common drugs prescribed to the female patients 20s within 2 months after being diagnosed with nephri... |
For those employees who did not have any job in the past, visualize a line chart about the change of salary over hire_date , order by the x-axis from high to low please. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize a line chart about the change of salary over hire_date ,... |
what is the number of patients that sodium chloride 0.9% is prescribed to? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
pa... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'sodium chloride 0.9%') | 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 number of patients that sodium chloride 0.9% is prescribed to? ### Input: CREATE TABLE treatment (
treatment... |
What is the lowest interview of Texas, with an average larger than 9.531? | CREATE TABLE table_name_86 (
interview INTEGER,
state VARCHAR,
average VARCHAR
) | SELECT MIN(interview) FROM table_name_86 WHERE state = "texas" AND average > 9.531 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest interview of Texas, with an average larger than 9.531? ### Input: CREATE TABLE table_name_86 (
interv... |
give me the number of patients born before 2126 who are still alive. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.dob_year < "2126" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients born before 2126 who are still alive. ### Input: CREATE TABLE demographic (
subject_id te... |
What is the Median household income associated with a median family income of $46,616? | CREATE TABLE table_name_56 (
median_household_income VARCHAR,
median_family_income VARCHAR
) | SELECT median_household_income FROM table_name_56 WHERE median_family_income = "$46,616" | 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 Median household income associated with a median family income of $46,616? ### Input: CREATE TABLE table_name_56... |
how many patients are admitted before the year 2166 and followed the procedure exteriorization of small intestine? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2166" AND procedures.long_title = "Exteriorization of small intestine" | 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 are admitted before the year 2166 and followed the procedure exteriorization of small intestine? ### Input... |
Which name has a USGS Map of clear lake? | CREATE TABLE table_71533 (
"name" text,
"type" text,
"elevation" text,
"USGS Map" text,
"GNIS ID" real
) | SELECT "name" FROM table_71533 WHERE "USGS Map" = 'clear lake' | 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 name has a USGS Map of clear lake? ### Input: CREATE TABLE table_71533 (
"name" text,
"type" text,
"elevat... |
Name the total viewers on fx+ for 583,000 total viewers | CREATE TABLE table_28753 (
"Episode number (Production number)" text,
"Title" text,
"Original air date" text,
"Total viewers on FX" text,
"Total viewers on FX+" text,
"Total viewers" text,
"Rank on channel" text
) | SELECT "Total viewers on FX+" FROM table_28753 WHERE "Total viewers" = '583,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: Name the total viewers on fx+ for 583,000 total viewers ### Input: CREATE TABLE table_28753 (
"Episode number (Productio... |
Question Count or Score growth over time by tag comparison. Plots total questions over time or total score over time, comparing up to 4 tags.
Reference: http://meta.stackoverflow.com/q/260570/331508 | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
... | SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS "month", COUNT(q.Id) AS NumQuests FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE q.PostTypeId = 1 AND q.CreationDate >= '2016-01-01 00:00:00' AND t.TagName IN (@Tag1) GROUP BY DATEADD(month, DATEDI... | 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: Question Count or Score growth over time by tag comparison. Plots total questions over time or total score over time, compar... |
How many years was lynn muscarella the high school principal and charlie wiltse the superintendent? | CREATE TABLE table_73716 (
"Year" text,
"Superintendent" text,
"Middlesex Principal" text,
"Gorham Principal" text,
"Middle School Principal" text,
"High School Principal" text
) | SELECT COUNT("Year") FROM table_73716 WHERE "High School Principal" = 'Lynn Muscarella' AND "Superintendent" = 'Charlie Wiltse' | 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 years was lynn muscarella the high school principal and charlie wiltse the superintendent? ### Input: CREATE TABLE ... |
calculate the difference between patient 8016's total output and the total input on last month/23. | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT... | 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: calculate the difference between patient 8016's total output and the total input on last month/23. ### Input: CREATE TABLE i... |
Please show the trend about the number of days with max temperature reaches 80 change over dates. | CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
... | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 GROUP BY date | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Please show the trend about the number of days with max temperature reaches 80 change over dates. ### Input: CREATE TABLE st... |
provide the number of patients whose diagnoses short title is routine circumcision and drug route is ng? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Routine circumcision" AND prescriptions.route = "NG" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses short title is routine circumcision and drug route is ng? ### Input: CREATE T... |
Find the total number of students in each department Show bar chart, and I want to show in descending by the total number. | CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE prereq (
... | SELECT dept_name, COUNT(*) FROM student GROUP BY dept_name 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: Find the total number of students in each department Show bar chart, and I want to show in descending by the total number. #... |
If the rating is 9.1, what was the total viewers? | CREATE TABLE table_26323 (
"Episode number Production number" text,
"Title" text,
"Original airing" text,
"Rating" text,
"Share" real,
"Rating/share (18\u201349)" text,
"Total viewers (in millions)" text
) | SELECT "Total viewers (in millions)" FROM table_26323 WHERE "Rating" = '9.1' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: If the rating is 9.1, what was the total viewers? ### Input: CREATE TABLE table_26323 (
"Episode number Production numbe... |
What is the Status of the dinosaur, whose notes are, 'n coelurosauria'? | CREATE TABLE table_75802 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Location" text,
"Notes" text
) | SELECT "Status" FROM table_75802 WHERE "Notes" = 'n coelurosauria' | 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 Status of the dinosaur, whose notes are, 'n coelurosauria'? ### Input: CREATE TABLE table_75802 (
"Name" tex... |
What is the sum of all values in Fall 09 in Allegany county with Fall 07 less than 751? | CREATE TABLE table_5188 (
"Maryland Counties" text,
"Fall 05" real,
"Fall 06" real,
"Fall 07" real,
"Fall 08" real,
"Fall 09" real
) | SELECT SUM("Fall 09") FROM table_5188 WHERE "Maryland Counties" = 'allegany' AND "Fall 07" < '751' | 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 all values in Fall 09 in Allegany county with Fall 07 less than 751? ### Input: CREATE TABLE table_5188 (... |
among patients who were prescribed with tromethamine, what is the five most frequently prescribed drug at the same time,? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id nu... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'tromethamine') AS t1 JOIN (SELECT admissions.subject_id, prescrip... | 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: among patients who were prescribed with tromethamine, what is the five most frequently prescribed drug at the same time,? ##... |
what is the difference between the total output and the input sum of patient 19175 on 11/04/2105? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE procedures_icd (
r... | SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19175)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) = '2105-11-04') - (SELE... | 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 difference between the total output and the input sum of patient 19175 on 11/04/2105? ### Input: CREATE TABLE ou... |
What was the attendance when the Cincinnati Bengals were the opponents? | CREATE TABLE table_76804 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Attendance" FROM table_76804 WHERE "Opponent" = 'cincinnati bengals' | 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 when the Cincinnati Bengals were the opponents? ### Input: CREATE TABLE table_76804 (
"Week" rea... |
How many golds were there in a game that has 17 bronze and a total of 31? | CREATE TABLE table_51492 (
"Games" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" text,
"Rank" text
) | SELECT "Gold" FROM table_51492 WHERE "Bronze" = '17' AND "Total" = '31' | 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 golds were there in a game that has 17 bronze and a total of 31? ### Input: CREATE TABLE table_51492 (
"Games" ... |
Get the admission time and procedure icd9 code for the patient with patient id 2560. | 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 demographic ... | SELECT demographic.admittime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" | 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 the admission time and procedure icd9 code for the patient with patient id 2560. ### Input: CREATE TABLE lab (
subje... |
what are the five most commonly given microbiology tests for patients who have previously had their unilat ing hern rep nos done within 2 months until 2104? | CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dis... | 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 are the five most commonly given microbiology tests for patients who have previously had their unilat ing hern rep nos ... |
What is every value of Top 10 when team is #10 Phil Parsons Racing and average finish is 22.9? | CREATE TABLE table_3456 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
) | SELECT "Top 10" FROM table_3456 WHERE "Team(s)" = '#10 Phil Parsons Racing' AND "Avg. Finish" = '22.9' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every value of Top 10 when team is #10 Phil Parsons Racing and average finish is 22.9? ### Input: CREATE TABLE table... |
What was the score on August 19? | CREATE TABLE table_name_65 (
score VARCHAR,
date VARCHAR
) | SELECT score FROM table_name_65 WHERE date = "august 19" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the score on August 19? ### Input: CREATE TABLE table_name_65 (
score VARCHAR,
date VARCHAR
) ### Response:... |
whats the last ward id of patient 81783 during the first hospital encounter? | 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
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 81783 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime DESC LIMIT 1 | 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: whats the last ward id of patient 81783 during the first hospital encounter? ### Input: CREATE TABLE prescriptions (
row... |
What is the engine of the goodyear tire and Herdez as a sponsor? | CREATE TABLE table_name_16 (
engine VARCHAR,
tire VARCHAR,
sponsor VARCHAR
) | SELECT engine FROM table_name_16 WHERE tire = "goodyear" AND sponsor = "herdez" | 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 engine of the goodyear tire and Herdez as a sponsor? ### Input: CREATE TABLE table_name_16 (
engine VARCHAR,... |
What is the time of Troy Bayliss with less than 8 grids? | CREATE TABLE table_78578 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | SELECT "Time" FROM table_78578 WHERE "Grid" < '8' AND "Rider" = 'troy bayliss' | 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 time of Troy Bayliss with less than 8 grids? ### Input: CREATE TABLE table_78578 (
"Rider" text,
"Bike" ... |
tell me the maximum sao2 for patient 004-13127's body today? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
ic... | SELECT MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-13127')) AND NOT vitalperiodic.sao2 IS NULL AND DATET... | 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 maximum sao2 for patient 004-13127's body today? ### Input: CREATE TABLE medication (
medicationid number,
... |
What is the easiest class available that meets the Other requirement ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE cour... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_c... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the easiest class available that meets the Other requirement ? ### Input: CREATE TABLE requirement (
requirement... |
What is the Date for the Event ept copenhagen? | CREATE TABLE table_name_71 (
date VARCHAR,
event VARCHAR
) | SELECT date FROM table_name_71 WHERE event = "ept copenhagen" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Date for the Event ept copenhagen? ### Input: CREATE TABLE table_name_71 (
date VARCHAR,
event VARCHAR
)... |
When did the Chargers play the Denver Broncos before Week 10? | CREATE TABLE table_7587 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Date" FROM table_7587 WHERE "Week" < '10' AND "Opponent" = 'denver broncos' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did the Chargers play the Denver Broncos before Week 10? ### Input: CREATE TABLE table_7587 (
"Week" real,
"Dat... |
What was the result of the game played at Jeppesen Stadium? | CREATE TABLE table_name_95 (
result VARCHAR,
game_site VARCHAR
) | SELECT result FROM table_name_95 WHERE game_site = "jeppesen stadium" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result of the game played at Jeppesen Stadium? ### Input: CREATE TABLE table_name_95 (
result VARCHAR,
... |
What are id and name of the products whose price is lower than 600 or higher than 900? | CREATE TABLE staff (
staff_id number,
staff_gender text,
staff_name text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number
)
CREATE TABLE customer_addresses (
customer_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE... | SELECT product_id, product_name FROM products WHERE product_price < 600 OR product_price > 900 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are id and name of the products whose price is lower than 600 or higher than 900? ### Input: CREATE TABLE staff (
s... |
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id and the average of manager_id , and group by attribute job_id, and sort by the y axis in desc please. | 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 JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(MANAGER_ID) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id an... |
What is the official name and status of the city with the most residents? | CREATE TABLE farm_competition (
competition_id number,
year number,
theme text,
host_city_id number,
hosts text
)
CREATE TABLE competition_record (
competition_id number,
farm_id number,
rank number
)
CREATE TABLE city (
city_id number,
official_name text,
status text,
... | SELECT official_name, status FROM city ORDER BY population DESC LIMIT 1 | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the official name and status of the city with the most residents? ### Input: CREATE TABLE farm_competition (
com... |
For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday. | 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEP... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | 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, draw a bar chart about the distribution of hire_date and the sum o... |
What is the score with a place of t6 for the player k.j. choi? | CREATE TABLE table_67200 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Score" FROM table_67200 WHERE "Place" = 't6' AND "Player" = 'k.j. choi' | 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 score with a place of t6 for the player k.j. choi? ### Input: CREATE TABLE table_67200 (
"Place" text,
"... |
In the year 2000, what is the campus fee for San Francisco State University? | CREATE TABLE campuses (
id number,
campus text,
location text,
county text,
year number
)
CREATE TABLE enrollments (
campus number,
year number,
totalenrollment_ay number,
fte_ay number
)
CREATE TABLE discipline_enrollments (
campus number,
discipline number,
year numbe... | SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = "San Francisco State University" AND t1.year = 2000 | 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: In the year 2000, what is the campus fee for San Francisco State University? ### Input: CREATE TABLE campuses (
id numbe... |
Which Services have a Local authority of chiltern, and a Zone 2010 of 9? | CREATE TABLE table_75339 (
"Station" text,
"Services" text,
"Local authority" text,
"Zone 2007" text,
"Zone 2008" text,
"Zone 2010" text,
"Zone 2013" text
) | SELECT "Services" FROM table_75339 WHERE "Local authority" = 'chiltern' AND "Zone 2010" = '9' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Services have a Local authority of chiltern, and a Zone 2010 of 9? ### Input: CREATE TABLE table_75339 (
"Station"... |
which is taller , mount humphreys or mount kaweah . | CREATE TABLE table_204_25 (
id number,
"rank" number,
"mountain peak" text,
"mountain range" text,
"elevation" text,
"prominence" text,
"isolation" text,
"location" text
) | SELECT "mountain peak" FROM table_204_25 WHERE "mountain peak" IN ('mount humphreys', 'mount kaweah') ORDER BY "elevation" DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which is taller , mount humphreys or mount kaweah . ### Input: CREATE TABLE table_204_25 (
id number,
"rank" number,... |
Show all payment method codes and the number of orders for each code in a bar chart, show by the y axis from low to high please. | CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(10),
payment_method_description VARCHAR(80)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL... | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code 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: Show all payment method codes and the number of orders for each code in a bar chart, show by the y axis from low to high ple... |
What Place has a Player of tony jacklin? | CREATE TABLE table_name_28 (
place VARCHAR,
player VARCHAR
) | SELECT place FROM table_name_28 WHERE player = "tony jacklin" | 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 Place has a Player of tony jacklin? ### Input: CREATE TABLE table_name_28 (
place VARCHAR,
player VARCHAR
) ###... |
When was petter ronnquist picked? | CREATE TABLE table_name_49 (
overall VARCHAR,
player VARCHAR
) | SELECT overall FROM table_name_49 WHERE player = "petter ronnquist" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was petter ronnquist picked? ### Input: CREATE TABLE table_name_49 (
overall VARCHAR,
player VARCHAR
) ### Resp... |
tell me the total number of patients in the 508 wards since 2102? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 508 AND STRFTIME('%y', patient.unitadmittime) >= '2102' | 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 total number of patients in the 508 wards since 2102? ### Input: CREATE TABLE diagnosis (
diagnosisid number... |
What is the Home team with a crowd relevant to footscray? | CREATE TABLE table_55855 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Crowd" FROM table_55855 WHERE "Home team" = 'footscray' | 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 Home team with a crowd relevant to footscray? ### Input: CREATE TABLE table_55855 (
"Home team" text,
"H... |
What was the final score when the game was @ roughriders? | CREATE TABLE table_24603 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
) | SELECT "Final Score" FROM table_24603 WHERE "Opponent" = '@ Roughriders' | 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 final score when the game was @ roughriders? ### Input: CREATE TABLE table_24603 (
"Week" real,
"Date" ... |
Which ring names are currently ranked f0 j ry 3 west? | CREATE TABLE table_1557974_1 (
ring_name VARCHAR,
current_rank VARCHAR
) | SELECT ring_name FROM table_1557974_1 WHERE current_rank = "f0 Jūryō 3 West" | 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 ring names are currently ranked f0 j ry 3 west? ### Input: CREATE TABLE table_1557974_1 (
ring_name VARCHAR,
c... |
How many stadiums does each country have Show bar chart, and rank by the Y-axis in descending. | CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
... | SELECT Country, COUNT(*) FROM stadium GROUP BY Country ORDER BY COUNT(*) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many stadiums does each country have Show bar chart, and rank by the Y-axis in descending. ### Input: CREATE TABLE stadi... |
Tag associated with 'homework' tag. | 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(*), at.TagName FROM PostTags AS a JOIN PostTags AS b ON (a.PostId = b.PostId) JOIN Tags AS at ON (a.TagId = at.Id) JOIN Tags AS bt ON (b.TagId = bt.Id) WHERE bt.TagName = 'homework' AND at.TagName != 'homework' GROUP BY at.TagName ORDER BY 1 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: Tag associated with 'homework' tag. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
CreationDate t... |
What is the overall sum of round 3? | CREATE TABLE table_44162 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT SUM("Overall") FROM table_44162 WHERE "Round" = '3' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the overall sum of round 3? ### Input: CREATE TABLE table_44162 (
"Round" real,
"Pick" real,
"Overall" r... |
Which Run 4 has a Run 1 of 1:25.82? | CREATE TABLE table_77471 (
"Team" text,
"Athletes" text,
"Run 1" text,
"Run 2" text,
"Run 3" text,
"Run 4" text,
"Final" text
) | SELECT "Run 4" FROM table_77471 WHERE "Run 1" = '1:25.82' | 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 Run 4 has a Run 1 of 1:25.82? ### Input: CREATE TABLE table_77471 (
"Team" text,
"Athletes" text,
"Run 1" ... |
Of the players whose lead began at the australian championships, what was the shortest span of years led? | CREATE TABLE table_23408094_14 (
span_of_years_led INTEGER,
tournament_at_which_lead_began VARCHAR
) | SELECT MIN(span_of_years_led) FROM table_23408094_14 WHERE tournament_at_which_lead_began = "Australian Championships" | 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: Of the players whose lead began at the australian championships, what was the shortest span of years led? ### Input: CREATE ... |
head trauma with a glasgow come score ( gcs ) less or equal to 5 | CREATE TABLE table_train_63 (
"id" int,
"immune_suppression" bool,
"leukocyte_count" int,
"need_hemodialysis" bool,
"head_injury" bool,
"periodic_paralysis" bool,
"renal_disease" bool,
"glasgow_come_score_gcs" int,
"sepsis" bool,
"pancreatitis" bool,
"enteral_feeding" bool,
... | SELECT * FROM table_train_63 WHERE head_injury = 1 AND glasgow_come_score_gcs <= 5 | 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: head trauma with a glasgow come score ( gcs ) less or equal to 5 ### Input: CREATE TABLE table_train_63 (
"id" int,
... |
which division were they in the most ? | CREATE TABLE table_204_524 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
) | SELECT "division" FROM table_204_524 GROUP BY "division" ORDER BY COUNT(*) DESC LIMIT 1 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which division were they in the most ? ### Input: CREATE TABLE table_204_524 (
id number,
"season" text,
"tier" ... |
what is the name of the movie where mischa barton plays the role of ms. monica ? | CREATE TABLE table_200_1 (
id number,
"year" number,
"title" text,
"role" text,
"notes" text
) | SELECT "title" FROM table_200_1 WHERE "role" = 'ms. monica' | 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 name of the movie where mischa barton plays the role of ms. monica ? ### Input: CREATE TABLE table_200_1 (
i... |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of headquarter and the average of manufacturer , and group by attribute headquarter. | 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 Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, a bar chart shows the distribution of headquarter and t... |
For which production company did Sam Mccarthy produce? | CREATE TABLE table_name_61 (
production_company VARCHAR,
producer_s_ VARCHAR
) | SELECT production_company FROM table_name_61 WHERE producer_s_ = "sam mccarthy" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For which production company did Sam Mccarthy produce? ### Input: CREATE TABLE table_name_61 (
production_company VARCHA... |
Return a bar chart about the distribution of login_name and author_id . | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password... | SELECT login_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a bar chart about the distribution of login_name and author_id . ### Input: CREATE TABLE Courses (
course_id INTE... |
how many teams won at golf when wooster won soccer | CREATE TABLE table_16423070_4 (
golf VARCHAR,
soccer VARCHAR
) | SELECT COUNT(golf) FROM table_16423070_4 WHERE soccer = "Wooster" | 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 teams won at golf when wooster won soccer ### Input: CREATE TABLE table_16423070_4 (
golf VARCHAR,
soccer V... |
Which round was Tom Morris picked in? | CREATE TABLE table_78540 (
"Round" real,
"Pick" text,
"Player" text,
"Position" text,
"School" text
) | SELECT COUNT("Round") FROM table_78540 WHERE "Player" = 'tom morris' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which round was Tom Morris picked in? ### Input: CREATE TABLE table_78540 (
"Round" real,
"Pick" text,
"Player" ... |
Which capital has a Hangul of ? | CREATE TABLE table_75904 (
"RR Romaja" text,
"M\u2013R Romaja" text,
"Hangul/Chosongul" text,
"Hanja" text,
"Area" text,
"Capital" text,
"Region" text,
"Country" text
) | SELECT "Capital" FROM table_75904 WHERE "Hangul/Chosongul" = '경상남도' | 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 capital has a Hangul of ? ### Input: CREATE TABLE table_75904 (
"RR Romaja" text,
"M\u2013R Romaja" text,
... |
what is the name of the movement in the 7th position | CREATE TABLE table_29697744_1 (
movements VARCHAR,
position VARCHAR
) | SELECT movements FROM table_29697744_1 WHERE position = "7th" | 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 name of the movement in the 7th position ### Input: CREATE TABLE table_29697744_1 (
movements VARCHAR,
p... |
Show the number of documents in different ending date and group by ending date with a line chart. | CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Descri... | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Date_in_Locaton_To | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of documents in different ending date and group by ending date with a line chart. ### Input: CREATE TABLE Re... |
Who was second for the United States team? | CREATE TABLE table_name_35 (
second VARCHAR,
nation VARCHAR
) | SELECT second FROM table_name_35 WHERE nation = "united states" | 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 second for the United States team? ### Input: CREATE TABLE table_name_35 (
second VARCHAR,
nation VARCHAR
) ... |
please find all the flights from CINCINNATI to any airport in the NEW YORK area that arrive next saturday before 1800 | CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((((((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time) AND date_day.day_number = 26 AND da... | 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: please find all the flights from CINCINNATI to any airport in the NEW YORK area that arrive next saturday before 1800 ### In... |
How many times is the original artist Alicia keys? | CREATE TABLE table_28484 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | SELECT COUNT("Result") FROM table_28484 WHERE "Original artist" = 'Alicia Keys' | 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 original artist Alicia keys? ### Input: CREATE TABLE table_28484 (
"Week #" text,
"Theme" text... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.