instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
I want the sum of year for mark barron
CREATE TABLE table_name_11 ( year INTEGER, player_name VARCHAR )
SELECT SUM(year) FROM table_name_11 WHERE player_name = "mark barron"
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: I want the sum of year for mark barron ### Input: CREATE TABLE table_name_11 ( year INTEGER, player_name VARCHAR ) #...
What year was the team Club of atl tico de san juan fc who plays at hiram bithorn stadium founded.
CREATE TABLE table_name_18 ( founded INTEGER, stadium VARCHAR, club VARCHAR )
SELECT SUM(founded) FROM table_name_18 WHERE stadium = "hiram bithorn stadium" AND club = "atlético de san juan fc"
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 team Club of atl tico de san juan fc who plays at hiram bithorn stadium founded. ### Input: CREATE TABLE t...
What was the away team that faced Carlton?
CREATE TABLE table_32245 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Away team" FROM table_32245 WHERE "Home team" = 'carlton'
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 away team that faced Carlton? ### Input: CREATE TABLE table_32245 ( "Home team" text, "Home team score"...
What is the highest number of goals Eisb ren Berlin had along with 13 points and 10 assists?
CREATE TABLE table_48215 ( "Player" text, "Club" text, "Games" real, "Goals" real, "Assists" real, "Points" real )
SELECT MAX("Goals") FROM table_48215 WHERE "Points" = '13' AND "Assists" = '10' AND "Club" = 'eisbären berlin'
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 number of goals Eisb ren Berlin had along with 13 points and 10 assists? ### Input: CREATE TABLE table_4...
Which Rank has a Show of alcatraz, and a Number of Viewers larger than 1,229,000?
CREATE TABLE table_64376 ( "Rank" real, "Show" text, "Episode" text, "Number of Viewers" real, "Date" text )
SELECT MIN("Rank") FROM table_64376 WHERE "Show" = 'alcatraz' AND "Number of Viewers" > '1,229,000'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Rank has a Show of alcatraz, and a Number of Viewers larger than 1,229,000? ### Input: CREATE TABLE table_64376 ( ...
Which Format has a Date of 14 october 2008, and a Label of eagle eye media?
CREATE TABLE table_60538 ( "Country" text, "Date" text, "Label" text, "Format" text, "Catalogue number(s)" text )
SELECT "Format" FROM table_60538 WHERE "Date" = '14 october 2008' AND "Label" = 'eagle eye media'
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 Format has a Date of 14 october 2008, and a Label of eagle eye media? ### Input: CREATE TABLE table_60538 ( "Count...
Which study included autoimmune disease and inflammation?
CREATE TABLE table_name_41 ( name VARCHAR, indication VARCHAR )
SELECT name FROM table_name_41 WHERE indication = "autoimmune disease and inflammation"
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 study included autoimmune disease and inflammation? ### Input: CREATE TABLE table_name_41 ( name VARCHAR, indi...
What title was released in 1971?
CREATE TABLE table_name_54 ( title VARCHAR, year VARCHAR )
SELECT title FROM table_name_54 WHERE year = 1971
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 title was released in 1971? ### Input: CREATE TABLE table_name_54 ( title VARCHAR, year VARCHAR ) ### Response:...
what was the last gabapentin 100 mg po caps prescription time for patient 016-38131 in this month.
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-38131')) AND medication.drugname = 'gabapentin 100 mg po c...
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 last gabapentin 100 mg po caps prescription time for patient 016-38131 in this month. ### Input: CREATE TABLE p...
Who is the club that has 30 points?
CREATE TABLE table_13564637_5 ( club VARCHAR, points VARCHAR )
SELECT club FROM table_13564637_5 WHERE points = "30"
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 club that has 30 points? ### Input: CREATE TABLE table_13564637_5 ( club VARCHAR, points VARCHAR ) ### Re...
Average frequency with ERP W of 62?
CREATE TABLE table_47008 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" text, "FCC info" text )
SELECT AVG("Frequency MHz") FROM table_47008 WHERE "ERP W" = '62'
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: Average frequency with ERP W of 62? ### Input: CREATE TABLE table_47008 ( "Call sign" text, "Frequency MHz" real, ...
Total users added, by month, with reputation at least 50.
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number...
SELECT DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) AS "month", COUNT(*) AS "# Users Added", COUNT(IIF(u.Reputation >= 50, 1, NULL)) AS "# Users Added (current rep >= 50)" FROM Users AS u GROUP BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0) ORDER BY DATEADD(month, DATEDIFF(month, 0, CreationDate), 0)
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: Total users added, by month, with reputation at least 50. ### Input: CREATE TABLE ReviewTasks ( Id number, ReviewTas...
give the description of diagnoses icd9 code e8120.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT diagnoses.short_title FROM diagnoses WHERE diagnoses.icd9_code = "E8120"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give the description of diagnoses icd9 code e8120. ### Input: CREATE TABLE prescriptions ( subject_id text, hadm_id ...
how many times patient 006-50368 the last year visited the hospital.
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT COUNT(DISTINCT patient.patienthealthsystemstayid) FROM patient WHERE patient.uniquepid = '006-50368' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 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: how many times patient 006-50368 the last year visited the hospital. ### Input: CREATE TABLE lab ( labid number, pat...
what were the specimen tests that patient 52456 first had in the last month?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52456) AND DATETIME(microbiologyevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY microbiology...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the specimen tests that patient 52456 first had in the last month? ### Input: CREATE TABLE labevents ( row_id ...
when did patient 26156 come for the last time to the hospital?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE transfers ( r...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 26156 ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 26156 come for the last time to the hospital? ### Input: CREATE TABLE chartevents ( row_id number, ...
how many competitions did jifar participate in before joining the 10000m ?
CREATE TABLE table_203_189 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT COUNT("competition") FROM table_203_189 WHERE "notes" <> 10000
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 competitions did jifar participate in before joining the 10000m ? ### Input: CREATE TABLE table_203_189 ( id nu...
When did the term end for the U.S. Marine Corps?
CREATE TABLE table_50091 ( "Name" text, "Branch" text, "Term began" text, "Term ended" text, "Time in office" text )
SELECT "Term ended" FROM table_50091 WHERE "Branch" = 'u.s. marine corps'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did the term end for the U.S. Marine Corps? ### Input: CREATE TABLE table_50091 ( "Name" text, "Branch" text, ...
What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor. Visualize by pie chart.
CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text )
SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor
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 investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor. Visualize b...
Which Score has a Couple comprised of jason & edyta, and a Style of freestyle?
CREATE TABLE table_name_2 ( score VARCHAR, couple VARCHAR, style VARCHAR )
SELECT score FROM table_name_2 WHERE couple = "jason & edyta" AND style = "freestyle"
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 Couple comprised of jason & edyta, and a Style of freestyle? ### Input: CREATE TABLE table_name_2 ( sc...
Show the ids of all employees who have either destroyed a document or made an authorization to do this.
CREATE TABLE roles ( role_code text, role_name text, role_description text ) CREATE TABLE documents_to_be_destroyed ( document_id number, destruction_authorised_by_employee_id number, destroyed_by_employee_id number, planned_destruction_date time, actual_destruction_date time, other...
SELECT destroyed_by_employee_id FROM documents_to_be_destroyed UNION SELECT destruction_authorised_by_employee_id FROM documents_to_be_destroyed
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: Show the ids of all employees who have either destroyed a document or made an authorization to do this. ### Input: CREATE TA...
what are the five most commonly given laboratory tests for patients who previously had a partial pancreatect nec within the same month?
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABL...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the five most commonly given laboratory tests for patients who previously had a partial pancreatect nec within the ...
What daft pick number is the player coming from Regina Pats (WHL)?
CREATE TABLE table_2850912_1 ( pick__number VARCHAR, college_junior_club_team VARCHAR )
SELECT pick__number FROM table_2850912_1 WHERE college_junior_club_team = "Regina Pats (WHL)"
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 daft pick number is the player coming from Regina Pats (WHL)? ### Input: CREATE TABLE table_2850912_1 ( pick__numbe...
What is the Rank of the Character with Tenure of 2011?
CREATE TABLE table_name_2 ( rank VARCHAR, tenure VARCHAR )
SELECT rank FROM table_name_2 WHERE tenure = "2011"
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 Rank of the Character with Tenure of 2011? ### Input: CREATE TABLE table_name_2 ( rank VARCHAR, tenure V...
in how many dates the game was 2
CREATE TABLE table_31453 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Date") FROM table_31453 WHERE "Game" = '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: in how many dates the game was 2 ### Input: CREATE TABLE table_31453 ( "Game" real, "Date" text, "Team" text, ...
What is the Year commissioned of the power station with a Gross head of 60 metres and Average annual output of less than 59 million KWh?
CREATE TABLE table_76085 ( "Name" text, "Year commissioned" real, "Gross head (metres)" real, "Installed capacity (megawatts)" real, "Average annual output (million KWh)" real )
SELECT MAX("Year commissioned") FROM table_76085 WHERE "Gross head (metres)" = '60' AND "Average annual output (million KWh)" < '59'
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 Year commissioned of the power station with a Gross head of 60 metres and Average annual output of less than 59 ...
Which opponent has a Season of 2010/11?
CREATE TABLE table_name_7 ( opponent VARCHAR, season VARCHAR )
SELECT opponent FROM table_name_7 WHERE season = "2010/11"
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 opponent has a Season of 2010/11? ### Input: CREATE TABLE table_name_7 ( opponent VARCHAR, season VARCHAR ) ##...
What's the average number of wins for those with less than 2 byes?
CREATE TABLE table_61970 ( "Golden Rivers" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
SELECT AVG("Wins") FROM table_61970 WHERE "Byes" < '2'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the average number of wins for those with less than 2 byes? ### Input: CREATE TABLE table_61970 ( "Golden Rivers"...
Calculate the minimum age of patients who had coronary artery disease or a coronary artery bypass graft had myomectomy/sda as their primary disease and died before the year 2138
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" AND demographic.dod_year < "2138.0"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Calculate the minimum age of patients who had coronary artery disease or a coronary artery bypass graft had myomectomy/sda a...
What are the names and ages of editors? Show me a bar chart.
CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text ) CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int ) CREATE TABLE editor ( Editor_ID int, Name text, Age real )
SELECT Name, Age FROM editor
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 names and ages of editors? Show me a bar chart. ### Input: CREATE TABLE journal_committee ( Editor_ID int, ...
Show me the proportion on what are the names and number of hours spent training for each player who trains for less than 1500 hours?
CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) )
SELECT pName, HS FROM Player WHERE HS < 1500
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 me the proportion on what are the names and number of hours spent training for each player who trains for less than 150...
For those records from the products and each product's manufacturer, show me about the distribution of founder and the amount of founder , and group by attribute founder in a bar chart, and list total number in desc order 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 Founder, COUNT(Founder) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY COUNT(Founder) 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 founder and the amoun...
with a record of 73-82 what was the date?
CREATE TABLE table_11261 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
SELECT "Date" FROM table_11261 WHERE "Record" = '73-82'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: with a record of 73-82 what was the date? ### Input: CREATE TABLE table_11261 ( "Date" text, "Opponent" text, "S...
who is at the top out of the riders ?
CREATE TABLE table_203_166 ( id number, "pos" text, "no" number, "rider" text, "manufacturer" text, "laps" number, "time" text, "grid" number, "points" number )
SELECT "rider" FROM table_203_166 ORDER BY "pos" 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 is at the top out of the riders ? ### Input: CREATE TABLE table_203_166 ( id number, "pos" text, "no" number...
questions answers per hour for user.
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT TIME_TO_STR(CreationDate, '%h') AS hour, COUNT(CASE WHEN PostTypeId = 1 THEN 1 END) AS questions, COUNT(CASE WHEN PostTypeId = 2 THEN 1 END) AS answers FROM Posts WHERE PostTypeId IN (1, 2) GROUP BY TIME_TO_STR(CreationDate, '%h')
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: questions answers per hour for user. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boo...
For those records from the products and each product's manufacturer, find name and the average of revenue , and group by attribute name, and visualize them by a bar chart.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, find name and the average of revenue , and group by att...
what are the different card types, and how many transactions have been made with each?
CREATE TABLE Customers ( customer_id INTEGER, customer_first_name VARCHAR(20), customer_last_name VARCHAR(20), customer_address VARCHAR(255), customer_phone VARCHAR(255), customer_email VARCHAR(255), other_customer_details VARCHAR(255) ) CREATE TABLE Financial_Transactions ( transaction...
SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_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 different card types, and how many transactions have been made with each? ### Input: CREATE TABLE Customers ( ...
What is To Par, when Player is 'Tommy Bolt'?
CREATE TABLE table_name_55 ( to_par VARCHAR, player VARCHAR )
SELECT to_par FROM table_name_55 WHERE player = "tommy bolt"
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 To Par, when Player is 'Tommy Bolt'? ### Input: CREATE TABLE table_name_55 ( to_par VARCHAR, player VARCHAR ...
Name the maximum wins for 68.75%
CREATE TABLE table_20326 ( "Year" real, "Matches" real, "Wins" real, "Losses" real, "No Result" real, "Tied" real, "Success Rate" text, "Position" text, "Summary" text )
SELECT MAX("Wins") FROM table_20326 WHERE "Success Rate" = '68.75%'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the maximum wins for 68.75% ### Input: CREATE TABLE table_20326 ( "Year" real, "Matches" real, "Wins" real,...
What is the home team that played on M.C.G. grounds?
CREATE TABLE table_16388398_2 ( home_team VARCHAR, ground VARCHAR )
SELECT home_team FROM table_16388398_2 WHERE ground = "M.C.G."
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 home team that played on M.C.G. grounds? ### Input: CREATE TABLE table_16388398_2 ( home_team VARCHAR, g...
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and show Y in desc order.
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the sum of...
What are the upper-level elective options for the Spring and Summer ?
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = '...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the upper-level elective options for the Spring and Summer ? ### Input: CREATE TABLE offering_instructor ( offe...
How many sitting Representatives are there in the New York 10 polling area?
CREATE TABLE table_18607 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT COUNT("Incumbent") FROM table_18607 WHERE "District" = 'New York 10'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many sitting Representatives are there in the New York 10 polling area? ### Input: CREATE TABLE table_18607 ( "Distr...
What is the Date of the Competition with a Result of 3 0?
CREATE TABLE table_name_75 ( date VARCHAR, result VARCHAR )
SELECT date FROM table_name_75 WHERE result = "3–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 Date of the Competition with a Result of 3 0? ### Input: CREATE TABLE table_name_75 ( date VARCHAR, resu...
Who scored the most points in Game 49?
CREATE TABLE table_11960407_5 ( high_points VARCHAR, game VARCHAR )
SELECT high_points FROM table_11960407_5 WHERE game = 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: Who scored the most points in Game 49? ### Input: CREATE TABLE table_11960407_5 ( high_points VARCHAR, game VARCHAR ...
Which entrant has a Mclaren m7c Chassis?
CREATE TABLE table_14649 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
SELECT "Entrant" FROM table_14649 WHERE "Chassis" = 'mclaren m7c'
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 entrant has a Mclaren m7c Chassis? ### Input: CREATE TABLE table_14649 ( "Year" real, "Entrant" text, "Cha...
On what date was the opponent the Miami Dolphins?
CREATE TABLE table_name_30 ( date VARCHAR, opponent VARCHAR )
SELECT date FROM table_name_30 WHERE opponent = "miami dolphins"
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 date was the opponent the Miami Dolphins? ### Input: CREATE TABLE table_name_30 ( date VARCHAR, opponent VAR...
Number of questions with ViewCount > nviews.
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId num...
WITH TaggedPosts AS (SELECT ViewCount FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%##tagSubstring?python##%'), MostViewedQuestions AS (SELECT Count = COUNT(*) FROM TaggedPosts WHERE ViewCount > '##nviews:int?10000##') SELECT Count, CAST(Count AS FLOAT(20, 5)) * 100.0 / (SELECT COUNT(*) FROM TaggedPosts) AS Percentil...
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: Number of questions with ViewCount > nviews. ### Input: CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, ...
What is the tally with a total larger than 8, Waterford was the opposition?
CREATE TABLE table_13960 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text )
SELECT "Tally" FROM table_13960 WHERE "Total" > '8' AND "Opposition" = 'waterford'
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 tally with a total larger than 8, Waterford was the opposition? ### Input: CREATE TABLE table_13960 ( "Rank"...
Which courses involve parts of Integ Microsys Lab and Health Care Markets and Public Policies , can you show me ?
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_ins...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Health Care Markets and Public Policies%' OR course.description LIKE '%Health Care Markets and Public Policies%' OR course.name LIKE '%Health Care Markets and Public Pol...
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: Which courses involve parts of Integ Microsys Lab and Health Care Markets and Public Policies , can you show me ? ### Input:...
What is the weight of the player from club panionios g.c. and was born on 1975-05-21?
CREATE TABLE table_79053 ( "Name" text, "Pos." text, "Height" text, "Weight" text, "Date of Birth" text, "Club" text )
SELECT "Weight" FROM table_79053 WHERE "Club" = 'panionios g.c.' AND "Date of Birth" = '1975-05-21'
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 weight of the player from club panionios g.c. and was born on 1975-05-21? ### Input: CREATE TABLE table_79053 ( ...
What player was drafted by the philadelphia union?
CREATE TABLE table_27735 ( "Pick #" real, "MLS Team" text, "Player" text, "Position" text, "Affiliation" text )
SELECT "Player" FROM table_27735 WHERE "MLS Team" = 'Philadelphia Union'
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 was drafted by the philadelphia union? ### Input: CREATE TABLE table_27735 ( "Pick #" real, "MLS Team" t...
What are the years of participation for pickerington north?
CREATE TABLE table_21685 ( "School" text, "Years of Participation" text, "OCC Championships" real, "Last OCC Championship" text, "Last Outright OCC Championship" text )
SELECT "Years of Participation" FROM table_21685 WHERE "School" = 'Pickerington North'
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 of participation for pickerington north? ### Input: CREATE TABLE table_21685 ( "School" text, "Ye...
What is the average lap of the race with a 23 finish?
CREATE TABLE table_15315 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
SELECT AVG("Laps") FROM table_15315 WHERE "Finish" = '23'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average lap of the race with a 23 finish? ### Input: CREATE TABLE table_15315 ( "Year" text, "Start" tex...
when did patient 015-910 come into the hospital for the last time during this year?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '015-910' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when did patient 015-910 come into the hospital for the last time during this year? ### Input: CREATE TABLE intakeoutput ( ...
Tell what has the App(GS/Sub) of 14 (8/6)
CREATE TABLE table_name_70 ( name VARCHAR, app_gs_sub_ VARCHAR )
SELECT name FROM table_name_70 WHERE app_gs_sub_ = "14 (8/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: Tell what has the App(GS/Sub) of 14 (8/6) ### Input: CREATE TABLE table_name_70 ( name VARCHAR, app_gs_sub_ VARCHAR ...
For the verb dhoa, what is the 2VF?
CREATE TABLE table_name_75 ( verb VARCHAR )
SELECT 2 AS __vf_ FROM table_name_75 WHERE verb = "dhoa"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For the verb dhoa, what is the 2VF? ### Input: CREATE TABLE table_name_75 ( verb VARCHAR ) ### Response: SELECT 2 AS __v...
Which episode 4 has a Star of anna powierza?
CREATE TABLE table_name_87 ( episode_4 VARCHAR, star VARCHAR )
SELECT episode_4 FROM table_name_87 WHERE star = "anna powierza"
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 episode 4 has a Star of anna powierza? ### Input: CREATE TABLE table_name_87 ( episode_4 VARCHAR, star VARCHAR...
Which Season has 95 Points?
CREATE TABLE table_14917 ( "Season" text, "Series" text, "Races" text, "Wins" text, "Podiums" text, "Points" text, "Final Placing" text )
SELECT "Season" FROM table_14917 WHERE "Points" = '95'
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 Season has 95 Points? ### Input: CREATE TABLE table_14917 ( "Season" text, "Series" text, "Races" text, ...
what chart position did the single with david bowie reach in the us ?
CREATE TABLE table_200_22 ( id number, "year" number, "single" text, "peak chart positions\nger" number, "peak chart positions\nire" number, "peak chart positions\nuk" number, "peak chart positions\nus" number, "peak chart positions\nus\nmain" number, "peak chart positions\nus\ndance...
SELECT "peak chart positions\nus" FROM table_200_22 WHERE "single" = 'with david bowie'
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 chart position did the single with david bowie reach in the us ? ### Input: CREATE TABLE table_200_22 ( id number, ...
give me the number of patients whose year of death is less than or equal to 2132 and drug name is sertraline?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2132.0" AND prescriptions.drug = "Sertraline"
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 year of death is less than or equal to 2132 and drug name is sertraline? ### Input: CRE...
What is Team, when Game is 77?
CREATE TABLE table_name_90 ( team VARCHAR, game VARCHAR )
SELECT team FROM table_name_90 WHERE game = 77
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 Team, when Game is 77? ### Input: CREATE TABLE table_name_90 ( team VARCHAR, game VARCHAR ) ### Response: SE...
Which city has spanish news on the website ultimahora.com ?
CREATE TABLE table_70836 ( "Name" text, "Frequency" text, "Language" text, "City" text, "Website" text )
SELECT "City" FROM table_70836 WHERE "Language" = 'spanish' AND "Website" = 'ultimahora.com'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which city has spanish news on the website ultimahora.com ? ### Input: CREATE TABLE table_70836 ( "Name" text, "Freq...
Who is sezen aksu's producer?
CREATE TABLE table_47475 ( "Track" real, "Title" text, "Songwriter(s)" text, "Producer(s)" text, "Length" text )
SELECT "Producer(s)" FROM table_47475 WHERE "Songwriter(s)" = 'sezen aksu'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is sezen aksu's producer? ### Input: CREATE TABLE table_47475 ( "Track" real, "Title" text, "Songwriter(s)" ...
What was the purpose of the Quay test blast?
CREATE TABLE table_name_54 ( purpose VARCHAR, name VARCHAR )
SELECT purpose FROM table_name_54 WHERE name = "quay"
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 purpose of the Quay test blast? ### Input: CREATE TABLE table_name_54 ( purpose VARCHAR, name VARCHAR )...
What hour of the day I post the most answers.
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswer...
SELECT TIME_TO_STR(p.CreationDate, '%h'), COUNT(*) FROM Posts AS p WHERE p.OwnerUserId = @UserId AND p.PostTypeId = 2 GROUP BY TIME_TO_STR(p.CreationDate, '%h')
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What hour of the day I post the most answers. ### Input: CREATE TABLE ReviewRejectionReasons ( Id number, Name text,...
What was Berlin when fk pirmasens was S dwest and westfalia herne was west?
CREATE TABLE table_51004 ( "Year" real, "Nord" text, "West" text, "S\u00fcdwest" text, "Berlin" text )
SELECT "Berlin" FROM table_51004 WHERE "S\u00fcdwest" = 'fk pirmasens' AND "West" = 'westfalia herne'
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 Berlin when fk pirmasens was S dwest and westfalia herne was west? ### Input: CREATE TABLE table_51004 ( "Year"...
Which Team classification has a Combination classification of egoi mart nez, and a Winner of tom boonen?
CREATE TABLE table_6000 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Combination classification" text, "Team classification" text )
SELECT "Team classification" FROM table_6000 WHERE "Combination classification" = 'egoi martínez' AND "Winner" = 'tom boonen'
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 Team classification has a Combination classification of egoi mart nez, and a Winner of tom boonen? ### Input: CREATE T...
Which series has a season premiere on January 3, 2007 with the most episodes?
CREATE TABLE table_11144 ( "Season" real, "Episodes" real, "Originally aired" text, "Season Premiere" text, "Season Finale" text, "DVD release date" text )
SELECT MAX("Episodes") FROM table_11144 WHERE "Season Premiere" = 'january 3, 2007'
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 series has a season premiere on January 3, 2007 with the most episodes? ### Input: CREATE TABLE table_11144 ( "Sea...
Who was the opposition at 11,682 excl. exhibition match?
CREATE TABLE table_name_39 ( opposition VARCHAR, stadium VARCHAR )
SELECT opposition FROM table_name_39 WHERE stadium = "11,682 excl. exhibition match"
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 opposition at 11,682 excl. exhibition match? ### Input: CREATE TABLE table_name_39 ( opposition VARCHAR, ...
What is the Time when the Epicenter was Bam?
CREATE TABLE table_32293 ( "Date" text, "Time" text, "Epicenter" text, "Magnitude" text, "Fatalities" text, "Name" text )
SELECT "Time" FROM table_32293 WHERE "Epicenter" = 'bam'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Time when the Epicenter was Bam? ### Input: CREATE TABLE table_32293 ( "Date" text, "Time" text, "Ep...
What is the interview number in Louisiana, and the swimsuit number is more than 9.1?
CREATE TABLE table_name_19 ( interview VARCHAR, country VARCHAR, swimsuit VARCHAR )
SELECT COUNT(interview) FROM table_name_19 WHERE country = "louisiana" AND swimsuit > 9.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 interview number in Louisiana, and the swimsuit number is more than 9.1? ### Input: CREATE TABLE table_name_19 (...
Where Bolton Wanderers is the home team, who is the away team?
CREATE TABLE table_41721 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text, "Attendance" text )
SELECT "Away team" FROM table_41721 WHERE "Home team" = 'bolton wanderers'
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: Where Bolton Wanderers is the home team, who is the away team? ### Input: CREATE TABLE table_41721 ( "Tie no" text, ...
what is days of hospital stay and death status of subject name elizabeth bateman?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Elizabeth Bateman"
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 days of hospital stay and death status of subject name elizabeth bateman? ### Input: CREATE TABLE lab ( subject_...
let me know the primary disease and name of the patient with patient id 7578.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT demographic.name, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "7578"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: let me know the primary disease and name of the patient with patient id 7578. ### Input: CREATE TABLE procedures ( subje...
What is 1989, when 1999 is F, and when 1994 is 2R?
CREATE TABLE table_41090 ( "Tournament" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text...
SELECT "1989" FROM table_41090 WHERE "1999" = 'f' AND "1994" = '2r'
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 1989, when 1999 is F, and when 1994 is 2R? ### Input: CREATE TABLE table_41090 ( "Tournament" text, "1987" t...
What was the winning score on 7 jun 1976?
CREATE TABLE table_name_4 ( winning_score VARCHAR, date VARCHAR )
SELECT winning_score FROM table_name_4 WHERE date = "7 jun 1976"
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 winning score on 7 jun 1976? ### Input: CREATE TABLE table_name_4 ( winning_score VARCHAR, date VARCHAR...
What percentage of the votes did Obama get in the county where McCain got 3648 votes?
CREATE TABLE table_23747 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real, "Total" real )
SELECT "Obama%" FROM table_23747 WHERE "McCain#" = '3648'
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 percentage of the votes did Obama get in the county where McCain got 3648 votes? ### Input: CREATE TABLE table_23747 ( ...
Have I taken any courses that are among the most difficult in the NERS department ?
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE ta ( campus_job_id int, student_id int...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'NERS' AND program_course.workload = (SELECT MAX(...
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: Have I taken any courses that are among the most difficult in the NERS department ? ### Input: CREATE TABLE semester ( s...
how many patients whose diagnoses long title is neonatal hypoglycemia and lab test category is chemistry?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Neonatal hypoglycemia" AND lab."CATEGORY" = "Chemistry"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose diagnoses long title is neonatal hypoglycemia and lab test category is chemistry? ### Input: CREATE ...
what was the length of stay of patient 15135's last hospital stay?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id numbe...
SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 15135 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the length of stay of patient 15135's last hospital stay? ### Input: CREATE TABLE d_icd_diagnoses ( row_id numb...
Opened prior to 1877 only 2.44km from Wellington, when did this station close?
CREATE TABLE table_name_6 ( closed VARCHAR, opened VARCHAR, distance_from_wellington VARCHAR )
SELECT closed FROM table_name_6 WHERE opened < 1877 AND distance_from_wellington = "2.44km"
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: Opened prior to 1877 only 2.44km from Wellington, when did this station close? ### Input: CREATE TABLE table_name_6 ( cl...
What is Dennis Kucinich, when Classification is 'Democrat'?
CREATE TABLE table_59428 ( "Classification" text, "% of all" text, "John Kerry" text, "John Edwards" text, "Dennis Kucinich" text )
SELECT "Dennis Kucinich" FROM table_59428 WHERE "Classification" = 'democrat'
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 Dennis Kucinich, when Classification is 'Democrat'? ### Input: CREATE TABLE table_59428 ( "Classification" text,...
in the month of december are there any flights from ATLANTA to DENVER that stop in BOSTON
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airlin...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND CITY_2.cit...
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: in the month of december are there any flights from ATLANTA to DENVER that stop in BOSTON ### Input: CREATE TABLE flight_leg...
What architecture type does the Ford Escort Wagon have?
CREATE TABLE table_name_73 ( architecture VARCHAR, original_vehicle VARCHAR )
SELECT architecture FROM table_name_73 WHERE original_vehicle = "ford escort wagon"
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 architecture type does the Ford Escort Wagon have? ### Input: CREATE TABLE table_name_73 ( architecture VARCHAR, ...
when did patient 005-4471 first had the tube feeding residual discarded (ml) output since 08/08/2102?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, ...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-4471')) AND intakeoutput.cellpath LIKE '%output%'...
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 005-4471 first had the tube feeding residual discarded (ml) output since 08/08/2102? ### Input: CREATE TABL...
Questions where a given tag was added not by its author.
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDis...
SELECT q.Id AS "post_link", h.Text AS "edited_tags", q.OwnerUserId AS "user_link", q.CreationDate AS "post_date", h.UserId AS "user_link", h.CreationDate AS "edit_date" FROM PostHistory AS h, Posts AS q WHERE h.PostId = q.Id AND h.PostHistoryTypeId = 6 AND h.Text LIKE '%<' + '##Tag##' + '>%' AND h.UserId != q.OwnerUser...
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: Questions where a given tag was added not by its author. ### Input: CREATE TABLE PostTags ( PostId number, TagId num...
What is the name of the 9th ranked common?
CREATE TABLE table_1449176_1 ( common_of VARCHAR, rank VARCHAR )
SELECT common_of FROM table_1449176_1 WHERE rank = "9th"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name of the 9th ranked common? ### Input: CREATE TABLE table_1449176_1 ( common_of VARCHAR, rank VARCHAR...
What is Ryan McCay's speed that has a rank better than 8?
CREATE TABLE table_name_65 ( speed VARCHAR, rank VARCHAR, rider VARCHAR )
SELECT speed FROM table_name_65 WHERE rank > 8 AND rider = "ryan mccay"
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 Ryan McCay's speed that has a rank better than 8? ### Input: CREATE TABLE table_name_65 ( speed VARCHAR, ran...
What Call sign has a City of license of higgston, ga?
CREATE TABLE table_name_95 ( call_sign VARCHAR, city_of_license VARCHAR )
SELECT call_sign FROM table_name_95 WHERE city_of_license = "higgston, ga"
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 Call sign has a City of license of higgston, ga? ### Input: CREATE TABLE table_name_95 ( call_sign VARCHAR, cit...
how many days after september 3rd did brian perform in stockholm ?
CREATE TABLE table_203_855 ( id number, "date" text, "city" text, "venue" text, "member" text, "performance" text, "notes" text )
SELECT (SELECT "date" FROM table_203_855 WHERE "city" = 'stockholm') - 3
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 days after september 3rd did brian perform in stockholm ? ### Input: CREATE TABLE table_203_855 ( id number, ...
what is the number of patients born before 1821 who were discharged to skilled nursing facility?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.dob_year < "1821"
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 born before 1821 who were discharged to skilled nursing facility? ### Input: CREATE TABLE dia...
What was the date that an away team score 11.22 (88)?
CREATE TABLE table_57405 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_57405 WHERE "Away team score" = '11.22 (88)'
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 date that an away team score 11.22 (88)? ### Input: CREATE TABLE table_57405 ( "Home team" text, "Home ...
what are the number of years maine has participated ?
CREATE TABLE table_203_502 ( id number, "team" text, "titles" number, "runner-up" number, "third place" number, "fourth place" number, "years participated" number )
SELECT "years participated" FROM table_203_502 WHERE "team" = 'maine'
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 are the number of years maine has participated ? ### Input: CREATE TABLE table_203_502 ( id number, "team" text...
When 100 g/mi (62 g/km) is the clean electric grid california (san francisco) how many vehicles are there?
CREATE TABLE table_27011 ( "Vehicle" text, "Operating mode" text, "EPA rated All-electric range" text, "EPA rated combined fuel economy" text, "Clean electric grid California (San Francisco)" text, "U.S. national average electric mix" text, "Dirty electric grid Rocky Mountains (Denver)" text...
SELECT COUNT("Vehicle") FROM table_27011 WHERE "Clean electric grid California (San Francisco)" = '100 g/mi (62 g/km)'
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 100 g/mi (62 g/km) is the clean electric grid california (san francisco) how many vehicles are there? ### Input: CREATE...
Show all dates of transactions whose type code is 'SALE', and count them by a line chart, and list x axis from high to low order.
CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Transactions_Lots ( transaction_id INTEGER, lot_id INTEGER ) CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Transactions ( transacti...
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE transaction_type_code = "SALE" ORDER BY date_of_transaction 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 all dates of transactions whose type code is 'SALE', and count them by a line chart, and list x axis from high to low o...
Show the number of customers for each gender. Show scatter chart.
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, account_id INTEGER, invoice_number INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DECIMAL(19,4), transaction_comment VARCHAR(255), other_transaction_details VARCHAR(255) ) CREATE TABLE Or...
SELECT gender, COUNT(*) FROM Customers GROUP BY gender
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show the number of customers for each gender. Show scatter chart. ### Input: CREATE TABLE Financial_Transactions ( trans...
What is Quantity Made, when Manufacturer is 'Baldwin'?
CREATE TABLE table_name_3 ( quantity_made VARCHAR, manufacturer VARCHAR )
SELECT quantity_made FROM table_name_3 WHERE manufacturer = "baldwin"
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 Quantity Made, when Manufacturer is 'Baldwin'? ### Input: CREATE TABLE table_name_3 ( quantity_made VARCHAR, ...
Show the position of players and the corresponding number of players.
CREATE TABLE player ( player_id number, player text, years_played text, total_wl text, singles_wl text, doubles_wl text, team number ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, dr...
SELECT position, COUNT(*) FROM match_season GROUP BY position
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: Show the position of players and the corresponding number of players. ### Input: CREATE TABLE player ( player_id number,...
What were the reasons that venues closed in the 1990s?
CREATE TABLE table_43486 ( "Venue" text, "Location" text, "Environment" text, "Closed" text, "Reason" text )
SELECT "Reason" FROM table_43486 WHERE "Closed" = '1990s'
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 the reasons that venues closed in the 1990s? ### Input: CREATE TABLE table_43486 ( "Venue" text, "Location...