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 MLB draft has Shaun Boyd?
CREATE TABLE table_name_80 ( mlb_draft VARCHAR, player VARCHAR )
SELECT mlb_draft FROM table_name_80 WHERE player = "shaun boyd"
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 MLB draft has Shaun Boyd? ### Input: CREATE TABLE table_name_80 ( mlb_draft VARCHAR, player VARCHAR ) ### Respo...
Name the date for game 9
CREATE TABLE table_16710829_2 ( date VARCHAR, game VARCHAR )
SELECT date FROM table_16710829_2 WHERE game = 9
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 date for game 9 ### Input: CREATE TABLE table_16710829_2 ( date VARCHAR, game VARCHAR ) ### Response: SELEC...
Does the university offer MDE or PreMajor classes for the Summer term ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT course.department, course.name, course.number, program_course.category FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category IN ('MDE', 'PreMajor') AND program_course.course_id = course.course_id AND semester.semester = 'Sum...
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: Does the university offer MDE or PreMajor classes for the Summer term ? ### Input: CREATE TABLE course_offering ( offeri...
What opponent has euro '84 qualifying as the type and split as the city?
CREATE TABLE table_name_54 ( opponent VARCHAR, type_of_game VARCHAR, city VARCHAR )
SELECT opponent FROM table_name_54 WHERE type_of_game = "euro '84 qualifying" AND city = "split"
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 opponent has euro '84 qualifying as the type and split as the city? ### Input: CREATE TABLE table_name_54 ( opponen...
What is glenferrie oval's home team?
CREATE TABLE table_53191 ( "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_53191 WHERE "Venue" = 'glenferrie oval'
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 glenferrie oval's home team? ### Input: CREATE TABLE table_53191 ( "Home team" text, "Home team score" text,...
what is the shortest song from the album ?
CREATE TABLE table_203_37 ( id number, "#" number, "title" text, "producer(s)" text, "performer(s)" text, "length" text )
SELECT "title" FROM table_203_37 ORDER BY "length" 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 is the shortest song from the album ? ### Input: CREATE TABLE table_203_37 ( id number, "#" number, "title"...
List all those first elected in the California 22 voting district.
CREATE TABLE table_1342149_6 ( first_elected VARCHAR, district VARCHAR )
SELECT first_elected FROM table_1342149_6 WHERE district = "California 22"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List all those first elected in the California 22 voting district. ### Input: CREATE TABLE table_1342149_6 ( first_elect...
Which ICAO's city is Manchester?
CREATE TABLE table_name_96 ( icao VARCHAR, city VARCHAR )
SELECT icao FROM table_name_96 WHERE city = "manchester"
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 ICAO's city is Manchester? ### Input: CREATE TABLE table_name_96 ( icao VARCHAR, city VARCHAR ) ### Response: ...
Return a histogram on what are the nationalities and the total ages of journalists?, I want to rank X from low to high order please.
CREATE TABLE journalist ( journalist_ID int, Name text, Nationality text, Age text, Years_working int ) CREATE TABLE event ( Event_ID int, Date text, Venue text, Name text, Event_Attendance int ) CREATE TABLE news_report ( journalist_ID int, Event_ID int, Work_Type ...
SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality ORDER BY Nationality
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 histogram on what are the nationalities and the total ages of journalists?, I want to rank X from low to high order...
Visualize a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality, could you sort in asc by the X-axis?
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) 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_20...
SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY Nationality
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationali...
When there are 10.02 million viewers what is the rating (18-49)?
CREATE TABLE table_30901 ( "Episode" real, "First Air Date" text, "Rating (18\u201349)" text, "Share (18\u201349)" real, "Viewers (millions)" text, "Rank (timeslot)" text )
SELECT "Rating (18\u201349)" FROM table_30901 WHERE "Viewers (millions)" = '10.02'
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 there are 10.02 million viewers what is the rating (18-49)? ### Input: CREATE TABLE table_30901 ( "Episode" real, ...
What score(s) were recorded on april 28?
CREATE TABLE table_1625 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Score" FROM table_1625 WHERE "Date" = 'April 28'
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 score(s) were recorded on april 28? ### Input: CREATE TABLE table_1625 ( "Game" real, "Date" text, "Team" t...
What are the years when the grizzlies had a point guard who attended the school/club Florida?
CREATE TABLE table_46622 ( "Player" text, "Nationality" text, "Position" text, "Years for Grizzlies" text, "School/Club Team" text )
SELECT "Years for Grizzlies" FROM table_46622 WHERE "Position" = 'point guard' AND "School/Club Team" = 'florida'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the years when the grizzlies had a point guard who attended the school/club Florida? ### Input: CREATE TABLE table_...
how many patients speak cape language and their addmission location is clinic referral/premature?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.admission_location = "CLINIC REFERRAL/PREMATURE"
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 speak cape language and their addmission location is clinic referral/premature? ### Input: CREATE TABLE la...
what is other names when death is may 23, 1821?
CREATE TABLE table_name_36 ( other_names VARCHAR, death VARCHAR )
SELECT other_names FROM table_name_36 WHERE death = "may 23, 1821"
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 other names when death is may 23, 1821? ### Input: CREATE TABLE table_name_36 ( other_names VARCHAR, death V...
what is discharge time of subject id 18480?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT demographic.dischtime FROM demographic WHERE demographic.subject_id = "18480"
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 discharge time of subject id 18480? ### Input: CREATE TABLE lab ( subject_id text, hadm_id text, itemid ...
Who is the Winnning driver in which lorenzo bandini has the fastest lap as well as the Pole position?
CREATE TABLE table_name_21 ( winning_driver VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR )
SELECT winning_driver FROM table_name_21 WHERE fastest_lap = "lorenzo bandini" AND pole_position = "lorenzo bandini"
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 Winnning driver in which lorenzo bandini has the fastest lap as well as the Pole position? ### Input: CREATE TABL...
how many patients aged less than 85 years were admitted to the hospital before 2190?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "85" AND demographic.admityear < "2190"
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 aged less than 85 years were admitted to the hospital before 2190? ### Input: CREATE TABLE diagnoses ( ...
what is primary disease and diagnoses long title of subject name betty campbell?
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 demographic.diagnosis, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Betty Campbell"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is primary disease and diagnoses long title of subject name betty campbell? ### Input: CREATE TABLE prescriptions ( ...
When the FIS Nordic World Ski Championships was 1962, 1964 what was the Holmenkollen?
CREATE TABLE table_name_58 ( holmenkollen VARCHAR, fis_nordic_world_ski_championships VARCHAR )
SELECT holmenkollen FROM table_name_58 WHERE fis_nordic_world_ski_championships = "1962, 1964"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When the FIS Nordic World Ski Championships was 1962, 1964 what was the Holmenkollen? ### Input: CREATE TABLE table_name_58 ...
What is the party for District Georgia 9?
CREATE TABLE table_1341598_11 ( party VARCHAR, district VARCHAR )
SELECT party FROM table_1341598_11 WHERE district = "Georgia 9"
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 party for District Georgia 9? ### Input: CREATE TABLE table_1341598_11 ( party VARCHAR, district VARCHAR...
Which To par has a Score of 78-74-71-75=298?
CREATE TABLE table_name_52 ( to_par INTEGER, score VARCHAR )
SELECT AVG(to_par) FROM table_name_52 WHERE score = 78 - 74 - 71 - 75 = 298
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 To par has a Score of 78-74-71-75=298? ### Input: CREATE TABLE table_name_52 ( to_par INTEGER, score VARCHAR )...
What is the location when the new york jets lost earlier than 1997 and a Result of 31 28?
CREATE TABLE table_name_20 ( location VARCHAR, result VARCHAR, loser VARCHAR, year VARCHAR )
SELECT location FROM table_name_20 WHERE loser = "new york jets" AND year < 1997 AND result = "31–28"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the location when the new york jets lost earlier than 1997 and a Result of 31 28? ### Input: CREATE TABLE table_name...
What is the total kills of the perpetrators with height more than 1.84.
CREATE TABLE perpetrator ( Killed INTEGER, People_ID VARCHAR ) CREATE TABLE people ( People_ID VARCHAR, Height INTEGER )
SELECT SUM(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total kills of the perpetrators with height more than 1.84. ### Input: CREATE TABLE perpetrator ( Killed INT...
What is the latest first year with 0 total medals and over 0 golds?
CREATE TABLE table_name_5 ( first INTEGER, total VARCHAR, gold VARCHAR )
SELECT MAX(first) FROM table_name_5 WHERE total > 0 AND gold > 0
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the latest first year with 0 total medals and over 0 golds? ### Input: CREATE TABLE table_name_5 ( first INTEGER...
what were the total number of times 4th was listed as a result in this chart ?
CREATE TABLE table_203_300 ( id number, "year" number, "tournament" text, "venue" text, "result" text, "extra" text )
SELECT COUNT(*) FROM table_203_300 WHERE "result" = 4
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 were the total number of times 4th was listed as a result in this chart ? ### Input: CREATE TABLE table_203_300 ( i...
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by weekday.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE T...
SELECT HIRE_DATE, AVG(EMPLOYEE_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, return a bar chart about the distribution of hire_date an...
Where did Jack Badcock play?
CREATE TABLE table_name_22 ( venue VARCHAR, player VARCHAR )
SELECT venue FROM table_name_22 WHERE player = "jack badcock"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Where did Jack Badcock play? ### Input: CREATE TABLE table_name_22 ( venue VARCHAR, player VARCHAR ) ### Response: S...
Who directed the episode titled 'the advocate'?
CREATE TABLE table_21635 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT "Directed by" FROM table_21635 WHERE "Title" = 'The Advocate'
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 'the advocate'? ### Input: CREATE TABLE table_21635 ( "Series #" real, "Season #" re...
Who is the January playmate with a March playmate Alexandria Karlsen?
CREATE TABLE table_name_59 ( january VARCHAR, march VARCHAR )
SELECT january FROM table_name_59 WHERE march = "alexandria karlsen"
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 January playmate with a March playmate Alexandria Karlsen? ### Input: CREATE TABLE table_name_59 ( january VA...
Which points classification shares a general classification of Bernard Hinault, a Trofeo Fast Tem of Bianchi, was won by Urs Freuler, and was stage 4?
CREATE TABLE table_name_7 ( points_classification VARCHAR, stage VARCHAR, winner VARCHAR, general_classification VARCHAR, trofeo_fast_team VARCHAR )
SELECT points_classification FROM table_name_7 WHERE general_classification = "bernard hinault" AND trofeo_fast_team = "bianchi" AND winner = "urs freuler" AND stage = "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: Which points classification shares a general classification of Bernard Hinault, a Trofeo Fast Tem of Bianchi, was won by Urs...
Name the score in the final for january 12, 2013
CREATE TABLE table_name_63 ( score_in_the_final VARCHAR, date VARCHAR )
SELECT score_in_the_final FROM table_name_63 WHERE date = "january 12, 2013"
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 score in the final for january 12, 2013 ### Input: CREATE TABLE table_name_63 ( score_in_the_final VARCHAR, ...
Which game number was played at Chicago Stadium?
CREATE TABLE table_name_63 ( game VARCHAR, location VARCHAR )
SELECT game FROM table_name_63 WHERE location = "chicago 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: Which game number was played at Chicago Stadium? ### Input: CREATE TABLE table_name_63 ( game VARCHAR, location VARC...
What day was king's cup 1996?
CREATE TABLE table_name_49 ( date VARCHAR, competition VARCHAR )
SELECT date FROM table_name_49 WHERE competition = "king's cup 1996"
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 day was king's cup 1996? ### Input: CREATE TABLE table_name_49 ( date VARCHAR, competition VARCHAR ) ### Respon...
How many partners were there when the score was 7 6 (7 4) , 6 3?
CREATE TABLE table_2186447_1 ( partner VARCHAR, score VARCHAR )
SELECT COUNT(partner) FROM table_2186447_1 WHERE score = "7–6 (7–4) , 6–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: How many partners were there when the score was 7 6 (7 4) , 6 3? ### Input: CREATE TABLE table_2186447_1 ( partner VARCH...
serum creatinine <= 1.8 mg / dl
CREATE TABLE table_dev_35 ( "id" int, "white_blood_cell_count_wbc" int, "platelets" int, "neutrophil_count" int, "serum_creatinine" float, "albumin" float, "NOUSE" float )
SELECT * FROM table_dev_35 WHERE serum_creatinine <= 1.8
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: serum creatinine <= 1.8 mg / dl ### Input: CREATE TABLE table_dev_35 ( "id" int, "white_blood_cell_count_wbc" int, ...
What days held has 1 as the reign with eden black as the wrestlers?
CREATE TABLE table_name_2 ( days_held VARCHAR, reign VARCHAR, wrestlers VARCHAR )
SELECT days_held FROM table_name_2 WHERE reign = "1" AND wrestlers = "eden black"
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 days held has 1 as the reign with eden black as the wrestlers? ### Input: CREATE TABLE table_name_2 ( days_held VAR...
how many patients were diagnosed with myalgia and myositis nos in the same hospital visit during this year after being diagnosed with hemorrhage complic proc before?
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE c...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title =...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients were diagnosed with myalgia and myositis nos in the same hospital visit during this year after being diagn...
What is Place, when Score is '66', when Country is 'United States', and when Player is 'Dudley Hart'?
CREATE TABLE table_name_84 ( place VARCHAR, player VARCHAR, score VARCHAR, country VARCHAR )
SELECT place FROM table_name_84 WHERE score = 66 AND country = "united states" AND player = "dudley hart"
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 Place, when Score is '66', when Country is 'United States', and when Player is 'Dudley Hart'? ### Input: CREATE TABL...
How many tries have goals greater than 0?
CREATE TABLE table_63410 ( "Year" text, "Matches" real, "Tries" real, "Goals" real, "Points" real )
SELECT SUM("Tries") FROM table_63410 WHERE "Goals" > '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 tries have goals greater than 0? ### Input: CREATE TABLE table_63410 ( "Year" text, "Matches" real, "Tr...
What is the score in the final with a hard surface and is against Hiromi Nagano?
CREATE TABLE table_60757 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
SELECT "Score in the final" FROM table_60757 WHERE "Surface" = 'hard' AND "Opponent in the final" = 'hiromi nagano'
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 in the final with a hard surface and is against Hiromi Nagano? ### Input: CREATE TABLE table_60757 ( "...
Show all member names who are not in charge of any event.
CREATE TABLE party_events ( member_in_charge_id VARCHAR ) CREATE TABLE member ( member_name VARCHAR )
SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id
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 all member names who are not in charge of any event. ### Input: CREATE TABLE party_events ( member_in_charge_id VAR...
How many colleges in total?
CREATE TABLE College ( Id VARCHAR )
SELECT COUNT(*) FROM College
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 colleges in total? ### Input: CREATE TABLE College ( Id VARCHAR ) ### Response: SELECT COUNT(*) FROM College
What is the earliest round drafted for a University of Southern California player?
CREATE TABLE table_71194 ( "Round" real, "Name" text, "Position" text, "School" text, "Signed" text )
SELECT MIN("Round") FROM table_71194 WHERE "School" = 'university of southern california'
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 earliest round drafted for a University of Southern California player? ### Input: CREATE TABLE table_71194 ( ...
What is the lowest to par of the player with a t3 place and less than $1,500?
CREATE TABLE table_44864 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real, "Money ( $ )" real )
SELECT MIN("To par") FROM table_44864 WHERE "Place" = 't3' AND "Money ( $ )" < '1,500'
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 to par of the player with a t3 place and less than $1,500? ### Input: CREATE TABLE table_44864 ( "Pla...
Return me a bar chart to show the frequency of the year attribute by binning into a weekday interval, and I want to display Y-axis in asc order.
CREATE TABLE appearances ( year INTEGER, team_id TEXT, league_id TEXT, player_id TEXT, g_all NUMERIC, gs NUMERIC, g_batting INTEGER, g_defense NUMERIC, g_p INTEGER, g_c INTEGER, g_1b INTEGER, g_2b INTEGER, g_3b INTEGER, g_ss INTEGER, g_lf INTEGER, g_cf INT...
SELECT year, COUNT(year) FROM home_game ORDER BY COUNT(year)
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 me a bar chart to show the frequency of the year attribute by binning into a weekday interval, and I want to display ...
How many actors from China have acted in ' Rush Hour 3
CREATE TABLE company ( id int, name text, country_code varchar ) CREATE TABLE movie ( mid int, title text, release_year int, title_aka text, budget text ) CREATE TABLE genre ( gid int, genre text ) CREATE TABLE actor ( aid int, gender text, name text, nationali...
SELECT COUNT(DISTINCT (actor.name)) FROM actor, cast, movie WHERE actor.nationality = 'China' AND cast.aid = actor.aid AND movie.mid = cast.msid AND movie.title = 'Rush Hour 3'
imdb
Below are sql tables 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 actors from China have acted in ' Rush Hour 3 ### Input: CREATE TABLE company ( id int, name text, coun...
what was the name of the prescription drug patient 012-85821 was prescribed during the same day after having received a vte prophylaxis - coumadin procedure in 04/2102?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( la...
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 = '012-85821') AND treatment.treatme...
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 name of the prescription drug patient 012-85821 was prescribed during the same day after having received a vte ...
Who was the centerfold model in the issue where Fergie answered the '20 questions'?
CREATE TABLE table_72697 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text )
SELECT "Centerfold model" FROM table_72697 WHERE "20 Questions" = 'Fergie'
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 centerfold model in the issue where Fergie answered the '20 questions'? ### Input: CREATE TABLE table_72697 ( ...
What is the time in Romania that has a lane larger than 4?
CREATE TABLE table_name_4 ( time VARCHAR, lane VARCHAR, nationality VARCHAR )
SELECT time FROM table_name_4 WHERE lane > 4 AND nationality = "romania"
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 time in Romania that has a lane larger than 4? ### Input: CREATE TABLE table_name_4 ( time VARCHAR, lane...
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of phone_number and commission_pct , list in asc by the Y-axis 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 PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT
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 do not work in departments with managers that have ids between 100 and 200, a bar chart shows the di...
Which school has a quarterback?
CREATE TABLE table_name_94 ( school VARCHAR, position VARCHAR )
SELECT school FROM table_name_94 WHERE position = "quarterback"
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 school has a quarterback? ### Input: CREATE TABLE table_name_94 ( school VARCHAR, position VARCHAR ) ### Respo...
What were Holly Scouler's total votes?
CREATE TABLE table_79369 ( "Members" text, "Teammate" text, "Couples Team" text, "Status" text, "Total Votes" text )
SELECT "Total Votes" FROM table_79369 WHERE "Members" = 'holly scouler'
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 were Holly Scouler's total votes? ### Input: CREATE TABLE table_79369 ( "Members" text, "Teammate" text, "C...
At the upper level , what number of classes are there that have labs ?
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational...
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_lab = 'Y' AND program_course.category LIKE '%ULCS%'
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: At the upper level , what number of classes are there that have labs ? ### Input: CREATE TABLE area ( course_id int, ...
how many days has it been since patient 1561 last received an intake of lactated ringers on the current intensive care unit visit?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE prescription...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = 1561) AND icustays.outtime IS NULL) A...
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 has it been since patient 1561 last received an intake of lactated ringers on the current intensive care unit ...
Show the sum of account details for different statement details in a bar chart, and I want to list by the bar in desc.
CREATE TABLE Projects ( Project_ID INTEGER, Project_Details VARCHAR(255) ) CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(25...
SELECT Statement_Details, SUM(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY Statement_Details 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 sum of account details for different statement details in a bar chart, and I want to list by the bar in desc. ### I...
patient 010-36899 was prescribed senokot-s tab since 10/2104?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid numb...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-36899')) AND medication.drugname = 'senokot-s tab' AND STRFTIME('%y-%m...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: patient 010-36899 was prescribed senokot-s tab since 10/2104? ### Input: CREATE TABLE microlab ( microlabid number, ...
What was the speed for the rider with a time of 1:14.15.64?
CREATE TABLE table_79548 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
SELECT "Speed" FROM table_79548 WHERE "Time" = '1:14.15.64'
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 speed for the rider with a time of 1:14.15.64? ### Input: CREATE TABLE table_79548 ( "Rank" real, "Ride...
What is the round when the match was against sergis kyratzis?
CREATE TABLE table_9621 ( "Edition" text, "Round" text, "Date" text, "Against" text, "Surface" text, "Opponent" text, "Result" text )
SELECT "Round" FROM table_9621 WHERE "Opponent" = 'sergis kyratzis'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the round when the match was against sergis kyratzis? ### Input: CREATE TABLE table_9621 ( "Edition" text, "...
what is the minimum cost of the entire hospital that involves the sodium, body fluid?
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium, body fluid')) GROUP BY cost.hadm_id) AS t1
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the minimum cost of the entire hospital that involves the sodium, body fluid? ### Input: CREATE TABLE prescriptions ...
in how many indy 500 races , has jones been flagged ?
CREATE TABLE table_203_339 ( id number, "year" text, "car" number, "start" number, "qual" number, "rank" number, "finish" number, "laps" number, "led" number, "retired" text )
SELECT COUNT(*) FROM table_203_339 WHERE "retired" = 'flagged'
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: in how many indy 500 races , has jones been flagged ? ### Input: CREATE TABLE table_203_339 ( id number, "year" text...
I want a bar chart to show the total cloud cover of the dates that have the 5 highest cloud cover rates each year, and I want to display in asc by the total number.
CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE trip ( id INTEGER, d...
SELECT date, SUM(cloud_cover) FROM weather ORDER BY SUM(cloud_cover)
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: I want a bar chart to show the total cloud cover of the dates that have the 5 highest cloud cover rates each year, and I wan...
The person with a rank of 8 moving to Shakhtar Donetsk was moving from what Ukrainian Football Club as a transfer?
CREATE TABLE table_66762 ( "Rank" real, "Year" real, "Name" text, "Moving from" text, "Moving to" text )
SELECT "Moving from" FROM table_66762 WHERE "Moving to" = 'shakhtar donetsk' AND "Rank" = '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: The person with a rank of 8 moving to Shakhtar Donetsk was moving from what Ukrainian Football Club as a transfer? ### Input...
in total, count the number of patients who have been prescribed dicloxacillin until 3 years ago.
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( row_id number, subject_id num...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'dicloxacillin' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-3 year'))
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: in total, count the number of patients who have been prescribed dicloxacillin until 3 years ago. ### Input: CREATE TABLE d_i...
what player went to ul-monroe
CREATE TABLE table_6516 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School" text )
SELECT "Player" FROM table_6516 WHERE "School" = 'ul-monroe'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what player went to ul-monroe ### Input: CREATE TABLE table_6516 ( "Round" real, "Pick" real, "Player" text, ...
What was the sum of ranks of those called Fernando Cavenaghi who appeared less than 7.
CREATE TABLE table_31898 ( "Rank" real, "Name" text, "Team" text, "Goals" real, "Appearances" real )
SELECT SUM("Rank") FROM table_31898 WHERE "Name" = 'fernando cavenaghi' AND "Appearances" < '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 was the sum of ranks of those called Fernando Cavenaghi who appeared less than 7. ### Input: CREATE TABLE table_31898 (...
when did patient 83225 for the first time come to hospital in 2104?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 83225 AND STRFTIME('%y', admissions.admittime) = '2104' ORDER BY admissions.admittime 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: when did patient 83225 for the first time come to hospital in 2104? ### Input: CREATE TABLE cost ( row_id number, su...
Name the circuit for gt3 alex mortimer bradley ellis
CREATE TABLE table_19400 ( "Round" real, "Circuit" text, "Date" text, "Length" text, "Pole Position" text, "GT3 Winner" text, "GT4 Winner" text )
SELECT "Circuit" FROM table_19400 WHERE "GT3 Winner" = 'Alex Mortimer Bradley Ellis'
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 circuit for gt3 alex mortimer bradley ellis ### Input: CREATE TABLE table_19400 ( "Round" real, "Circuit" t...
What year featured lola motorsport as an entrant with over 0 points?
CREATE TABLE table_name_44 ( year INTEGER, entrant VARCHAR, points VARCHAR )
SELECT AVG(year) FROM table_name_44 WHERE entrant = "lola motorsport" 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 year featured lola motorsport as an entrant with over 0 points? ### Input: CREATE TABLE table_name_44 ( year INTEGE...
What is the average value for ERP W when frequency is more than 100.1?
CREATE TABLE table_name_6 ( erp_w INTEGER, frequency_mhz INTEGER )
SELECT AVG(erp_w) FROM table_name_6 WHERE frequency_mhz > 100.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 is the average value for ERP W when frequency is more than 100.1? ### Input: CREATE TABLE table_name_6 ( erp_w INTE...
Name the lowest Founded with the Name cougars?
CREATE TABLE table_47948 ( "Institution" text, "Location" text, "Founded" real, "Affiliation" text, "Nickname" text )
SELECT MIN("Founded") FROM table_47948 WHERE "Nickname" = 'cougars'
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 lowest Founded with the Name cougars? ### Input: CREATE TABLE table_47948 ( "Institution" text, "Location" ...
How many laps were completed in grid 18?
CREATE TABLE table_name_20 ( laps INTEGER, grid VARCHAR )
SELECT SUM(laps) FROM table_name_20 WHERE grid = 18
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many laps were completed in grid 18? ### Input: CREATE TABLE table_name_20 ( laps INTEGER, grid VARCHAR ) ### Re...
Who is the owner of the radio station that plays adult hits?
CREATE TABLE table_name_8 ( owner VARCHAR, format VARCHAR )
SELECT owner FROM table_name_8 WHERE format = "adult hits"
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 owner of the radio station that plays adult hits? ### Input: CREATE TABLE table_name_8 ( owner VARCHAR, f...
What is the names for the medalist in the sport of canoeing?
CREATE TABLE table_name_25 ( name VARCHAR, sport VARCHAR )
SELECT name FROM table_name_25 WHERE sport = "canoeing"
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 names for the medalist in the sport of canoeing? ### Input: CREATE TABLE table_name_25 ( name VARCHAR, s...
What was the startup year for the project with apache energy/inpex as the operator?
CREATE TABLE table_5928 ( "Country" text, "Project Name" text, "Year startup" text, "Operator" text, "Peak" text )
SELECT "Year startup" FROM table_5928 WHERE "Operator" = 'apache energy/inpex'
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 startup year for the project with apache energy/inpex as the operator? ### Input: CREATE TABLE table_5928 ( ...
how many gaming consoles in total were nfl blitz released for ?
CREATE TABLE table_203_272 ( id number, "title" text, "release" text, "consoles" text, "handheld" text, "pc" text, "arcade" text )
SELECT COUNT(DISTINCT "consoles") FROM table_203_272
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many gaming consoles in total were nfl blitz released for ? ### Input: CREATE TABLE table_203_272 ( id number, "...
Find All_Neutral and Team_ID , and visualize them by a bar chart, and show by the Y in asc.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Neutral, Team_ID FROM basketball_match ORDER BY Team_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find All_Neutral and Team_ID , and visualize them by a bar chart, and show by the Y in asc. ### Input: CREATE TABLE universi...
For those records from the products and each product's manufacturer, show me about the distribution of name and the average of manufacturer , and group by attribute name in a bar chart, show in desc by the Y-axis please.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, show me about the distribution of name and the average ...
What was Diego Saraiva's record when he fought for 3 rounds against danny suarez?
CREATE TABLE table_name_75 ( record VARCHAR, round VARCHAR, opponent VARCHAR )
SELECT record FROM table_name_75 WHERE round = "3" AND opponent = "danny suarez"
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 Diego Saraiva's record when he fought for 3 rounds against danny suarez? ### Input: CREATE TABLE table_name_75 ( ...
Callsign of 6nan has what purpose?
CREATE TABLE table_name_34 ( purpose VARCHAR, callsign VARCHAR )
SELECT purpose FROM table_name_34 WHERE callsign = "6nan"
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: Callsign of 6nan has what purpose? ### Input: CREATE TABLE table_name_34 ( purpose VARCHAR, callsign VARCHAR ) ### R...
report the number of patients with newborn primary disease who have abnormal lab test status.
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.flag = "abnormal"
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: report the number of patients with newborn primary disease who have abnormal lab test status. ### Input: CREATE TABLE lab ( ...
who does chasins author with ?
CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, ...
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'chasins' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
scholar
Below are sql tables 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 does chasins author with ? ### Input: CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE author...
Who scored the most rebounds in the game against Chicago?
CREATE TABLE table_20350 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "High rebounds" FROM table_20350 WHERE "Team" = 'Chicago'
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 scored the most rebounds in the game against Chicago? ### Input: CREATE TABLE table_20350 ( "Game" real, "Date" ...
What are the first names of all students in Smith Hall, and count them by a pie chart
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Student ( StuID INTEGE...
SELECT Fname, COUNT(Fname) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' GROUP BY Fname
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the first names of all students in Smith Hall, and count them by a pie chart ### Input: CREATE TABLE Lives_in ( ...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the average of salary bin hire_date by weekday, and rank mean salary from low to high order please.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL v...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(SALARY)
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, a bar chart shows the distribution of hire_date and the a...
Name the school that was founded in 1950
CREATE TABLE table_23201 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" text )
SELECT "Institution" FROM table_23201 WHERE "Founded" = '1950'
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 school that was founded in 1950 ### Input: CREATE TABLE table_23201 ( "Institution" text, "Location" text, ...
what were the top three most common diagnoses until 2104?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, a...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 3
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 were the top three most common diagnoses until 2104? ### Input: CREATE TABLE medication ( medicationid number, ...
What's the Nationality of Round 8 Vancouver Canucks NHL Team of Swift Current Broncos (WHL)?
CREATE TABLE table_name_12 ( nationality VARCHAR, round VARCHAR, nhl_team VARCHAR, college_junior_club_team__league_ VARCHAR )
SELECT nationality FROM table_name_12 WHERE nhl_team = "vancouver canucks" AND college_junior_club_team__league_ = "swift current broncos (whl)" AND round = 8
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the Nationality of Round 8 Vancouver Canucks NHL Team of Swift Current Broncos (WHL)? ### Input: CREATE TABLE table_n...
Name the became consort for ceased to be consort of 4 april 1588 husband's death
CREATE TABLE table_69585 ( "Birth" text, "Marriage" text, "Became Consort" text, "Ceased to be Consort" text, "Death" text, "Spouse" text )
SELECT "Became Consort" FROM table_69585 WHERE "Ceased to be Consort" = '4 april 1588 husband''s death'
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 became consort for ceased to be consort of 4 april 1588 husband's death ### Input: CREATE TABLE table_69585 ( "...
how many albums are performed by martin carthy or ewan maccoll ?
CREATE TABLE table_204_268 ( id number, "album/single" text, "performer" text, "year" number, "variant" text, "notes" text )
SELECT COUNT("album/single") FROM table_204_268 WHERE "performer" IN ('martin carthy', 'ewan maccoll')
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many albums are performed by martin carthy or ewan maccoll ? ### Input: CREATE TABLE table_204_268 ( id number, ...
What is the number of faculty lines in campus 'Long Beach State University' in 2002?
CREATE TABLE campuses ( id VARCHAR, campus VARCHAR ) CREATE TABLE faculty ( campus VARCHAR, year VARCHAR )
SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = "Long Beach State University"
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 number of faculty lines in campus 'Long Beach State University' in 2002? ### Input: CREATE TABLE campuses ( ...
How many students live in each city? Show a bar chart, could you sort the total number in desc order?
CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Student ( StuID INTEGE...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_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: How many students live in each city? Show a bar chart, could you sort the total number in desc order? ### Input: CREATE TABL...
how many patients of poison-psychotropic agt were admitted in the year less than 2175?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2175" AND diagnoses.short_title = "Poison-psychotropic agt"
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 of poison-psychotropic agt were admitted in the year less than 2175? ### Input: CREATE TABLE demographic (...
What is the memory type with a form factor of 15.4', and a Model of precision m65?
CREATE TABLE table_11910 ( "Model" text, "Released" text, "Form factor" text, "Chipset" text, "Memory Type" text, "Max. Memory" text )
SELECT "Memory Type" FROM table_11910 WHERE "Form factor" = '15.4' AND "Model" = 'precision m65'
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 memory type with a form factor of 15.4', and a Model of precision m65? ### Input: CREATE TABLE table_11910 ( ...
What is the launch date for the Ushio dd-54?
CREATE TABLE table_34247 ( "Kanji" text, "Name" text, "Builder" text, "Laid down" text, "Launched" text, "Completed" text )
SELECT "Launched" FROM table_34247 WHERE "Name" = 'ushio dd-54'
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 launch date for the Ushio dd-54? ### Input: CREATE TABLE table_34247 ( "Kanji" text, "Name" text, "B...
how many patients until 2 years ago were staying at careunit tsicu?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyeve...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'tsicu' AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-2 year'))
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients until 2 years ago were staying at careunit tsicu? ### Input: CREATE TABLE d_items ( row_id number, ...
who was the top chef ?
CREATE TABLE table_203_711 ( id number, "name" text, "age" number, "hometown" text, "occupation" text, "culinary p.o.v." text, "eliminated" text )
SELECT "name" FROM table_203_711 ORDER BY id LIMIT 1
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who was the top chef ? ### Input: CREATE TABLE table_203_711 ( id number, "name" text, "age" number, "hometo...
What engine was in the lotus 44 f2 Chassis?
CREATE TABLE table_name_27 ( engine VARCHAR, chassis VARCHAR )
SELECT engine FROM table_name_27 WHERE chassis = "lotus 44 f2"
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 engine was in the lotus 44 f2 Chassis? ### Input: CREATE TABLE table_name_27 ( engine VARCHAR, chassis VARCHAR ...
Over the Spring-Summer , has EARTH 259 been offered ?
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city var...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EARTH' AND course.number = 259 AND semester.semester = 'Spring-Summer' AND semester.semester_id = course_offering.semester
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: Over the Spring-Summer , has EARTH 259 been offered ? ### Input: CREATE TABLE comment_instructor ( instructor_id int, ...
how many days have passed since last time that patient 95892 stayed in ward 14 in this hospital visit?
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95892 AND admissions.dischtime IS NULL)) AND transfers....
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 last time that patient 95892 stayed in ward 14 in this hospital visit? ### Input: CREATE TAB...