instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
What is the competition type when the score is 1-1?
CREATE TABLE table_15627 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Competition" FROM table_15627 WHERE "Score" = '1-1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the competition type when the score is 1-1? ### Input: CREATE TABLE table_15627 ( "Date" text, "Venue" text,...
what is the geo id when the land (sqmi) is less than 36.112, the latitude is more than 47.536618, the township is west bay and water (sqmi) is more than 0.209?
CREATE TABLE table_name_21 ( geo_id INTEGER, water__sqmi_ VARCHAR, township VARCHAR, land___sqmi__ VARCHAR, latitude VARCHAR )
SELECT SUM(geo_id) FROM table_name_21 WHERE land___sqmi__ < 36.112 AND latitude > 47.536618 AND township = "west bay" AND water__sqmi_ > 0.209
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 geo id when the land (sqmi) is less than 36.112, the latitude is more than 47.536618, the township is west bay a...
How many were penanced when the number with known sentences was 71 (1600 1773)?
CREATE TABLE table_51149 ( "Tribunal" text, "Number of autos da f\u00e9 with known sentences" text, "Executions in persona" text, "Executions in effigie" text, "Penanced" text, "Total" text )
SELECT "Penanced" FROM table_51149 WHERE "Number of autos da f\u00e9 with known sentences" = '71 (1600–1773)'
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 were penanced when the number with known sentences was 71 (1600 1773)? ### Input: CREATE TABLE table_51149 ( "T...
Which Case length has a Rim diameter of 13.20 (.518)?
CREATE TABLE table_name_90 ( case_length VARCHAR, rim_diameter VARCHAR )
SELECT case_length FROM table_name_90 WHERE rim_diameter = "13.20 (.518)"
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 Case length has a Rim diameter of 13.20 (.518)? ### Input: CREATE TABLE table_name_90 ( case_length VARCHAR, r...
who does chasins collaborate with ?
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE field ( fieldid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE ...
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'chasins' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
scholar
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who does chasins collaborate with ? ### Input: CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABL...
Show ids for all documents with budget types described as 'Government'.
CREATE TABLE Ref_Budget_Codes ( Budget_Type_code VARCHAR, budget_type_Description VARCHAR ) CREATE TABLE Documents_with_expenses ( document_id VARCHAR, Budget_Type_code VARCHAR )
SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = "Government"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show ids for all documents with budget types described as 'Government'. ### Input: CREATE TABLE Ref_Budget_Codes ( Budge...
How many districts have an area of 17.72 KM2?
CREATE TABLE table_1104312_5 ( english_name VARCHAR, area_in_km² VARCHAR )
SELECT COUNT(english_name) FROM table_1104312_5 WHERE area_in_km² = "17.72"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many districts have an area of 17.72 KM2? ### Input: CREATE TABLE table_1104312_5 ( english_name VARCHAR, area_i...
what is the reported death date for laura svehaug?
CREATE TABLE table_name_97 ( reported_death_date VARCHAR, name VARCHAR )
SELECT reported_death_date FROM table_name_97 WHERE name = "laura svehaug"
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 reported death date for laura svehaug? ### Input: CREATE TABLE table_name_97 ( reported_death_date VARCHAR, ...
which country has miss universe Hungary as former pageant?
CREATE TABLE table_14308895_2 ( country_territory VARCHAR, former_pageant VARCHAR )
SELECT country_territory FROM table_14308895_2 WHERE former_pageant = "Miss Universe Hungary"
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 country has miss universe Hungary as former pageant? ### Input: CREATE TABLE table_14308895_2 ( country_territory ...
calculate the number of patients tested for clinical chemistry who had infection with microorganisms resistant to penicillins
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Infection with microorganisms resistant to penicillins" 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: calculate the number of patients tested for clinical chemistry who had infection with microorganisms resistant to penicillin...
Retrieve profile image url of user 'jabbink'.
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, De...
SELECT ProfileImageUrl FROM Users WHERE Id = '##UserID##'
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Retrieve profile image url of user 'jabbink'. ### Input: CREATE TABLE ReviewTaskTypes ( Id number, Name text, De...
What is the Record for a game less than 3 and the score was l 91 96 (ot)?
CREATE TABLE table_42104 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Record" FROM table_42104 WHERE "Game" < '3' AND "Score" = 'l 91–96 (ot)'
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 Record for a game less than 3 and the score was l 91 96 (ot)? ### Input: CREATE TABLE table_42104 ( "Game" r...
Tag answer vote distribution by day of month. It is normalized by that not all months have 31, 30, 29th days.
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId ...
WITH Raw AS (SELECT DAY(Votes.CreationDate) AS DoM, COUNT(*) AS Count FROM Posts, Votes, PostTags WHERE Votes.PostId = Posts.Id AND Posts.ParentId = PostTags.PostId AND Votes.VoteTypeId BETWEEN 1 AND 2 AND PostTags.TagId = @TagId GROUP BY DAY(Votes.CreationDate)), Raw2 AS (SELECT DoM, CASE WHEN DoM = 31 THEN 12.0 / 7 W...
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tag answer vote distribution by day of month. It is normalized by that not all months have 31, 30, 29th days. ### Input: CRE...
Who was the home team when the score was 0:1?
CREATE TABLE table_name_90 ( home VARCHAR, score VARCHAR )
SELECT home FROM table_name_90 WHERE score = "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: Who was the home team when the score was 0:1? ### Input: CREATE TABLE table_name_90 ( home VARCHAR, score VARCHAR ) ...
What was the outcome of the election in Pennsylvania 6 district?
CREATE TABLE table_18301 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Result" FROM table_18301 WHERE "District" = 'Pennsylvania 6'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the outcome of the election in Pennsylvania 6 district? ### Input: CREATE TABLE table_18301 ( "District" text, ...
Show me about the distribution of All_Road and Team_ID in a bar chart, I want to order x axis in desc order.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Road, Team_ID FROM basketball_match ORDER BY All_Road 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 me about the distribution of All_Road and Team_ID in a bar chart, I want to order x axis in desc order. ### Input: CREA...
What is the Date of the Crystal Palace Away game?
CREATE TABLE table_name_33 ( date VARCHAR, away_team VARCHAR )
SELECT date FROM table_name_33 WHERE away_team = "crystal palace"
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 Crystal Palace Away game? ### Input: CREATE TABLE table_name_33 ( date VARCHAR, away_team VA...
How many feet in length are there when the length is 106.1 meters?
CREATE TABLE table_16226584_1 ( length_feet VARCHAR, length_meters VARCHAR )
SELECT COUNT(length_feet) FROM table_16226584_1 WHERE length_meters = "106.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: How many feet in length are there when the length is 106.1 meters? ### Input: CREATE TABLE table_16226584_1 ( length_fee...
is -bands in patient 002-44624 last measured on the first hospital visit greater than the first value measured on the first hospital visit?
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 (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-44624' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
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: is -bands in patient 002-44624 last measured on the first hospital visit greater than the first value measured on the first ...
What is the name of the episode with 418 as the production code?
CREATE TABLE table_3990 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
SELECT "Title" FROM table_3990 WHERE "Production code" = '418'
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 of the episode with 418 as the production code? ### Input: CREATE TABLE table_3990 ( "No. in series" te...
What is the -500 number for Theo Bos?
CREATE TABLE table_1912276_2 ( __500m VARCHAR, name VARCHAR )
SELECT __500m FROM table_1912276_2 WHERE name = "Theo Bos"
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 -500 number for Theo Bos? ### Input: CREATE TABLE table_1912276_2 ( __500m VARCHAR, name VARCHAR ) ### R...
Find the number of the parties associated with the delegates from district 1. Who served as governors of the parties?
CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( ...
SELECT Governor, COUNT(Governor) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Find the number of the parties associated with the delegates from district 1. Who served as governors of the parties? ### In...
What is the Name of the Gabeca Montichiari Club?
CREATE TABLE table_66334 ( "Name" text, "Height" text, "Weight" text, "Spike" text, "2008 club" text )
SELECT "Name" FROM table_66334 WHERE "2008 club" = 'gabeca montichiari'
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 of the Gabeca Montichiari Club? ### Input: CREATE TABLE table_66334 ( "Name" text, "Height" text, ...
tell me the medication that patient 60014 has been prescribed for the last time until 40 months ago.
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, las...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60014) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-40 month') ORDER BY prescriptions.startdate 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: tell me the medication that patient 60014 has been prescribed for the last time until 40 months ago. ### Input: CREATE TABLE...
How many weeks have pittsburgh steelers as the opponent?
CREATE TABLE table_name_89 ( week VARCHAR, opponent VARCHAR )
SELECT COUNT(week) FROM table_name_89 WHERE opponent = "pittsburgh steelers"
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 weeks have pittsburgh steelers as the opponent? ### Input: CREATE TABLE table_name_89 ( week VARCHAR, oppon...
how many patients from white ethnic origin had pressure ulcer, stage ii?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.short_title = "Pressure ulcer, stage II"
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 from white ethnic origin had pressure ulcer, stage ii? ### Input: CREATE TABLE demographic ( subject_i...
i was wondering what patient 5878's minimum value of heart rate since 1857 days ago was?
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, d...
SELECT MIN(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 = 5878)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart...
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: i was wondering what patient 5878's minimum value of heart rate since 1857 days ago was? ### Input: CREATE TABLE prescriptio...
What is the date for the Operational Livery?
CREATE TABLE table_55213 ( "Number & Name" text, "Description" text, "Livery" text, "Owner(s)" text, "Date" text )
SELECT "Date" FROM table_55213 WHERE "Livery" = 'operational'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the date for the Operational Livery? ### Input: CREATE TABLE table_55213 ( "Number & Name" text, "Descriptio...
What day did the home side score 14.13 (97)?
CREATE TABLE table_4631 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_4631 WHERE "Home team score" = '14.13 (97)'
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 day did the home side score 14.13 (97)? ### Input: CREATE TABLE table_4631 ( "Home team" text, "Home team score...
What is the % (1960) of the county with a % (2040) of 3.4?
CREATE TABLE table_32672 ( "Rank" text, "County" text, "% (1960)" real, "% (2000)" real, "% (2040)" real )
SELECT COUNT("% (1960)") FROM table_32672 WHERE "% (2040)" = '3.4'
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 % (1960) of the county with a % (2040) of 3.4? ### Input: CREATE TABLE table_32672 ( "Rank" text, "Count...
What is the sum of the places of the team with more than 49 points and less than 54 goals scored?
CREATE TABLE table_58676 ( "Place (Posici\u00f3n)" real, "Team (Equipo)" text, "Played (PJ)" real, "Won (PG)" real, "Draw (PE)" real, "Lost (PP)" real, "Goals Scored (GF)" real, "Goals Conceded (GC)" real, "+/- (Dif.)" real, "Points (Pts.)" real )
SELECT SUM("Place (Posici\u00f3n)") FROM table_58676 WHERE "Points (Pts.)" > '49' AND "Goals Scored (GF)" < '54'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the sum of the places of the team with more than 49 points and less than 54 goals scored? ### Input: CREATE TABLE ta...
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of first_name and salary , show bar in descending order.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,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 ( EMPLO...
SELECT FIRST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_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: For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart ab...
what flights are available from PITTSBURGH to OAK airport
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'OAK' AND city.city_code = airport_service.city_code AND city.city_name = 'PITTSBURGH' AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.airport_code
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights are available from PITTSBURGH to OAK airport ### Input: CREATE TABLE flight ( aircraft_code_sequence text, ...
what is the number of days that have passed since the last time patient 007-15837 received a tube flush/meds intake on the current icu visit?
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergy...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 =...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of days that have passed since the last time patient 007-15837 received a tube flush/meds intake on the c...
Number of Posts by Tag.
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Comments ( Id number, PostId number, Score nu...
SELECT TAG.Id, TAG.TagName, COUNT(*) AS numPosts FROM Posts INNER JOIN PostTags AS PT ON PT.PostId = Posts.Id INNER JOIN Tags AS TAG ON TAG.Id = PT.TagId WHERE PostTypeId = 1 AND CreationDate >= '2019-01-01T00:00:00' GROUP BY TAG.Id, TAG.TagName ORDER BY numPosts 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: Number of Posts by Tag. ### Input: CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, ...
Which week 4 had a week 3 of Cidney Carson?
CREATE TABLE table_name_80 ( week_4 VARCHAR, week_3 VARCHAR )
SELECT week_4 FROM table_name_80 WHERE week_3 = "cidney carson"
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 week 4 had a week 3 of Cidney Carson? ### Input: CREATE TABLE table_name_80 ( week_4 VARCHAR, week_3 VARCHAR )...
Draw a bar chart of location versus how many location, and display by the x-axis from low to high.
CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text ) CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text )
SELECT Location, COUNT(Location) FROM wrestler GROUP BY Location ORDER 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: Draw a bar chart of location versus how many location, and display by the x-axis from low to high. ### Input: CREATE TABLE w...
List the number of items by the details of the organization that owns it using a bar chart, and display y-axis in asc order.
CREATE TABLE Customers ( customer_id INTEGER, customer_details VARCHAR(255) ) CREATE TABLE Timed_Locations_of_Things ( thing_id INTEGER, Date_and_Time DATETIME, Location_Code CHAR(15) ) CREATE TABLE Things ( thing_id INTEGER, organization_id INTEGER, Type_of_Thing_Code CHAR(15), se...
SELECT organization_details, COUNT(organization_details) FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details ORDER BY COUNT(organization_details)
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: List the number of items by the details of the organization that owns it using a bar chart, and display y-axis in asc order....
What is the average number of laps for the driver Piero Taruffi?
CREATE TABLE table_name_50 ( laps INTEGER, driver VARCHAR )
SELECT AVG(laps) FROM table_name_50 WHERE driver = "piero taruffi"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average number of laps for the driver Piero Taruffi? ### Input: CREATE TABLE table_name_50 ( laps INTEGER, ...
Name the minimum number disc for number in series for 14
CREATE TABLE table_1250 ( "No. in series" text, "No. Disc" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Length (minutes)" real )
SELECT MIN("No. Disc") FROM table_1250 WHERE "No. in series" = '14'
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 minimum number disc for number in series for 14 ### Input: CREATE TABLE table_1250 ( "No. in series" text, ...
What is the Shuji Kondo value related to a PEPE Michinoku value of sabin (14:43)?
CREATE TABLE table_name_2 ( shuji_kondo VARCHAR, pepe_michinoku VARCHAR )
SELECT shuji_kondo FROM table_name_2 WHERE pepe_michinoku = "sabin (14:43)"
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 Shuji Kondo value related to a PEPE Michinoku value of sabin (14:43)? ### Input: CREATE TABLE table_name_2 ( ...
What is the highest student GPA for every department? Return a bar chart, sort by the maximal stu gpa from low to high.
CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1),...
SELECT DEPT_CODE, MAX(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY MAX(STU_GPA)
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 is the highest student GPA for every department? Return a bar chart, sort by the maximal stu gpa from low to high. ### ...
What actor has onderweg naar morgen, as the soap opera, with aafke couwenberg as the character?
CREATE TABLE table_name_47 ( actor VARCHAR, soap_opera VARCHAR, character VARCHAR )
SELECT actor FROM table_name_47 WHERE soap_opera = "onderweg naar morgen" AND character = "aafke couwenberg"
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 actor has onderweg naar morgen, as the soap opera, with aafke couwenberg as the character? ### Input: CREATE TABLE tabl...
Type of primary, and a Call letters of kbjs has what format?
CREATE TABLE table_5630 ( "Frequency (MHz)" real, "Call letters" text, "Licensed location" text, "Type" text, "Format" text )
SELECT "Format" FROM table_5630 WHERE "Type" = 'primary' AND "Call letters" = 'kbjs'
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: Type of primary, and a Call letters of kbjs has what format? ### Input: CREATE TABLE table_5630 ( "Frequency (MHz)" real...
what is the number of patients whose age is less than 80 and diagnoses long title is tietze's disease?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "80" AND diagnoses.long_title = "Tietze's disease"
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 age is less than 80 and diagnoses long title is tietze's disease? ### Input: CREATE TAB...
Which Attendance has a Tie # of 32?
CREATE TABLE table_6495 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
SELECT "Attendance" FROM table_6495 WHERE "Tie no" = '32'
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 Attendance has a Tie # of 32? ### Input: CREATE TABLE table_6495 ( "Tie no" text, "Home team" text, "Score...
Which Against is the highest one that has a Drawn larger than 1, and a Team of corinthians, and a Played smaller than 7?
CREATE TABLE table_37541 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT MAX("Against") FROM table_37541 WHERE "Drawn" > '1' AND "Team" = 'corinthians' AND "Played" < '7'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Against is the highest one that has a Drawn larger than 1, and a Team of corinthians, and a Played smaller than 7? ###...
preexisting severe valvular heart disease
CREATE TABLE table_test_25 ( "id" int, "ejection_fraction_ef" int, "respiratory_tract_infection" bool, "left_ventricular_ejection_fraction_lvef" int, "intra_aortic_balloon_pump_iabp" bool, "systolic_blood_pressure_sbp" int, "central_diabetes_insipidus" bool, "hyponatremia" bool, "hea...
SELECT * FROM table_test_25 WHERE heart_disease = 1
criteria2sql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: preexisting severe valvular heart disease ### Input: CREATE TABLE table_test_25 ( "id" int, "ejection_fraction_ef" i...
What answers did I put my greatest effort into?. Based on the idea that longest answers = most effort
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId n...
SELECT Question.Id AS "post_link", Question.CreationDate AS QuestionCreationDate, LENGTH(Answer.Body) AS AnswerLength, Answer.Score AS AnswerScore, Answer.CommentCount AS AnswerCommentCount FROM Posts AS Answer INNER JOIN Posts AS Question ON (Answer.ParentId = Question.Id) WHERE Answer.OwnerUserId = '##UserId##' AND A...
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 answers did I put my greatest effort into?. Based on the idea that longest answers = most effort ### Input: CREATE TABL...
Which Tournament has a 2004 of 1r?
CREATE TABLE table_40485 ( "Tournament" text, "2004" text, "2005" text, "2006" text, "2007" text )
SELECT "Tournament" FROM table_40485 WHERE "2004" = '1r'
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 Tournament has a 2004 of 1r? ### Input: CREATE TABLE table_40485 ( "Tournament" text, "2004" text, "2005" ...
What are the student ids for those on scholarship in major number 600?
CREATE TABLE plays_games ( stuid number, gameid number, hours_played number ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TAB...
SELECT stuid FROM student WHERE major = 600 INTERSECT SELECT stuid FROM sportsinfo WHERE onscholarship = 'Y'
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 student ids for those on scholarship in major number 600? ### Input: CREATE TABLE plays_games ( stuid numbe...
Find the number of customers that use email as the contact channel and group by customer name and bin active date by weekday in a stacked bar chart.
CREATE TABLE Customers ( customer_id INTEGER, payment_method VARCHAR(15), customer_name VARCHAR(80), date_became_customer DATETIME, other_customer_details VARCHAR(255) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_address_from DATETIME, address_ty...
SELECT active_from_date, COUNT(active_from_date) FROM Customers AS t1 JOIN Customer_Contact_Channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email' GROUP BY customer_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: Find the number of customers that use email as the contact channel and group by customer name and bin active date by weekday...
What is the score when the team is @ dallas?
CREATE TABLE table_29929 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Score" FROM table_29929 WHERE "Team" = '@ Dallas'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the score when the team is @ dallas? ### Input: CREATE TABLE table_29929 ( "Game" real, "Date" text, "Te...
Name the title of jean-pierre jeunet
CREATE TABLE table_name_17 ( english_title VARCHAR, director VARCHAR )
SELECT english_title FROM table_name_17 WHERE director = "jean-pierre jeunet"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the title of jean-pierre jeunet ### Input: CREATE TABLE table_name_17 ( english_title VARCHAR, director VARCHAR...
Name the total number of games for w 112-94
CREATE TABLE table_30051 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Game") FROM table_30051 WHERE "Score" = 'W 112-94'
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 w 112-94 ### Input: CREATE TABLE table_30051 ( "Game" real, "Date" text, "Tea...
What is the largest number of passes for players starting exactly 34 games?
CREATE TABLE table_30519 ( "Nr." real, "Player" text, "Games played" real, "Starting" real, "Sub" real, "Subbed" real, "Mins played" real, "Goals" real, "Pens. against" real, "Pens. for" real, "Fouls suff." real, "Fouls comm." real, "Yellow C" real, "Red c" real, ...
SELECT MAX("Passes") FROM table_30519 WHERE "Starting" = '34'
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 largest number of passes for players starting exactly 34 games? ### Input: CREATE TABLE table_30519 ( "Nr." ...
how is nephrocaps administered?
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 prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nephrocaps"
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 is nephrocaps administered? ### Input: CREATE TABLE demographic ( subject_id text, hadm_id text, name text, ...
Find names of trains that run through stations for the local authority Chiltern, compare the total number of name in a bar graph, sort x-axis from low to high order.
CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE weekly_weather ( station_id int, day_of_week text...
SELECT name, COUNT(name) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY name ORDER BY 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: Find names of trains that run through stations for the local authority Chiltern, compare the total number of name in a bar g...
In language where Saturday is senasuraadaa, what is Tuesday?
CREATE TABLE table_1277350_3 ( tuesday_mangala__mars_ VARCHAR, saturday_shani__saturn_ VARCHAR )
SELECT tuesday_mangala__mars_ FROM table_1277350_3 WHERE saturday_shani__saturn_ = "සෙනසුරාදා Senasuraadaa"
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 language where Saturday is senasuraadaa, what is Tuesday? ### Input: CREATE TABLE table_1277350_3 ( tuesday_mangala__...
What is the total for danny allsopp?
CREATE TABLE table_15337 ( "Name" text, "Years" text, "A-League" text, "Finals" text, "Total" text, "Games per goal" real )
SELECT "Total" FROM table_15337 WHERE "Name" = 'danny allsopp'
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 total for danny allsopp? ### Input: CREATE TABLE table_15337 ( "Name" text, "Years" text, "A-League"...
What was the result in the election where the incumbent was first elected in 1942?
CREATE TABLE table_1342149_43 ( result VARCHAR, first_elected VARCHAR )
SELECT result FROM table_1342149_43 WHERE first_elected = "1942"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result in the election where the incumbent was first elected in 1942? ### Input: CREATE TABLE table_1342149_43 ...
Which authority has a rocket launch called rehbar-5?
CREATE TABLE table_363 ( "Rocket launch" text, "Launch Date" text, "Mission" text, "Institutional authority" text, "Launch Site" text, "Outcomes" text, "Derivatives" text )
SELECT COUNT("Derivatives") FROM table_363 WHERE "Rocket launch" = 'Rehbar-5'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which authority has a rocket launch called rehbar-5? ### Input: CREATE TABLE table_363 ( "Rocket launch" text, "Laun...
get all posts tagged with inheritance.
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number,...
SELECT DISTINCT Title, Body FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName IN ('inheritance')
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: get all posts tagged with inheritance. ### Input: CREATE TABLE SuggestedEdits ( Id number, PostId number, Creati...
How many Viewers have a Rank smaller than 2?
CREATE TABLE table_63853 ( "Rank" real, "Series" text, "Episode title" text, "Viewers" real, "Date" text )
SELECT SUM("Viewers") FROM table_63853 WHERE "Rank" < '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: How many Viewers have a Rank smaller than 2? ### Input: CREATE TABLE table_63853 ( "Rank" real, "Series" text, "...
What is every prefix class for the equivalent of NTE101?
CREATE TABLE table_31426 ( "Prefix class" text, "Type and usage" text, "Example" text, "Equivalent" text, "Reference" text )
SELECT "Prefix class" FROM table_31426 WHERE "Equivalent" = 'NTE101'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every prefix class for the equivalent of NTE101? ### Input: CREATE TABLE table_31426 ( "Prefix class" text, ...
mini _ mental state examination ( mmse ) score of 16 to 26 .
CREATE TABLE table_train_91 ( "id" int, "mini_mental_state_examination_mmse" int, "stroke" bool, "rosen_modified_hachinski_ischemic_score" int, "NOUSE" float )
SELECT * FROM table_train_91 WHERE mini_mental_state_examination_mmse >= 16 AND mini_mental_state_examination_mmse <= 26
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: mini _ mental state examination ( mmse ) score of 16 to 26 . ### Input: CREATE TABLE table_train_91 ( "id" int, "min...
What is the total number of schools founded that have an enrollment of 5634?
CREATE TABLE table_2076608_1 ( founded VARCHAR, enrollment VARCHAR )
SELECT COUNT(founded) FROM table_2076608_1 WHERE enrollment = "5634"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of schools founded that have an enrollment of 5634? ### Input: CREATE TABLE table_2076608_1 ( f...
show me the top five most common diagnoses of patients with the age of 60 or above this year?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepi...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'st...
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: show me the top five most common diagnoses of patients with the age of 60 or above this year? ### Input: CREATE TABLE allerg...
Which date has a Score of 6 4, 6 3?
CREATE TABLE table_name_48 ( date VARCHAR, score VARCHAR )
SELECT date FROM table_name_48 WHERE score = "6–4, 6–3"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which date has a Score of 6 4, 6 3? ### Input: CREATE TABLE table_name_48 ( date VARCHAR, score VARCHAR ) ### Respon...
What is the highest number lost with more than 29 points and an against less than 19?
CREATE TABLE table_40837 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
SELECT MAX("Lost") FROM table_40837 WHERE "Points" > '29' AND "Against" < '19'
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 lost with more than 29 points and an against less than 19? ### Input: CREATE TABLE table_40837 ( ...
Find the names of Japanese constructors that have once earned more than 5 points, and count them by a bar chart, and display by the Y in ascending.
CREATE TABLE pitStops ( raceId INTEGER, driverId INTEGER, stop INTEGER, lap INTEGER, time TEXT, duration TEXT, milliseconds INTEGER ) CREATE TABLE status ( statusId INTEGER, status TEXT ) CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, positio...
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY COUNT(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: Find the names of Japanese constructors that have once earned more than 5 points, and count them by a bar chart, and display...
Name the successor for north carolina 13th
CREATE TABLE table_225204_4 ( successor VARCHAR, district VARCHAR )
SELECT successor FROM table_225204_4 WHERE district = "North Carolina 13th"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the successor for north carolina 13th ### Input: CREATE TABLE table_225204_4 ( successor VARCHAR, district VARC...
calculate the minimum duration of hospital stay of married patients
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 prescriptions...
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.marital_status = "MARRIED"
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 duration of hospital stay of married patients ### Input: CREATE TABLE lab ( subject_id text, h...
What was the 2008 value when 2012 was Grand Slam Tournaments?
CREATE TABLE table_name_35 ( Id VARCHAR )
SELECT 2008 FROM table_name_35 WHERE 2012 = "grand slam tournaments"
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 2008 value when 2012 was Grand Slam Tournaments? ### Input: CREATE TABLE table_name_35 ( Id VARCHAR ) ### R...
How many reports were the for the cleveland burke lakefront airport circut?
CREATE TABLE table_72116 ( "Rnd" text, "Race Name" text, "Circuit" text, "City/Location" text, "Date" text, "Pole position" text, "Winning driver" text, "Winning team" text, "Report" text )
SELECT COUNT("Report") FROM table_72116 WHERE "Circuit" = 'Cleveland Burke Lakefront Airport'
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 reports were the for the cleveland burke lakefront airport circut? ### Input: CREATE TABLE table_72116 ( "Rnd" ...
What is the percentage of others with a Fidesz of 62% and a Jobbik of 4%?
CREATE TABLE table_35706 ( "Source" text, "Date" text, "Fidesz" text, "MSZP" text, "SZDSZ" text, "Jobbik" text, "others" text )
SELECT "others" FROM table_35706 WHERE "Fidesz" = '62%' AND "Jobbik" = '4%'
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 percentage of others with a Fidesz of 62% and a Jobbik of 4%? ### Input: CREATE TABLE table_35706 ( "Source"...
Count the number of newborn patients whose lab test fluid is blood
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.fluid = "Blood"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Count the number of newborn patients whose lab test fluid is blood ### Input: CREATE TABLE procedures ( subject_id text,...
What is the gender for Otama?
CREATE TABLE table_name_23 ( gender VARCHAR, area VARCHAR )
SELECT gender FROM table_name_23 WHERE area = "otama"
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 gender for Otama? ### Input: CREATE TABLE table_name_23 ( gender VARCHAR, area VARCHAR ) ### Response: S...
What are the names of all the clubs starting with the oldest?
CREATE TABLE club ( club_id number, name text, region text, start_year text ) CREATE TABLE competition_result ( competition_id number, club_id_1 number, club_id_2 number, score text ) CREATE TABLE competition ( competition_id number, year number, competition_type text, ...
SELECT name FROM club ORDER BY start_year
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 names of all the clubs starting with the oldest? ### Input: CREATE TABLE club ( club_id number, name te...
Name the Score on 17 december 1979?
CREATE TABLE table_9177 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
SELECT "Score" FROM table_9177 WHERE "Date" = '17 december 1979'
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 Score on 17 december 1979? ### Input: CREATE TABLE table_9177 ( "Tie no" text, "Home team" text, "Score...
What is the lowest Decile for a school with a roll smaller than 3?
CREATE TABLE table_name_40 ( decile INTEGER, roll INTEGER )
SELECT MIN(decile) FROM table_name_40 WHERE roll < 3
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest Decile for a school with a roll smaller than 3? ### Input: CREATE TABLE table_name_40 ( decile INTEGE...
When +18.1 is the yes side 2008 percentage what is the percentage of against?
CREATE TABLE table_2278 ( "Constituency" text, "Electorate" real, "s Spoilt vote" real, "Total poll (%)" text, "For (%)" text, "Against (%)" text, "\u00b1 Yes side 2008 (%)" text )
SELECT "Against (%)" FROM table_2278 WHERE "\u00b1 Yes side 2008 (%)" = '+18.1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When +18.1 is the yes side 2008 percentage what is the percentage of against? ### Input: CREATE TABLE table_2278 ( "Cons...
What nation has a total more than 3, with more than 5 for bronze, and less than 4 for the silver?
CREATE TABLE table_34035 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT "Nation" FROM table_34035 WHERE "Total" > '3' AND "Bronze" > '5' AND "Silver" < '4'
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 nation has a total more than 3, with more than 5 for bronze, and less than 4 for the silver? ### Input: CREATE TABLE ta...
Which Years in Senate has a Years in Assembly of 2010 present, and toni atkins?
CREATE TABLE table_name_23 ( years_in_senate VARCHAR, years_in_assembly VARCHAR, name VARCHAR )
SELECT years_in_senate FROM table_name_23 WHERE years_in_assembly = "2010–present" AND name = "toni atkins"
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 Years in Senate has a Years in Assembly of 2010 present, and toni atkins? ### Input: CREATE TABLE table_name_23 ( ...
Thomas J. Lane is the incumbent of how many parties?
CREATE TABLE table_18479 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT COUNT("Party") FROM table_18479 WHERE "Incumbent" = 'Thomas J. Lane'
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: Thomas J. Lane is the incumbent of how many parties? ### Input: CREATE TABLE table_18479 ( "District" text, "Incumbe...
What is the prize money for the final round?
CREATE TABLE table_name_58 ( prize_money VARCHAR, round VARCHAR )
SELECT prize_money FROM table_name_58 WHERE round = "final"
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 prize money for the final round? ### Input: CREATE TABLE table_name_58 ( prize_money VARCHAR, round VARC...
get me the number of black/haitian patients who have primary disease angioedema.
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.diagnosis = "ANGIOEDEMA"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: get me the number of black/haitian patients who have primary disease angioedema. ### Input: CREATE TABLE demographic ( s...
What is Date, when Tournament is Alfred Dunhill Championship 1?
CREATE TABLE table_40224 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "Date" FROM table_40224 WHERE "Tournament" = 'alfred dunhill championship 1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is Date, when Tournament is Alfred Dunhill Championship 1? ### Input: CREATE TABLE table_40224 ( "Date" text, "...
Which away team has a Home team score of 10.14 (74)?
CREATE TABLE table_11385 ( "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_11385 WHERE "Home team score" = '10.14 (74)'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which away team has a Home team score of 10.14 (74)? ### Input: CREATE TABLE table_11385 ( "Home team" text, "Home t...
What was Stockholm's score when Malmo scored 2?
CREATE TABLE table_name_54 ( stockholm VARCHAR, malmö VARCHAR )
SELECT stockholm FROM table_name_54 WHERE malmö = "2"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was Stockholm's score when Malmo scored 2? ### Input: CREATE TABLE table_name_54 ( stockholm VARCHAR, malmö VAR...
Which position does John Starks play?
CREATE TABLE table_16841 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
SELECT "Position" FROM table_16841 WHERE "Player" = 'John Starks'
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 position does John Starks play? ### Input: CREATE TABLE table_16841 ( "Player" text, "No." real, "National...
What are the different cities listed?
CREATE TABLE manufacturers ( headquarter VARCHAR )
SELECT DISTINCT headquarter FROM manufacturers
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 are the different cities listed? ### Input: CREATE TABLE manufacturers ( headquarter VARCHAR ) ### Response: SELECT...
Name the opponent with result of w 35-21
CREATE TABLE table_39200 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Record" text )
SELECT "Opponent" FROM table_39200 WHERE "Result" = 'w 35-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: Name the opponent with result of w 35-21 ### Input: CREATE TABLE table_39200 ( "Week" text, "Date" text, "Oppone...
What is the density of ?
CREATE TABLE table_43599 ( "Name" text, "Hanzi" text, "Hanyu Pinyin" text, "Population (2004 est.)" text, "Area (km\u00b2)" text, "Density (/km\u00b2)" text )
SELECT "Density (/km\u00b2)" FROM table_43599 WHERE "Hanzi" = '昌黎县'
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 density of ? ### Input: CREATE TABLE table_43599 ( "Name" text, "Hanzi" text, "Hanyu Pinyin" text, ...
What is the entry for Part 1 for class 7d?
CREATE TABLE table_47017 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
SELECT "Part 1" FROM table_47017 WHERE "Class" = '7d'
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 entry for Part 1 for class 7d? ### Input: CREATE TABLE table_47017 ( "Class" text, "Part 1" text, "P...
what is round2 when round5 is more than 35, round3 is less than 51, the rank is smaller than 2 and the team is netherlands?
CREATE TABLE table_name_54 ( round2 VARCHAR, rank VARCHAR, team VARCHAR, round5 VARCHAR, round3 VARCHAR )
SELECT COUNT(round2) FROM table_name_54 WHERE round5 > 35 AND round3 < 51 AND team = "netherlands" AND rank < 2
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is round2 when round5 is more than 35, round3 is less than 51, the rank is smaller than 2 and the team is netherlands? ...
Which NFL team picked a player for the Wide Receiver position?
CREATE TABLE table_name_19 ( nfl_team VARCHAR, position VARCHAR )
SELECT nfl_team FROM table_name_19 WHERE position = "wide receiver"
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 NFL team picked a player for the Wide Receiver position? ### Input: CREATE TABLE table_name_19 ( nfl_team VARCHAR,...
Which Social and Liberal Democrats/ Liberal Democrats has an Independent of 1, and an Election larger than 1988, and a Green smaller than 1?
CREATE TABLE table_39088 ( "Election" real, "Labour" real, "Conservative" real, "Liberal" real, "Social Democratic Party" real, "Social and Liberal Democrats/ Liberal Democrats" real, "Independent" real, "Green" real, "Other" text, "Control" text )
SELECT "Social and Liberal Democrats/ Liberal Democrats" FROM table_39088 WHERE "Independent" = '1' AND "Election" > '1988' AND "Green" < '1'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Social and Liberal Democrats/ Liberal Democrats has an Independent of 1, and an Election larger than 1988, and a Green...
What is the highest games from a game with points less than 4, drawn of 1 and a lost less than 6?
CREATE TABLE table_37411 ( "Games" real, "Drawn" real, "Lost" real, "Points difference" text, "Points" real )
SELECT MAX("Games") FROM table_37411 WHERE "Points" < '4' AND "Drawn" = '1' AND "Lost" < '6'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest games from a game with points less than 4, drawn of 1 and a lost less than 6? ### Input: CREATE TABLE ta...
what was the organism name of the first bronchial lavage microbiology test of patient 031-19622 until 42 months ago?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patient...
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622')) AND microlab.culturesite = 'bronchial lavage' AND DATETIME(m...
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the organism name of the first bronchial lavage microbiology test of patient 031-19622 until 42 months ago? ### Inp...