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 questions for a tag have been closed?.
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDat...
SELECT COUNT(p.Id) FROM Posts AS p INNER JOIN PostTags AS pt ON pt.TagId = @TagId WHERE pt.PostId = p.Id AND p.PostTypeId = 1 AND NOT p.ClosedDate IS NULL
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many questions for a tag have been closed?. ### Input: CREATE TABLE Tags ( Id number, TagName text, Count nu...
what is the apparent magnitude of the constellation sculptor
CREATE TABLE table_name_24 ( apparent_magnitude VARCHAR, constellation VARCHAR )
SELECT COUNT(apparent_magnitude) FROM table_name_24 WHERE constellation = "sculptor"
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 apparent magnitude of the constellation sculptor ### Input: CREATE TABLE table_name_24 ( apparent_magnitude ...
Who was the leader at the summit when the stage was larger than 14, the category was 1, the start was Saint-Girons, and the finish was Cauterets?
CREATE TABLE table_name_78 ( leader_at_the_summit VARCHAR, finish VARCHAR, start VARCHAR, stage VARCHAR, category VARCHAR )
SELECT leader_at_the_summit FROM table_name_78 WHERE stage > 14 AND category = 1 AND start = "saint-girons" AND finish = "cauterets"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the leader at the summit when the stage was larger than 14, the category was 1, the start was Saint-Girons, and the ...
Who manufactured the motorcycle that did 24 laps and 9 grids?
CREATE TABLE table_name_84 ( manufacturer VARCHAR, laps VARCHAR, grid VARCHAR )
SELECT manufacturer FROM table_name_84 WHERE laps = 24 AND grid = 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: Who manufactured the motorcycle that did 24 laps and 9 grids? ### Input: CREATE TABLE table_name_84 ( manufacturer VARCH...
For those employees who did not have any job in the past, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time by a bar chart, rank in asc by the sum employee id 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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, give me the comparison about the sum of employee_id over the hire_...
hey what was the first cortisol of patient 57050 in this month?
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 chartevents ...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57050) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'cortisol') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURREN...
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: hey what was the first cortisol of patient 57050 in this month? ### Input: CREATE TABLE diagnoses_icd ( row_id number, ...
What is the fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956?
CREATE TABLE table_70777 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
SELECT MIN("Points") FROM table_70777 WHERE "Entrant" = 'goulds'' garage (bristol)' AND "Engine" = 'maserati straight-6' AND "Year" < '1956'
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 fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956...
have type i or ii diabetes
CREATE TABLE table_train_12 ( "id" int, "sequential_organ_failure_assessment_sofa" int, "active_infection" bool, "taking_pioglitazone" bool, "taking_rosiglitazone" bool, "body_weight" float, "diabetic" string, "organ_failure" bool, "age" float, "NOUSE" float )
SELECT * FROM table_train_12 WHERE diabetic = 'i' OR diabetic = 'ii'
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: have type i or ii diabetes ### Input: CREATE TABLE table_train_12 ( "id" int, "sequential_organ_failure_assessment_s...
What team played under 52 Reg GP, and picked 130?
CREATE TABLE table_53159 ( "Rd #" real, "Pick #" real, "Player" text, "Team (League)" text, "Reg GP" real, "Pl GP" real )
SELECT "Team (League)" FROM table_53159 WHERE "Reg GP" < '52' AND "Pick #" = '130'
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 team played under 52 Reg GP, and picked 130? ### Input: CREATE TABLE table_53159 ( "Rd #" real, "Pick #" real, ...
Show the relation between team id and all_games_percent for each All_Road using a scatter chart
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT Team_ID, All_Games_Percent FROM basketball_match GROUP BY All_Road
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 relation between team id and all_games_percent for each All_Road using a scatter chart ### Input: CREATE TABLE univ...
how many locations have a record of 14-38?
CREATE TABLE table_13464416_7 ( location_attendance VARCHAR, record VARCHAR )
SELECT COUNT(location_attendance) FROM table_13464416_7 WHERE record = "14-38"
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 locations have a record of 14-38? ### Input: CREATE TABLE table_13464416_7 ( location_attendance VARCHAR, r...
What is game 9's record?
CREATE TABLE table_name_36 ( record VARCHAR, game VARCHAR )
SELECT record FROM table_name_36 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: What is game 9's record? ### Input: CREATE TABLE table_name_36 ( record VARCHAR, game VARCHAR ) ### Response: SELECT...
What was the average attendance when the record was 58 49?
CREATE TABLE table_name_63 ( attendance INTEGER, record VARCHAR )
SELECT AVG(attendance) FROM table_name_63 WHERE record = "58–49"
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 average attendance when the record was 58 49? ### Input: CREATE TABLE table_name_63 ( attendance INTEGER, ...
Pertaining to the pre-requisites , what are they exactly in the class that has Pauline Mccoy for GSI ?
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests i...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.pre_course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.course_id INNER JOIN course_offering ON COURSE_1.course_id = cour...
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: Pertaining to the pre-requisites , what are they exactly in the class that has Pauline Mccoy for GSI ? ### Input: CREATE TAB...
What is the description of document type 'Paper'?
CREATE TABLE Ref_Document_Types ( document_type_description VARCHAR, document_type_code VARCHAR )
SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "Paper"
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 description of document type 'Paper'? ### Input: CREATE TABLE Ref_Document_Types ( document_type_description...
What is the highest attendance of the match with a 2:0 score and vida as the away team?
CREATE TABLE table_47336 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real )
SELECT MAX("Attendance") FROM table_47336 WHERE "Score" = '2:0' AND "Away" = 'vida'
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 attendance of the match with a 2:0 score and vida as the away team? ### Input: CREATE TABLE table_47336 ...
What is the sum of week number(s) had an attendance of 61,985?
CREATE TABLE table_name_95 ( week VARCHAR, attendance VARCHAR )
SELECT COUNT(week) FROM table_name_95 WHERE attendance = 61 OFFSET 985
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 sum of week number(s) had an attendance of 61,985? ### Input: CREATE TABLE table_name_95 ( week VARCHAR, ...
what is the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft /sda?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft /sda? ### Input...
Show the average price of each film in a bar chart.
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE cine...
SELECT Title, AVG(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Title
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 average price of each film in a bar chart. ### Input: CREATE TABLE schedule ( Cinema_ID int, Film_ID int, ...
Which week was on November 13, 1955 when the attendance was over 33,982?
CREATE TABLE table_40622 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT COUNT("Week") FROM table_40622 WHERE "Date" = 'november 13, 1955' AND "Attendance" > '33,982'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which week was on November 13, 1955 when the attendance was over 33,982? ### Input: CREATE TABLE table_40622 ( "Week" re...
Compare the total number of locations in each location using a bar graph.
CREATE TABLE performance ( Performance_ID real, Date text, Host text, Location text, Attendance int ) CREATE TABLE member ( Member_ID text, Name text, Nationality text, Role text ) CREATE TABLE member_attendance ( Member_ID int, Performance_ID int, Num_of_Pieces int )
SELECT Location, COUNT(Location) FROM performance GROUP BY Location
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: Compare the total number of locations in each location using a bar graph. ### Input: CREATE TABLE performance ( Performa...
What is the Lost when the points were dissolved?
CREATE TABLE table_name_61 ( lost VARCHAR, points VARCHAR )
SELECT lost FROM table_name_61 WHERE points = "dissolved"
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 Lost when the points were dissolved? ### Input: CREATE TABLE table_name_61 ( lost VARCHAR, points VARCHA...
Which Candidate has a Votes larger than 622,961, and a Governorate of baghdad?
CREATE TABLE table_9105 ( "Candidate" text, "Party" text, "Election List" text, "Governorate" text, "Votes" real )
SELECT "Candidate" FROM table_9105 WHERE "Votes" > '622,961' AND "Governorate" = 'baghdad'
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 Candidate has a Votes larger than 622,961, and a Governorate of baghdad? ### Input: CREATE TABLE table_9105 ( "Can...
what is discharge location and primary disease of subject name charley pescatore?
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 demographic.discharge_location, demographic.diagnosis FROM demographic WHERE demographic.name = "Charley Pescatore"
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 location and primary disease of subject name charley pescatore? ### Input: CREATE TABLE demographic ( ...
How many patients were admitted to clinic referral (premature) before the year 2114?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.admityear < "2114"
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 were admitted to clinic referral (premature) before the year 2114? ### Input: CREATE TABLE lab ( subje...
What are the facility codes of the apartments with more than four bedrooms, and count them by a bar chart
CREATE TABLE View_Unit_Status ( apt_id INTEGER, apt_booking_id INTEGER, status_date DATETIME, available_yn BIT ) CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_start_date DATETIME, booking_end_dat...
SELECT facility_code, COUNT(facility_code) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY facility_code
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 facility codes of the apartments with more than four bedrooms, and count them by a bar chart ### Input: CREATE ...
Tags with name containing zip.
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number...
SELECT TagName, Count FROM Tags WHERE TagName LIKE '%zip%' ORDER BY Count DESC
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tags with name containing zip. ### Input: CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Revie...
What was the air date when the team guest captain was john bishop?
CREATE TABLE table_25816476_2 ( air_date VARCHAR, team_guest_captain VARCHAR )
SELECT air_date FROM table_25816476_2 WHERE team_guest_captain = "John Bishop"
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 air date when the team guest captain was john bishop? ### Input: CREATE TABLE table_25816476_2 ( air_date V...
Find meter_400 and ID , and visualize them by a bar chart, sort by the X-axis in ascending.
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
SELECT meter_400, ID FROM swimmer ORDER BY meter_400
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 meter_400 and ID , and visualize them by a bar chart, sort by the X-axis in ascending. ### Input: CREATE TABLE event ( ...
what is the minimum value of hematocrit in patient 14467's body in the current hospital encounter?
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 MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14467 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hematocrit')
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 value of hematocrit in patient 14467's body in the current hospital encounter? ### Input: CREATE TABLE a...
What year was the school founded with an 898 enrollment?
CREATE TABLE table_2328 ( "School" text, "Location(s)" text, "Control" text, "Type" text, "Enrollment (fall 2010)" real, "Founded" real, "Accreditation" text )
SELECT MAX("Founded") FROM table_2328 WHERE "Enrollment (fall 2010)" = '898'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was the school founded with an 898 enrollment? ### Input: CREATE TABLE table_2328 ( "School" text, "Locati...
Which 1997's 1992 was 1r when 1994 was a?
CREATE TABLE table_39551 ( "Tournament" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "Career W\u2013L" text )
SELECT "1997" FROM table_39551 WHERE "1992" = '1r' AND "1994" = 'a'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which 1997's 1992 was 1r when 1994 was a? ### Input: CREATE TABLE table_39551 ( "Tournament" text, "1989" text, ...
Which Genre has an English title (Chinese title) of the romance of the white hair maiden ?
CREATE TABLE table_name_92 ( genre VARCHAR, english_title__chinese_title_ VARCHAR )
SELECT genre FROM table_name_92 WHERE english_title__chinese_title_ = "the romance of the white hair maiden 白髮魔女傳"
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 Genre has an English title (Chinese title) of the romance of the white hair maiden ? ### Input: CREATE TABLE table_nam...
Which leagues is the Galena school in?
CREATE TABLE table_72151 ( "School" text, "Mascot" text, "Location" text, "League" text, "Enrollment" real )
SELECT "League" FROM table_72151 WHERE "School" = 'Galena'
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 leagues is the Galena school in? ### Input: CREATE TABLE table_72151 ( "School" text, "Mascot" text, "Loca...
What team has 102 Points against?
CREATE TABLE table_44339 ( "Team" text, "Tries for" text, "Tries against" text, "Try diff" text, "Points for" text, "Points against" text, "Points diff" text )
SELECT "Team" FROM table_44339 WHERE "Points against" = '102'
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 team has 102 Points against? ### Input: CREATE TABLE table_44339 ( "Team" text, "Tries for" text, "Tries ag...
what is drawn when the club is hirwaun rfc?
CREATE TABLE table_76352 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT "Drawn" FROM table_76352 WHERE "Club" = 'hirwaun rfc'
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 drawn when the club is hirwaun rfc? ### Input: CREATE TABLE table_76352 ( "Club" text, "Played" text, "D...
What is MILSCI 101 about ?
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instruc...
SELECT DISTINCT description, name FROM course WHERE department = 'MILSCI' AND number = 101
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 MILSCI 101 about ? ### Input: CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE ...
What is the smallest winner's share for the LPGA championship?
CREATE TABLE table_48158 ( "Year" real, "Championship" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner-up" text, "Winner's share ( $ )" real )
SELECT MIN("Winner's share ( $ )") FROM table_48158 WHERE "Championship" = 'lpga championship'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the smallest winner's share for the LPGA championship? ### Input: CREATE TABLE table_48158 ( "Year" real, "C...
A bar chart for showing the number of the working years of managers in descending order of their level.
CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway ( Railway_ID int, Railway ...
SELECT Working_year_starts, COUNT(Working_year_starts) FROM manager ORDER BY Level 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 for showing the number of the working years of managers in descending order of their level. ### Input: CREATE TA...
What ist the Away Leg with an Opposition that is aarhus gymnastik forening?
CREATE TABLE table_name_60 ( away_leg VARCHAR, opposition VARCHAR )
SELECT away_leg FROM table_name_60 WHERE opposition = "aarhus gymnastik forening"
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 ist the Away Leg with an Opposition that is aarhus gymnastik forening? ### Input: CREATE TABLE table_name_60 ( away...
What year was the match against filippo volandri where xavier malisse was runner-up?
CREATE TABLE table_42051 ( "Outcome" text, "Year" text, "Surface" text, "Opponent" text, "Score" text )
SELECT "Year" FROM table_42051 WHERE "Outcome" = 'runner-up' AND "Opponent" = 'filippo volandri'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was the match against filippo volandri where xavier malisse was runner-up? ### Input: CREATE TABLE table_42051 ( ...
What year was the Honda ra168e 1.5 v6 t engine used?
CREATE TABLE table_name_47 ( year VARCHAR, engine VARCHAR )
SELECT year FROM table_name_47 WHERE engine = "honda ra168e 1.5 v6 t"
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 was the Honda ra168e 1.5 v6 t engine used? ### Input: CREATE TABLE table_name_47 ( year VARCHAR, engine VA...
Which Record has a Result of loss, and an Opponent of @ la clippers?
CREATE TABLE table_46170 ( "Date" text, "Opponent" text, "Score" text, "Result" text, "Record" text )
SELECT "Record" FROM table_46170 WHERE "Result" = 'loss' AND "Opponent" = '@ la clippers'
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 Record has a Result of loss, and an Opponent of @ la clippers? ### Input: CREATE TABLE table_46170 ( "Date" text, ...
What is the placement date of the order whose invoice number is 10?
CREATE TABLE products ( product_id number, product_name text, product_details text ) CREATE TABLE orders ( order_id number, customer_id number, order_status text, date_order_placed time, order_details text ) CREATE TABLE shipment_items ( shipment_id number, order_item_id number...
SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the placement date of the order whose invoice number is 10? ### Input: CREATE TABLE products ( product_id number...
What is the digital of Virgin [analogue]?
CREATE TABLE table_name_24 ( digital VARCHAR, provider VARCHAR )
SELECT digital FROM table_name_24 WHERE provider = "virgin [analogue]"
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 digital of Virgin [analogue]? ### Input: CREATE TABLE table_name_24 ( digital VARCHAR, provider VARCHAR ...
When tim brasil brokers are the minor sponsors who is the kit manufacturer?
CREATE TABLE table_187239_1 ( kit_manufacturer VARCHAR, minor_sponsors VARCHAR )
SELECT kit_manufacturer FROM table_187239_1 WHERE minor_sponsors = "Tim Brasil Brokers"
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 tim brasil brokers are the minor sponsors who is the kit manufacturer? ### Input: CREATE TABLE table_187239_1 ( kit...
Which American Labor candidate ran against Democratic candidate Robert F. Wagner?
CREATE TABLE table_42089 ( "Office" text, "Democratic ticket" text, "Republican ticket" text, "American Labor ticket" text, "Socialist ticket" text )
SELECT "American Labor ticket" FROM table_42089 WHERE "Democratic ticket" = 'robert f. wagner'
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 American Labor candidate ran against Democratic candidate Robert F. Wagner? ### Input: CREATE TABLE table_42089 ( ...
In what country is Hokkaid and New Chitose airport located?
CREATE TABLE table_name_55 ( country VARCHAR, province_region VARCHAR, airport VARCHAR )
SELECT country FROM table_name_55 WHERE province_region = "hokkaidō" AND airport = "new chitose airport"
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: In what country is Hokkaid and New Chitose airport located? ### Input: CREATE TABLE table_name_55 ( country VARCHAR, ...
Draw a bar chart about the distribution of name and ID , and I want to display x-axis in desc order.
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE...
SELECT name, ID FROM swimmer ORDER BY name DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart about the distribution of name and ID , and I want to display x-axis in desc order. ### Input: CREATE TABLE...
On what air date were there 2.15 million u.s. viewers?
CREATE TABLE table_22380270_1 ( original_air_date VARCHAR, us_viewers__millions_ VARCHAR )
SELECT original_air_date FROM table_22380270_1 WHERE us_viewers__millions_ = "2.15"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On what air date were there 2.15 million u.s. viewers? ### Input: CREATE TABLE table_22380270_1 ( original_air_date VARC...
what's the engine where performance is 0 100km/h: 10.5s, vmax km/h (mph)
CREATE TABLE table_16481 ( "Trim" text, "Engine" text, "Turbo" text, "Fuel Delivery" text, "Power" text, "Torque" text, "Transmission" text, "Performance" text )
SELECT "Engine" FROM table_16481 WHERE "Performance" = '0–100km/h: 10.5s, VMax km/h (mph)'
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 engine where performance is 0 100km/h: 10.5s, vmax km/h (mph) ### Input: CREATE TABLE table_16481 ( "Trim" te...
like information on flights from SAN FRANCISCO to BOSTON on thursday morning
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_fro...
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 = 'BOSTON' AND date_day.day_number = 24 AND date_day.month_number = 5 AND d...
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: like information on flights from SAN FRANCISCO to BOSTON on thursday morning ### Input: CREATE TABLE city ( city_code va...
What was the attendance in the gave versus the Brewers with a score of 9 6?
CREATE TABLE table_name_43 ( attendance VARCHAR, opponent VARCHAR, score VARCHAR )
SELECT attendance FROM table_name_43 WHERE opponent = "brewers" AND score = "9–6"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the attendance in the gave versus the Brewers with a score of 9 6? ### Input: CREATE TABLE table_name_43 ( atte...
Popular error questions for C++.
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CR...
SELECT Title, 'https://stackoverflow.com/questions/' + CAST(Id AS TEXT) AS Link, ViewCount, AnswerCount, Score FROM Posts WHERE LOWER(Title) LIKE '%error%' AND Tags LIKE '%c++%' AND AnswerCount > 0 AND Score > 0 ORDER BY (ViewCount * AnswerCount + Score) DESC
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Popular error questions for C++. ### Input: CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Post...
What role did Jean-Luc Bouvier serve?
CREATE TABLE table_72038 ( "Code Name" text, "Function (figure)" text, "Real Name" text, "Birthplace" text, "Serial number" text, "Primary military speciality" text, "Secondary military speciality" text )
SELECT "Function (figure)" FROM table_72038 WHERE "Real Name" = 'jean-luc bouvier'
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 role did Jean-Luc Bouvier serve? ### Input: CREATE TABLE table_72038 ( "Code Name" text, "Function (figure)" te...
which has the least number of people served , black jack or jefferson city ?
CREATE TABLE table_204_863 ( id number, "state" text, "city/county" text, "population served" number, "charter type" text, "station name" text, "web site" text )
SELECT "city/county" FROM table_204_863 WHERE "city/county" IN ('black jack', 'jefferson city') ORDER BY "population served" 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 has the least number of people served , black jack or jefferson city ? ### Input: CREATE TABLE table_204_863 ( id ...
What was the Margin of victory in the southwest golf classic Tournament?
CREATE TABLE table_name_84 ( margin_of_victory VARCHAR, tournament VARCHAR )
SELECT margin_of_victory FROM table_name_84 WHERE tournament = "southwest golf classic"
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 Margin of victory in the southwest golf classic Tournament? ### Input: CREATE TABLE table_name_84 ( margin_...
Kentico - questions by month.
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Suggeste...
SELECT CAST(YEAR(p.CreationDate) AS TEXT(4)) + '-' + REPLACE(STR(CAST(MONTH(p.CreationDate) AS TEXT(2)), 2), SPACE(1), '0') AS "period", COUNT(p.Id) AS "count" FROM Posts AS p WHERE p.CreationDate >= '2015-01-01' AND p.CreationDate < '2017-01-01' AND p.PostTypeId = 1 AND p.Tags LIKE '%kentico%' GROUP BY CAST(YEAR(p.Cre...
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: Kentico - questions by month. ### Input: CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ...
Which Skip will play Joan Mccusker?
CREATE TABLE table_name_83 ( skip VARCHAR, second VARCHAR )
SELECT skip FROM table_name_83 WHERE second = "joan mccusker"
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 Skip will play Joan Mccusker? ### Input: CREATE TABLE table_name_83 ( skip VARCHAR, second VARCHAR ) ### Respo...
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and department_id , and show in desc by the x-axis.
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 PHONE_NUMBER, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER 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 do not work in departments with managers that have ids between 100 and 200, return a bar chart about...
How many tournaments were held in Maryland?
CREATE TABLE table_11603006_1 ( tournament VARCHAR, location VARCHAR )
SELECT COUNT(tournament) FROM table_11603006_1 WHERE location = "Maryland"
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 tournaments were held in Maryland? ### Input: CREATE TABLE table_11603006_1 ( tournament VARCHAR, location ...
What is the average Laps that shows spun off for time?
CREATE TABLE table_34921 ( "Team" text, "Driver" text, "Laps" real, "Time" text, "Grid" real )
SELECT AVG("Laps") FROM table_34921 WHERE "Time" = 'spun off'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average Laps that shows spun off for time? ### Input: CREATE TABLE table_34921 ( "Team" text, "Driver" t...
Who was the home team that scored 19.15 (129) on 15 June 1959?
CREATE TABLE table_33097 ( "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_33097 WHERE "Date" = '15 june 1959' AND "Home team score" = '19.15 (129)'
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 home team that scored 19.15 (129) on 15 June 1959? ### Input: CREATE TABLE table_33097 ( "Home team" text, ...
name a site that was listed no later than 1960 .
CREATE TABLE table_204_423 ( id number, "name" text, "location" text, "city" text, "listing date" text )
SELECT "name" FROM table_204_423 WHERE "listing date" <= 1960
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: name a site that was listed no later than 1960 . ### Input: CREATE TABLE table_204_423 ( id number, "name" text, ...
has patient 017-20711 been prescribed norco 5 mg-325 mg, thiamine hcl 100 mg po tabs, or sodium chloride 0.9% 500 ml bag since 6 months ago?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-20711')) AND medication.drugname IN ('thiamine hcl 100 mg po tabs', 'n...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: has patient 017-20711 been prescribed norco 5 mg-325 mg, thiamine hcl 100 mg po tabs, or sodium chloride 0.9% 500 ml bag sin...
Which IHSAA Class has a Mascot of eagles, and a City of evansville?
CREATE TABLE table_name_93 ( ihsaa_class VARCHAR, mascot VARCHAR, city VARCHAR )
SELECT ihsaa_class FROM table_name_93 WHERE mascot = "eagles" AND city = "evansville"
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 IHSAA Class has a Mascot of eagles, and a City of evansville? ### Input: CREATE TABLE table_name_93 ( ihsaa_class ...
Is ORALBIOL 678 taught each semester ?
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructo...
SELECT COUNT(*) > 0 FROM semester WHERE NOT semester IN (SELECT DISTINCT SEMESTERalias1.semester FROM course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias1 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND COURSEalias0.department = 'ORALBIOL' AND COURSEalias0.numb...
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: Is ORALBIOL 678 taught each semester ? ### Input: CREATE TABLE gsi ( course_offering_id int, student_id int ) CREAT...
What was Stacy Lewis' place?
CREATE TABLE table_name_50 ( place VARCHAR, player VARCHAR )
SELECT place FROM table_name_50 WHERE player = "stacy lewis"
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 Stacy Lewis' place? ### Input: CREATE TABLE table_name_50 ( place VARCHAR, player VARCHAR ) ### Response: S...
when did patient 027-11635 get the procedure for the last time in a year before.
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-11635')) AND DATETIME(treatment.treatmenttime, 'start of year...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 027-11635 get the procedure for the last time in a year before. ### Input: CREATE TABLE medication ( me...
what's the original air date where written by is iain morris & damon beesley
CREATE TABLE table_72196 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT "Original air date" FROM table_72196 WHERE "Written by" = 'Iain Morris & Damon Beesley'
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 original air date where written by is iain morris & damon beesley ### Input: CREATE TABLE table_72196 ( "No. ...
What is the sum of all the points won by Peter Whitehead in an alta f2 Chassis?
CREATE TABLE table_70946 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
SELECT SUM("Points") FROM table_70946 WHERE "Entrant" = 'peter whitehead' AND "Chassis" = 'alta f2'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of all the points won by Peter Whitehead in an alta f2 Chassis? ### Input: CREATE TABLE table_70946 ( "Y...
For all employees who have the letters D or S in their first name, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart, list JOB_ID from low to high order.
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all employees who have the letters D or S in their first name, show me about the distribution of job_id and the average ...
what is the total tpn d13.0 dose that until 1579 days ago patient 30044 has received?
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_i...
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30044)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
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 total tpn d13.0 dose that until 1579 days ago patient 30044 has received? ### Input: CREATE TABLE patients ( ...
How many assets can each parts be used in? List the part name and the number with a bar chart, and display x-axis from high to low order please.
CREATE TABLE Asset_Parts ( asset_id INTEGER, part_id INTEGER ) CREATE TABLE Engineer_Skills ( engineer_id INTEGER, skill_id INTEGER ) CREATE TABLE Engineer_Visits ( engineer_visit_id INTEGER, contact_staff_id INTEGER, engineer_id INTEGER, fault_log_entry_id INTEGER, fault_status VA...
SELECT part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY part_name 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 assets can each parts be used in? List the part name and the number with a bar chart, and display x-axis from high ...
Name the team for week 1 of 33
CREATE TABLE table_75058 ( "Team" text, "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8 Final" text )
SELECT "Team" FROM table_75058 WHERE "Week 1" = '33'
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 team for week 1 of 33 ### Input: CREATE TABLE table_75058 ( "Team" text, "Week 1" text, "Week 2" text, ...
What is the 250 cc with a year bigger than 1984?
CREATE TABLE table_name_89 ( year INTEGER )
SELECT 250 AS _cc FROM table_name_89 WHERE year > 1984
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 250 cc with a year bigger than 1984? ### Input: CREATE TABLE table_name_89 ( year INTEGER ) ### Response: SE...
What score has october 16, 2000 as the date?
CREATE TABLE table_14683 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Score" FROM table_14683 WHERE "Date" = 'october 16, 2000'
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 has october 16, 2000 as the date? ### Input: CREATE TABLE table_14683 ( "Date" text, "Venue" text, "S...
For those employees who was hired before 2002-06-21, find hire_date and the sum of employee_id bin hire_date by weekday, 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 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...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21'
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who was hired before 2002-06-21, find hire_date and the sum of employee_id bin hire_date by weekday, and...
was the venue in athens or beijing associated with 31st place ?
CREATE TABLE table_204_880 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text )
SELECT "venue" FROM table_204_880 WHERE "venue" IN ('athens', 'beijing') AND "position" = 31
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: was the venue in athens or beijing associated with 31st place ? ### Input: CREATE TABLE table_204_880 ( id number, "...
What is the administrative capital that has a 2006 census population of 249425?
CREATE TABLE table_23154 ( "LGA Name" text, "Area (km 2 )" real, "Census 2006 population" real, "Administrative capital" text, "Postal Code" real )
SELECT "Administrative capital" FROM table_23154 WHERE "Census 2006 population" = '249425'
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 administrative capital that has a 2006 census population of 249425? ### Input: CREATE TABLE table_23154 ( "L...
What is the number of members that have boroughs of Bandon Bridge?
CREATE TABLE table_24329520_8 ( members VARCHAR, borough VARCHAR )
SELECT COUNT(members) FROM table_24329520_8 WHERE borough = "Bandon Bridge"
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 members that have boroughs of Bandon Bridge? ### Input: CREATE TABLE table_24329520_8 ( members VA...
What was the reason for change to the successor that was seated on December 13, 1880?
CREATE TABLE table_26652 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
SELECT "Reason for change" FROM table_26652 WHERE "Date successor seated" = 'December 13, 1880'
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 reason for change to the successor that was seated on December 13, 1880? ### Input: CREATE TABLE table_26652 ( ...
Which Score has a Record of 0-1?
CREATE TABLE table_name_61 ( score VARCHAR, record VARCHAR )
SELECT score FROM table_name_61 WHERE record = "0-1"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Score has a Record of 0-1? ### Input: CREATE TABLE table_name_61 ( score VARCHAR, record VARCHAR ) ### Respons...
What is the Series leader with a Date that is october 9?
CREATE TABLE table_name_93 ( series_leader VARCHAR, date VARCHAR )
SELECT series_leader FROM table_name_93 WHERE date = "october 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 Series leader with a Date that is october 9? ### Input: CREATE TABLE table_name_93 ( series_leader VARCHAR, ...
calculate the total output of patient 006-13677 on 09/02/this year.
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREAT...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-13677')) AND intakeoutput.cellpath LIKE '%ou...
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: calculate the total output of patient 006-13677 on 09/02/this year. ### Input: CREATE TABLE intakeoutput ( intakeoutputi...
On October 16, 1966, what was the game site?
CREATE TABLE table_17782308_1 ( game_site VARCHAR, date VARCHAR )
SELECT game_site FROM table_17782308_1 WHERE date = "October 16, 1966"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On October 16, 1966, what was the game site? ### Input: CREATE TABLE table_17782308_1 ( game_site VARCHAR, date VARC...
age >= 18 years old and age <= 80 years old .
CREATE TABLE table_train_13 ( "id" int, "active_infection" bool, "procalcitonin" int, "receiving_vasopressor" bool, "sepsis" bool, "septic_shock" bool, "age" float, "lactate" int, "NOUSE" float )
SELECT * FROM table_train_13 WHERE age >= 18 AND age <= 80
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: age >= 18 years old and age <= 80 years old . ### Input: CREATE TABLE table_train_13 ( "id" int, "active_infection" ...
count the number of patients who were diagnosed with atrial fibrillation in the same month after fall on stair/step nec this year.
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid n...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'atrial fibrillatio...
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: count the number of patients who were diagnosed with atrial fibrillation in the same month after fall on stair/step nec this...
State pensions of 7%, and a Self employed of 7%, and a Other income sources of 2% has what investment income?
CREATE TABLE table_35399 ( "Region" text, "Employment ( salaries & wages)" text, "Self employed" text, "Investment income" text, "Working tax credit" text, "State pensions" text, "Occupational pensions" text, "Disability benefits" text, "Other social security benefits" text, "Oth...
SELECT "Investment income" FROM table_35399 WHERE "State pensions" = '7%' AND "Self employed" = '7%' AND "Other income sources" = '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: State pensions of 7%, and a Self employed of 7%, and a Other income sources of 2% has what investment income? ### Input: CRE...
What is the Name listed for the Nickname of Storm?
CREATE TABLE table_64644 ( "Name" text, "Nickname" text, "Location" text, "Home ground(s)" text, "Coach" text, "Captain" text )
SELECT "Name" FROM table_64644 WHERE "Nickname" = 'storm'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Name listed for the Nickname of Storm? ### Input: CREATE TABLE table_64644 ( "Name" text, "Nickname" tex...
Where was the hometown for the player that attended Shanley High School?
CREATE TABLE table_11677691_4 ( hometown VARCHAR, school VARCHAR )
SELECT hometown FROM table_11677691_4 WHERE school = "Shanley High school"
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 was the hometown for the player that attended Shanley High School? ### Input: CREATE TABLE table_11677691_4 ( home...
Name the total number of games for goals against being 352
CREATE TABLE table_27396 ( "Season" text, "Games" real, "Won" real, "Lost" real, "Tied" real, "Points" real, "Goals for" real, "Goals against" real, "Standing" text )
SELECT COUNT("Games") FROM table_27396 WHERE "Goals against" = '352'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the total number of games for goals against being 352 ### Input: CREATE TABLE table_27396 ( "Season" text, "Gam...
What was deputies with the lowest number of unknown received votes, in an election year after 1986?
CREATE TABLE table_6218 ( "Election date" real, "Party leader" text, "Number of votes received" text, "Percentage of votes" text, "Number of deputies" real )
SELECT MIN("Number of deputies") FROM table_6218 WHERE "Number of votes received" = 'unknown' AND "Election date" > '1986'
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 deputies with the lowest number of unknown received votes, in an election year after 1986? ### Input: CREATE TABLE ...
which patients have lab test item id 51464?
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51464"
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: which patients have lab test item id 51464? ### Input: CREATE TABLE diagnoses ( subject_id text, hadm_id text, i...
give me the number of patients whose admission year is less than 2195 and diagnoses short title is other postop infection?
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2195" AND diagnoses.short_title = "Other postop infection"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose admission year is less than 2195 and diagnoses short title is other postop infection? #...
PM - Questions raised last week.
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE T...
SELECT DATENAME(dw, CreationDate), COUNT(1) FROM Posts WHERE CreationDate > DATEADD(DAY, -120, CURRENT_TIMESTAMP()) AND ParentId IS NULL GROUP BY DATENAME(dw, CreationDate)
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: PM - Questions raised last week. ### Input: CREATE TABLE ReviewTaskStates ( Id number, Name text, Description te...
For each bed type, find the average base price of different bed type. Plot them as pie chart.
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For each bed type, find the average base price of different bed type. Plot them as pie chart. ### Input: CREATE TABLE Rooms ...
what is the daily maximum arterial bp mean of patient 15794 in this month?
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id num...
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 = 15794)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte...
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 daily maximum arterial bp mean of patient 15794 in this month? ### Input: CREATE TABLE d_items ( row_id numb...
what was the least number of points scored in a win ?
CREATE TABLE table_203_383 ( id number, "week" number, "date" text, "opponent" text, "time" text, "game site" text, "tv" text, "result/score" text, "record" text, "bye" text )
SELECT MIN("result/score") FROM table_203_383 WHERE "result/score" = 'w'
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the least number of points scored in a win ? ### Input: CREATE TABLE table_203_383 ( id number, "week" numb...
What are the titles and average ratings for all movies that have the lowest average rating?
CREATE TABLE movie ( mid number, title text, year number, director text ) CREATE TABLE reviewer ( rid number, name text ) CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time )
SELECT T2.title, AVG(T1.stars) FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid GROUP BY T1.mid ORDER BY AVG(T1.stars) LIMIT 1
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the titles and average ratings for all movies that have the lowest average rating? ### Input: CREATE TABLE movie ( ...