instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
How many entries are there for class when the prior experience is shasta h.s.
CREATE TABLE table_1007 ( "Player" text, "Position" text, "Games started" text, "Hometown" text, "Height" text, "Weight" real, "Class" text, "Prior experience" text )
SELECT COUNT("Class") FROM table_1007 WHERE "Prior experience" = 'Shasta H.S.'
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 entries are there for class when the prior experience is shasta h.s. ### Input: CREATE TABLE table_1007 ( "Play...
Who is the opponent for week 10?
CREATE TABLE table_name_17 ( opponent VARCHAR, week VARCHAR )
SELECT opponent FROM table_name_17 WHERE week = 10
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the opponent for week 10? ### Input: CREATE TABLE table_name_17 ( opponent VARCHAR, week VARCHAR ) ### Respon...
How many Malaysia Cups have a total less than 0?
CREATE TABLE table_7162 ( "Player" text, "League" real, "Malaysia Cup" real, "FA Cup" real, "Total" real )
SELECT COUNT("Malaysia Cup") FROM table_7162 WHERE "Total" < '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: How many Malaysia Cups have a total less than 0? ### Input: CREATE TABLE table_7162 ( "Player" text, "League" real, ...
What was the percentage of muslims during a time where there were 614 registered mosques?
CREATE TABLE table_1532779_1 ( muslim___percentage_of_total_population_ VARCHAR, registered_mosques VARCHAR )
SELECT muslim___percentage_of_total_population_ FROM table_1532779_1 WHERE registered_mosques = 614
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 percentage of muslims during a time where there were 614 registered mosques? ### Input: CREATE TABLE table_1532...
What result occurs when the round is 4 leg 2?
CREATE TABLE table_57188 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
SELECT "Result" FROM table_57188 WHERE "Round" = '4 leg 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 result occurs when the round is 4 leg 2? ### Input: CREATE TABLE table_57188 ( "Round" text, "Date" text, "...
What is the full name of course MCDB 501 ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, ...
SELECT DISTINCT name FROM course WHERE department = 'MCDB' AND number = 501
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 full name of course MCDB 501 ? ### Input: CREATE TABLE course_prerequisite ( pre_course_id int, course_i...
Which is the highest year that has 3 points?
CREATE TABLE table_14953 ( "Year" real, "Chassis" text, "Engine(s)" text, "Tyres" text, "Points" real )
SELECT MAX("Year") FROM table_14953 WHERE "Points" = '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: Which is the highest year that has 3 points? ### Input: CREATE TABLE table_14953 ( "Year" real, "Chassis" text, ...
How long is the ko (punch) fight against scott smith?
CREATE TABLE table_name_78 ( time VARCHAR, method VARCHAR, opponent VARCHAR )
SELECT time FROM table_name_78 WHERE method = "ko (punch)" AND opponent = "scott smith"
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 long is the ko (punch) fight against scott smith? ### Input: CREATE TABLE table_name_78 ( time VARCHAR, method V...
what's the aggregate where 1st leg is 3 2
CREATE TABLE table_72102 ( "Season" text, "Competition" text, "Round" text, "Opponents" text, "1st leg" text, "2nd leg" text, "Aggregate" text )
SELECT "Aggregate" FROM table_72102 WHERE "1st leg" = '3–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's the aggregate where 1st leg is 3 2 ### Input: CREATE TABLE table_72102 ( "Season" text, "Competition" text, ...
How many episodes had rating/share (18-49) of 0.7/2 and a rating of 2.1?
CREATE TABLE table_28086 ( "Episode Number" real, "Episode" text, "Rating" text, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" text, "Rank (Timeslot)" real, "Rank (Night)" real )
SELECT COUNT("Episode Number") FROM table_28086 WHERE "Rating/Share (18-49)" = '0.7/2' AND "Rating" = '2.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: How many episodes had rating/share (18-49) of 0.7/2 and a rating of 2.1? ### Input: CREATE TABLE table_28086 ( "Episode ...
What is the height of the home with stories greater than 22 and built in 2009?
CREATE TABLE table_6936 ( "Name" text, "Stories" real, "Height" text, "Built" text, "Purpose" text, "Status" text )
SELECT "Height" FROM table_6936 WHERE "Stories" > '22' AND "Built" = '2009'
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 height of the home with stories greater than 22 and built in 2009? ### Input: CREATE TABLE table_6936 ( "Nam...
Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0?
CREATE TABLE table_name_31 ( player VARCHAR, league_cup VARCHAR, total VARCHAR, scottish_cup VARCHAR )
SELECT player FROM table_name_31 WHERE total < 4 AND scottish_cup = 0 AND league_cup > 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0? ### Input: CREATE TABLE ta...
What is the xDSL for the other of 0.6% and FTTx of 35.4%?
CREATE TABLE table_name_1 ( xdsl VARCHAR, other VARCHAR, fttx VARCHAR )
SELECT xdsl FROM table_name_1 WHERE other = "0.6%" AND fttx = "35.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 xDSL for the other of 0.6% and FTTx of 35.4%? ### Input: CREATE TABLE table_name_1 ( xdsl VARCHAR, other...
How many ties does Walsall have?
CREATE TABLE table_name_97 ( tie_no VARCHAR, away_team VARCHAR )
SELECT tie_no FROM table_name_97 WHERE away_team = "walsall"
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 ties does Walsall have? ### Input: CREATE TABLE table_name_97 ( tie_no VARCHAR, away_team VARCHAR ) ### Res...
What is the date of the zolder circuit, which had a.z.k./roc-comp tition a.z.k./roc-comp tition as the winning team?
CREATE TABLE table_name_53 ( date VARCHAR, winning_team VARCHAR, circuit VARCHAR )
SELECT date FROM table_name_53 WHERE winning_team = "a.z.k./roc-compétition a.z.k./roc-compétition" AND circuit = "zolder"
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 of the zolder circuit, which had a.z.k./roc-comp tition a.z.k./roc-comp tition as the winning team? ### Inp...
what film grossed the most money .
CREATE TABLE table_203_762 ( id number, "#" number, "date" text, "film" text, "gross" text, "notes" text )
SELECT "film" FROM table_203_762 GROUP BY "film" ORDER BY SUM("gross") 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: what film grossed the most money . ### Input: CREATE TABLE table_203_762 ( id number, "#" number, "date" text, ...
A bar chart about how many faculty members do we have for each faculty rank?, and display Y in descending order.
CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), ...
SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank 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: A bar chart about how many faculty members do we have for each faculty rank?, and display Y in descending order. ### Input: ...
What is the score for the Oregon location?
CREATE TABLE table_278 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real )
SELECT "Score" FROM table_278 WHERE "Location" = 'Oregon'
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 for the Oregon location? ### Input: CREATE TABLE table_278 ( "Date" text, "Tournament" text, "...
What percentage of questions on StackOverflow are answered by the original question poster?.
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time...
SELECT * FROM Posts AS q JOIN Posts AS a ON q.Id = a.ParentId WHERE q.PostTypeId = 1 LIMIT 100
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: What percentage of questions on StackOverflow are answered by the original question poster?. ### Input: CREATE TABLE Comment...
which is the top african nation that earns the most gdp in billions ?
CREATE TABLE table_203_296 ( id number, "country" text, "total gdp (nominal)\n(billion us$)" text, "gdp per capita\n(us$, ppp)" text, "gdp growth,\n2007-2011\n(in %)" number, "hdi" text )
SELECT "country" FROM table_203_296 ORDER BY "total gdp (nominal)\n(billion us$)" 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 the top african nation that earns the most gdp in billions ? ### Input: CREATE TABLE table_203_296 ( id number,...
let me know the birth date and gender of patient claude chipman.
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 demographic.dob, demographic.gender FROM demographic WHERE demographic.name = "Claude Chipman"
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: let me know the birth date and gender of patient claude chipman. ### Input: CREATE TABLE lab ( subject_id text, hadm...
when was the first intake time until 04/13/2105 for patient 3369?
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT inputevents_cv.charttime 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 = 3369)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2105-04-13' ORDER BY inputeven...
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: when was the first intake time until 04/13/2105 for patient 3369? ### Input: CREATE TABLE admissions ( row_id number, ...
What is the highest Ovrs, when Econ is 2.02?
CREATE TABLE table_name_20 ( ovrs INTEGER, econ VARCHAR )
SELECT MAX(ovrs) FROM table_name_20 WHERE econ = 2.02
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest Ovrs, when Econ is 2.02? ### Input: CREATE TABLE table_name_20 ( ovrs INTEGER, econ VARCHAR ) ##...
What was the average for the country with the swimsuit score of 9.57?
CREATE TABLE table_72233 ( "Country" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Average" text )
SELECT "Average" FROM table_72233 WHERE "Swimsuit" = '9.57'
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 average for the country with the swimsuit score of 9.57? ### Input: CREATE TABLE table_72233 ( "Country" te...
tell me the name of the prescription drug that patient 006-195316 was prescribed within the same day after having a vasopressors - norepinephrine <= 0.1 micrograms/kg/min procedure in 12/this year?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, ...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-195316') AND treatment.treatm...
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 name of the prescription drug that patient 006-195316 was prescribed within the same day after having a vasopres...
What is the Virtue of Temperance in Latin?
CREATE TABLE table_36363 ( "Virtue" text, "Latin" text, "Gloss" text, "(Vice)" text, "(Latin)" text )
SELECT "Latin" FROM table_36363 WHERE "Virtue" = 'temperance'
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 Virtue of Temperance in Latin? ### Input: CREATE TABLE table_36363 ( "Virtue" text, "Latin" text, "G...
which companies fly between BOSTON and OAKLAND
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE T...
SELECT DISTINCT airline.airline_code FROM airline, 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_na...
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: which companies fly between BOSTON and OAKLAND ### Input: CREATE TABLE time_zone ( time_zone_code text, time_zone_na...
flights from CHICAGO to DENVER on CO on saturday morning
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_...
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 = 'DENVER' AND date_day.day_number = 26 AND date_day.month_number = 7 AND ...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: flights from CHICAGO to DENVER on CO on saturday morning ### Input: CREATE TABLE time_interval ( period text, begin_...
How many viewers in millions did 'batting practice' get?
CREATE TABLE table_29157 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (million)" text )
SELECT "U.S. viewers (million)" FROM table_29157 WHERE "Title" = 'Batting Practice'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many viewers in millions did 'batting practice' get? ### Input: CREATE TABLE table_29157 ( "No. in series" real, ...
Top 30 SO Users from Pune. Top 30 SO Users from Pune, Maharashtra, India
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, Parent...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%surat%' OR UPPER(Location) LIKE '%SURAT%' OR Location LIKE '%surat%' AND Reputation >= 2500 ORDER BY Reputation DESC LIMIT 30
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 30 SO Users from Pune. Top 30 SO Users from Pune, Maharashtra, India ### Input: CREATE TABLE PostHistoryTypes ( Id n...
provide the number of patients whose primary disease is chest pain and year of birth is less than 2112?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.dob_year < "2112"
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 primary disease is chest pain and year of birth is less than 2112? ### Input: CREATE TA...
familial / genetic disorders of lipid metabolism
CREATE TABLE table_train_69 ( "id" int, "systolic_blood_pressure_sbp" int, "language" string, "valvular_dysfunction" bool, "heart_disease" bool, "temperature" float, "sepsis" bool, "heart_rate" int, "lipid_metabolism" bool, "organ_failure" bool, "NOUSE" float )
SELECT * FROM table_train_69 WHERE lipid_metabolism = 1
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: familial / genetic disorders of lipid metabolism ### Input: CREATE TABLE table_train_69 ( "id" int, "systolic_blood_...
what is language of subject id 8323?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT demographic.language FROM demographic WHERE demographic.subject_id = "8323"
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 language of subject id 8323? ### Input: CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_co...
What selection was the springfield olympics (nejhl)?
CREATE TABLE table_2850912_12 ( pick__number INTEGER, college_junior_club_team VARCHAR )
SELECT MAX(pick__number) FROM table_2850912_12 WHERE college_junior_club_team = "Springfield Olympics (NEJHL)"
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 selection was the springfield olympics (nejhl)? ### Input: CREATE TABLE table_2850912_12 ( pick__number INTEGER, ...
What is the highest evening gown score of the contestant from Tennessee with an interview score larger than 9.36 and an average larger than 9.75 have?
CREATE TABLE table_55521 ( "Country" text, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real )
SELECT MAX("Evening Gown") FROM table_55521 WHERE "Interview" > '9.36' AND "Country" = 'tennessee' AND "Average" > '9.75'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest evening gown score of the contestant from Tennessee with an interview score larger than 9.36 and an aver...
What is the lowest number of wins?
CREATE TABLE table_19606 ( "Year" real, "Tournaments played" real, "Cuts made" real, "Wins" real, "2nd" real, "3rd" real, "Top 10s" real, "Best finish" text, "Earnings ( $ )" real, "Money list rank" text, "Scoring average" text, "Scoring rank" text )
SELECT MIN("Wins") FROM table_19606
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 number of wins? ### Input: CREATE TABLE table_19606 ( "Year" real, "Tournaments played" real, ...
Which of the countries showed a score of 71-72=143?
CREATE TABLE table_name_8 ( country VARCHAR, score VARCHAR )
SELECT country FROM table_name_8 WHERE score = 71 - 72 = 143
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 of the countries showed a score of 71-72=143? ### Input: CREATE TABLE table_name_8 ( country VARCHAR, score VA...
For those employees who did not have any job in the past, draw a bar chart about the distribution of job_id and the sum of salary , and group by attribute job_id, I want to order from high to low by the Y please.
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 JOB_ID, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(SALARY) 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, draw a bar chart about the distribution of job_id and the sum of s...
Show the album names and ids for albums that contain tracks with unit price bigger than 1 by a bar chart, I want to order Y in descending order please.
CREATE TABLE PlaylistTrack ( PlaylistId integer, TrackId integer ) CREATE TABLE Artist ( ArtistId integer, Name varchar(120) ) CREATE TABLE Genre ( GenreId integer, Name varchar(120) ) CREATE TABLE Playlist ( PlaylistId integer, Name varchar(120) ) CREATE TABLE Customer ( Custome...
SELECT T1.Title, T1.AlbumId FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 ORDER BY T1.AlbumId 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 the album names and ids for albums that contain tracks with unit price bigger than 1 by a bar chart, I want to order Y ...
Who did Walter B. Jones, Sr. (d) succeeded in office?
CREATE TABLE table_1847180_4 ( vacator VARCHAR, successor VARCHAR )
SELECT vacator FROM table_1847180_4 WHERE successor = "Walter B. Jones, Sr. (D)"
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 did Walter B. Jones, Sr. (d) succeeded in office? ### Input: CREATE TABLE table_1847180_4 ( vacator VARCHAR, suc...
When was the away team geelong?
CREATE TABLE table_76841 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_76841 WHERE "Away team" = 'geelong'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the away team geelong? ### Input: CREATE TABLE table_76841 ( "Home team" text, "Home team score" text, ...
List total loses forh the tauras taurag team.
CREATE TABLE table_18018214_2 ( loses VARCHAR, club VARCHAR )
SELECT COUNT(loses) FROM table_18018214_2 WHERE club = "Tauras Tauragė"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List total loses forh the tauras taurag team. ### Input: CREATE TABLE table_18018214_2 ( loses VARCHAR, club VARCHAR...
Which round has the record of 5-0?
CREATE TABLE table_name_18 ( round VARCHAR, record VARCHAR )
SELECT round FROM table_name_18 WHERE record = "5-0"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which round has the record of 5-0? ### Input: CREATE TABLE table_name_18 ( round VARCHAR, record VARCHAR ) ### Respo...
What position does Syracuse's player have?
CREATE TABLE table_12165999_1 ( position VARCHAR, college VARCHAR )
SELECT position FROM table_12165999_1 WHERE college = "Syracuse"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What position does Syracuse's player have? ### Input: CREATE TABLE table_12165999_1 ( position VARCHAR, college VARC...
Which Home team has an Away team of melbourne?
CREATE TABLE table_name_54 ( home_team VARCHAR, away_team VARCHAR )
SELECT home_team FROM table_name_54 WHERE away_team = "melbourne"
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 Home team has an Away team of melbourne? ### Input: CREATE TABLE table_name_54 ( home_team VARCHAR, away_team ...
the number of times that patient 016-3407 had taken enteral water since 111 months ago.
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, ...
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-3407')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.cel...
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: the number of times that patient 016-3407 had taken enteral water since 111 months ago. ### Input: CREATE TABLE intakeoutput...
Upvotes for the Cassandra tag 2015.
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Delet...
SELECT Users.DisplayName, COUNT(*) AS UpVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId INNER JOIN Votes ON Votes.PostId = Posts.Id AND VoteTypeId = 2 INNER JOIN Users ON Users.Id = Posts.OwnerUserId WHERE Tags.Id = 34113 AND Posts.CreationDate > '201...
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: Upvotes for the Cassandra tag 2015. ### Input: CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( ...
Who was the opponent when the result was ud 12/12 and date was 1993-05-22?
CREATE TABLE table_17531 ( "Number" real, "Name" text, "Titles" text, "Date" text, "Opponent" text, "Result" text, "Defenses" real )
SELECT "Opponent" FROM table_17531 WHERE "Result" = 'UD 12/12' AND "Date" = '1993-05-22'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the opponent when the result was ud 12/12 and date was 1993-05-22? ### Input: CREATE TABLE table_17531 ( "Number...
Which Season was the Poles greater than 14?
CREATE TABLE table_name_27 ( season VARCHAR, poles INTEGER )
SELECT season FROM table_name_27 WHERE poles > 14
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 Season was the Poles greater than 14? ### Input: CREATE TABLE table_name_27 ( season VARCHAR, poles INTEGER ) ...
what was the last platelet count in patient 10624 since 03/2105?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE diagnoses_icd ( ...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10624) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'platelet count') AND STRFTIME('%y-%m', labevents.charttime) >= '2105-03' ORDER B...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the last platelet count in patient 10624 since 03/2105? ### Input: CREATE TABLE d_icd_diagnoses ( row_id number...
What is the pinyin name for the english name xin county?
CREATE TABLE table_4029 ( "English Name" text, "Simplified" text, "Traditional" text, "Pinyin" text, "Area" real, "Population" real, "Density" real )
SELECT "Pinyin" FROM table_4029 WHERE "English Name" = 'Xin County'
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 pinyin name for the english name xin county? ### Input: CREATE TABLE table_4029 ( "English Name" text, "...
what flights fly from DENVER to SAN FRANCISCO on this monday tuesday wednesday thursday and friday
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, ni...
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 AS DATE_DAY_0, date_day AS DATE_DAY_1, date_day AS DATE_DAY_2, date_day AS DATE_DAY_3, date_day AS DATE_DAY_4, days AS DAYS_0, days AS DAYS_1, days AS DAYS_2, days A...
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 flights fly from DENVER to SAN FRANCISCO on this monday tuesday wednesday thursday and friday ### Input: CREATE TABLE t...
What was the latest year that a Bardahl entrant had a Kurtis Kraft 500c chassis with no more than 0 points?
CREATE TABLE table_name_35 ( year INTEGER, points VARCHAR, chassis VARCHAR, entrant VARCHAR )
SELECT MAX(year) FROM table_name_35 WHERE chassis = "kurtis kraft 500c" AND entrant = "bardahl" AND points < 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the latest year that a Bardahl entrant had a Kurtis Kraft 500c chassis with no more than 0 points? ### Input: CREAT...
how many patients until 2104 were prescribed dextrose 50% within 2 months after diagnosis of acute respiratory failure?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1 JOIN (SELECT patient...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients until 2104 were prescribed dextrose 50% within 2 months after diagnosis of acute respiratory failure? ### ...
count the number of patients whose days of hospital stay is greater than 2 and procedure icd9 code is 9744?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "2" AND procedures.icd9_code = "9744"
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 2 and procedure icd9 code is 9744? ### Input: CREAT...
What is the Rank of the player with 158 Goals in more than 362 Matches?
CREATE TABLE table_75931 ( "Rank" real, "Name" text, "Years" text, "Matches" real, "Goals" real )
SELECT COUNT("Rank") FROM table_75931 WHERE "Goals" = '158' AND "Matches" > '362'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Rank of the player with 158 Goals in more than 362 Matches? ### Input: CREATE TABLE table_75931 ( "Rank" rea...
What was the domestic box office for 'House on Haunted Hill'?
CREATE TABLE table_24724 ( "Year" real, "Film" text, "Budget" text, "Domestic Box Office" text, "Foreign Box Office" text, "Total" text, "US DVD sales" text, "Total (with DVD sales)" text )
SELECT "Domestic Box Office" FROM table_24724 WHERE "Film" = 'House on Haunted Hill'
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 domestic box office for 'House on Haunted Hill'? ### Input: CREATE TABLE table_24724 ( "Year" real, "Fi...
What is the number of gt1 winning team for rnd 5?
CREATE TABLE table_431 ( "Rnd" real, "Circuit" text, "CA Winning Team" text, "GT1 Winning Team" text, "GT2 Winning Team" text, "GT3 Winning Team" text, "Results" text )
SELECT COUNT("GT1 Winning Team") FROM table_431 WHERE "Rnd" = '5'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the number of gt1 winning team for rnd 5? ### Input: CREATE TABLE table_431 ( "Rnd" real, "Circuit" text, ...
When stuttgart is the town what is the type?
CREATE TABLE table_2803662_3 ( type VARCHAR, town VARCHAR )
SELECT type FROM table_2803662_3 WHERE town = "Stuttgart"
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 stuttgart is the town what is the type? ### Input: CREATE TABLE table_2803662_3 ( type VARCHAR, town VARCHAR ) ...
indicate the daily maximum amount of sao2 for patient 23858 since 05/20/2103.
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number...
SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23858)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sao2...
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: indicate the daily maximum amount of sao2 for patient 23858 since 05/20/2103. ### Input: CREATE TABLE prescriptions ( ro...
What is the Team with a Machine that is nsr250 and has Points of 8?
CREATE TABLE table_43182 ( "Year" real, "Class" text, "Team" text, "Machine" text, "Points" real, "Wins" real )
SELECT "Team" FROM table_43182 WHERE "Machine" = 'nsr250' AND "Points" = '8'
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 Team with a Machine that is nsr250 and has Points of 8? ### Input: CREATE TABLE table_43182 ( "Year" real, ...
What is the report for Challenge Stadium?
CREATE TABLE table_name_29 ( report VARCHAR, venue VARCHAR )
SELECT report FROM table_name_29 WHERE venue = "challenge 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 is the report for Challenge Stadium? ### Input: CREATE TABLE table_name_29 ( report VARCHAR, venue VARCHAR ) ##...
what is the maximum season with byu-uu score being 20 17 byu #19
CREATE TABLE table_13665809_2 ( season INTEGER, byu_uu_score VARCHAR )
SELECT MAX(season) FROM table_13665809_2 WHERE byu_uu_score = "20–17 BYU #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 is the maximum season with byu-uu score being 20 17 byu #19 ### Input: CREATE TABLE table_13665809_2 ( season INTEG...
What's the sum of total where the rank is over 9 and the gold is less than 1?
CREATE TABLE table_name_58 ( total VARCHAR, rank VARCHAR, gold VARCHAR )
SELECT COUNT(total) FROM table_name_58 WHERE rank > 9 AND gold < 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: What's the sum of total where the rank is over 9 and the gold is less than 1? ### Input: CREATE TABLE table_name_58 ( to...
How many people had high rebounds in game 14?
CREATE TABLE table_28220778_21 ( high_rebounds VARCHAR, game VARCHAR )
SELECT COUNT(high_rebounds) FROM table_28220778_21 WHERE game = 14
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 people had high rebounds in game 14? ### Input: CREATE TABLE table_28220778_21 ( high_rebounds VARCHAR, gam...
What score has October 31 as the date?
CREATE TABLE table_name_18 ( score VARCHAR, date VARCHAR )
SELECT score FROM table_name_18 WHERE date = "october 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: What score has October 31 as the date? ### Input: CREATE TABLE table_name_18 ( score VARCHAR, date VARCHAR ) ### Res...
What is the Time/Retired of Carlos Reutemann who was driving a brabham - Alfa Romeo?
CREATE TABLE table_77888 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Time/Retired" FROM table_77888 WHERE "Constructor" = 'brabham - alfa romeo' AND "Driver" = 'carlos reutemann'
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/Retired of Carlos Reutemann who was driving a brabham - Alfa Romeo? ### Input: CREATE TABLE table_77888 ( ...
What is the away team's score when the home team scores 18.12 (120)?
CREATE TABLE table_4820 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team" FROM table_4820 WHERE "Home team score" = '18.12 (120)'
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 away team's score when the home team scores 18.12 (120)? ### Input: CREATE TABLE table_4820 ( "Home team" te...
Look for my old votes. Only find my favorites
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnon...
SELECT Title, Body, PostId AS "post_link" FROM Votes JOIN VoteTypes ON VoteTypeId = VoteTypes.Id JOIN Posts ON PostId = Posts.Id WHERE UserId = '##UserId##'
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: Look for my old votes. Only find my favorites ### Input: CREATE TABLE SuggestedEdits ( Id number, PostId number, ...
A bar chart shows the distribution of Name and Weight , and list by the Y-axis in descending.
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 real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Name, Weight FROM people ORDER BY Weight 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 Name and Weight , and list by the Y-axis in descending. ### Input: CREATE TABLE candid...
Which Games is the lowest one that has a Number of 98?
CREATE TABLE table_name_88 ( games INTEGER, number VARCHAR )
SELECT MIN(games) AS ↑ FROM table_name_88 WHERE number = 98
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 Games is the lowest one that has a Number of 98? ### Input: CREATE TABLE table_name_88 ( games INTEGER, number...
type ii diabetes, depression, bmi < 44 ,ages between 21 _ 65 and female
CREATE TABLE table_dev_42 ( "id" int, "gender" string, "depression" bool, "familial_hypercholesterolemia" bool, "microalbuminuria" int, "renal_disease" bool, "diabetic" string, "estimated_glomerular_filtration_rate_egfr" int, "serum_creatinine" float, "fbg" int, "body_mass_in...
SELECT * FROM table_dev_42 WHERE diabetic = 'ii' AND depression = 1 AND body_mass_index_bmi < 44 AND (age >= 21 AND age <= 65) AND gender = 'female'
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: type ii diabetes, depression, bmi < 44 ,ages between 21 _ 65 and female ### Input: CREATE TABLE table_dev_42 ( "id" int,...
Name the most kirdistan list for diyala
CREATE TABLE table_24440361_1 ( total_kurdistan_list INTEGER, governorate VARCHAR )
SELECT MAX(total_kurdistan_list) FROM table_24440361_1 WHERE governorate = "Diyala"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the most kirdistan list for diyala ### Input: CREATE TABLE table_24440361_1 ( total_kurdistan_list INTEGER, gov...
Which series # had 0.645 U.S. viewers(millions)?
CREATE TABLE table_26808178_3 ( series__number INTEGER, us_viewers__millions_ VARCHAR )
SELECT MAX(series__number) FROM table_26808178_3 WHERE us_viewers__millions_ = "0.645"
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 series # had 0.645 U.S. viewers(millions)? ### Input: CREATE TABLE table_26808178_3 ( series__number INTEGER, ...
For all employees who have the letters D or S in their first name, find hire_date and the average of department_id bin hire_date by time, and visualize them by a bar chart.
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 HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
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, find hire_date and the average of department_id bin hire_...
For each distinct product name, show its average product price, and show by the the average of product price from low to high.
CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Customer_Orders ( Order_ID INTEGER, Customer_ID INTEGER, Store_ID INTEGER, Order_Date DATETIME, Planned_Delivery_Date DATETIME, Actual_Delivery_Date DATETIME, Other_Order_Details VARCHAR(255) ) CRE...
SELECT Product_Name, AVG(Product_Price) FROM Products GROUP BY Product_Name ORDER BY AVG(Product_Price)
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 distinct product name, show its average product price, and show by the the average of product price from low to hig...
Find the number of the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties?, rank X from high to low order.
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE election ( ...
SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY Comptroller DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties?...
Name the classes offered in the next 6 semesters .
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 ta ( campus_job_id int, student_id int, location varchar ) CREATE TAB...
SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se...
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: Name the classes offered in the next 6 semesters . ### Input: CREATE TABLE student_record ( student_id int, course_i...
Who published Weird War Tales?
CREATE TABLE table_name_13 ( publisher VARCHAR, title VARCHAR )
SELECT publisher FROM table_name_13 WHERE title = "weird war tales"
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 published Weird War Tales? ### Input: CREATE TABLE table_name_13 ( publisher VARCHAR, title VARCHAR ) ### Respon...
What method had a record 12-2-3?
CREATE TABLE table_name_87 ( method VARCHAR, record VARCHAR )
SELECT method FROM table_name_87 WHERE record = "12-2-3"
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 method had a record 12-2-3? ### Input: CREATE TABLE table_name_87 ( method VARCHAR, record VARCHAR ) ### Respon...
what is the date when the site is memorial stadium minneapolis, mn, and the Attendance is 53,192?
CREATE TABLE table_77123 ( "Date" text, "Opponent#" text, "Site" text, "Result" text, "Attendance" text )
SELECT "Date" FROM table_77123 WHERE "Site" = 'memorial stadium • minneapolis, mn' AND "Attendance" = '53,192'
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 when the site is memorial stadium minneapolis, mn, and the Attendance is 53,192? ### Input: CREATE TABLE ta...
Which away team scored 12.18 (90)?
CREATE TABLE table_78499 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team" FROM table_78499 WHERE "Away team score" = '12.18 (90)'
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 away team scored 12.18 (90)? ### Input: CREATE TABLE table_78499 ( "Home team" text, "Home team score" text, ...
what number of patients diagnosed with left femur fracture had procedure under procedure icd9 code 8848?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "LEFT FEMUR FRACTURE" AND procedures.icd9_code = "8848"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what number of patients diagnosed with left femur fracture had procedure under procedure icd9 code 8848? ### Input: CREATE T...
Bar graph to show the total number from different payment method code, order in descending by the y-axis.
CREATE TABLE Customers ( customer_id INTEGER, payment_method_code VARCHAR(10), customer_code VARCHAR(20), customer_name VARCHAR(80), customer_address VARCHAR(255), customer_phone VARCHAR(80), customer_email VARCHAR(80) ) CREATE TABLE Department_Store_Chain ( dept_store_chain_id INTEGER,...
SELECT payment_method_code, COUNT(*) FROM Customers GROUP BY payment_method_code ORDER BY COUNT(*) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Bar graph to show the total number from different payment method code, order in descending by the y-axis. ### Input: CREATE ...
What is the difference associated with more than 2 losses and more than 1 point?
CREATE TABLE table_6421 ( "Games" real, "Drawn" real, "Lost" real, "Points difference" text, "Points" real )
SELECT "Points difference" FROM table_6421 WHERE "Lost" > '2' AND "Points" > '1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the difference associated with more than 2 losses and more than 1 point? ### Input: CREATE TABLE table_6421 ( "G...
Show the id and star rating of each hotel, ordered by its price from low to high by a scatter chart.
CREATE TABLE Ref_Hotel_Star_Ratings ( star_rating_code CHAR(15), star_rating_description VARCHAR(80) ) CREATE TABLE Theme_Parks ( Theme_Park_ID INTEGER, Theme_Park_Details VARCHAR(255) ) CREATE TABLE Shops ( Shop_ID INTEGER, Shop_Details VARCHAR(255) ) CREATE TABLE Visits ( Visit_ID INTEG...
SELECT hotel_id, star_rating_code FROM Hotels ORDER BY price_range
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 id and star rating of each hotel, ordered by its price from low to high by a scatter chart. ### Input: CREATE TABLE...
Who directed the episode titled 'Smells Like Teen Sellout'?
CREATE TABLE table_22122 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" real, "Viewers (millions)" text )
SELECT "Directed by" FROM table_22122 WHERE "Title" = 'Smells Like Teen Sellout'
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 directed the episode titled 'Smells Like Teen Sellout'? ### Input: CREATE TABLE table_22122 ( "No. in series" real, ...
What tournement was held in Helsinki, Finland in 2005?
CREATE TABLE table_name_8 ( event VARCHAR, venue VARCHAR )
SELECT event FROM table_name_8 WHERE venue = "helsinki, finland"
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 tournement was held in Helsinki, Finland in 2005? ### Input: CREATE TABLE table_name_8 ( event VARCHAR, venue V...
how many days have passed since patient 92788 had an admission to the hospital?
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 92788 AND admissions.dischtime 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 days have passed since patient 92788 had an admission to the hospital? ### Input: CREATE TABLE admissions ( row...
Which state has a Percent (2009) of 6.2%?
CREATE TABLE table_51965 ( "State" text, "Norwegian Americans (2000)" real, "Percent (2000)" text, "Norwegian Americans (2009)" real, "Percent (2009)" text )
SELECT "State" FROM table_51965 WHERE "Percent (2009)" = '6.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: Which state has a Percent (2009) of 6.2%? ### Input: CREATE TABLE table_51965 ( "State" text, "Norwegian Americans (...
How many laps did Dick Rathmann complete when he ranked 14?
CREATE TABLE table_name_51 ( laps VARCHAR, rank VARCHAR )
SELECT laps FROM table_name_51 WHERE rank = "14"
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 laps did Dick Rathmann complete when he ranked 14? ### Input: CREATE TABLE table_name_51 ( laps VARCHAR, ra...
If the school is Central Colleges of the Philippines CCP Bobcats, what is the stunts number?
CREATE TABLE table_21995420_9 ( stunts VARCHAR, school VARCHAR )
SELECT stunts FROM table_21995420_9 WHERE school = "Central Colleges of the Philippines CCP Bobcats"
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 school is Central Colleges of the Philippines CCP Bobcats, what is the stunts number? ### Input: CREATE TABLE table_2...
how many canton with commune being waldbillig
CREATE TABLE table_1417184_1 ( canton VARCHAR, commune VARCHAR )
SELECT COUNT(canton) FROM table_1417184_1 WHERE commune = "Waldbillig"
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 canton with commune being waldbillig ### Input: CREATE TABLE table_1417184_1 ( canton VARCHAR, commune VARC...
Which abandoned tags only have a single tagged post?.
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId n...
SELECT TagName FROM Tags WHERE Count = 1 AND ExcerptPostId IS NULL AND WikiPostId IS NULL ORDER BY Id
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: Which abandoned tags only have a single tagged post?. ### Input: CREATE TABLE ReviewRejectionReasons ( Id number, Na...
What is the Story Title that has Albers as the Letterer?
CREATE TABLE table_name_60 ( story_title VARCHAR, letterer_s VARCHAR )
SELECT story_title FROM table_name_60 WHERE letterer_s = "albers"
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 Story Title that has Albers as the Letterer? ### Input: CREATE TABLE table_name_60 ( story_title VARCHAR, ...
i'm interested in round trip flights from BOSTON to WASHINGTON
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE...
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, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND NOT fare.round_trip_cost IS NULL AND flight_fare.fare_...
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'm interested in round trip flights from BOSTON to WASHINGTON ### Input: CREATE TABLE state ( state_code text, stat...
how many patients whose primary disease is ruq pain stayed in the hospital for more than 15 days?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.days_stay > "15"
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 primary disease is ruq pain stayed in the hospital for more than 15 days? ### Input: CREATE TABLE pr...
What is part 1 of the verb in class 7b
CREATE TABLE table_1745843_10 ( part_1 VARCHAR, class VARCHAR )
SELECT part_1 FROM table_1745843_10 WHERE class = "7b"
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 part 1 of the verb in class 7b ### Input: CREATE TABLE table_1745843_10 ( part_1 VARCHAR, class VARCHAR ) ##...
Which Date has an Attendance larger than 51,338, and an Opponent of manchester united?
CREATE TABLE table_59828 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
SELECT "Date" FROM table_59828 WHERE "Attendance" > '51,338' AND "Opponent" = 'manchester united'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Date has an Attendance larger than 51,338, and an Opponent of manchester united? ### Input: CREATE TABLE table_59828 (...
What percentage of browsers were using Opera in October 2010?
CREATE TABLE table_name_53 ( opera VARCHAR, date VARCHAR )
SELECT opera FROM table_name_53 WHERE date = "october 2010"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What percentage of browsers were using Opera in October 2010? ### Input: CREATE TABLE table_name_53 ( opera VARCHAR, ...