instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
Questions with a single tag.
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT Id AS "post_link", CreationDate, Score FROM Posts WHERE Tags = '<' + LOWER('##TagName:string##') + '>' ORDER BY CreationDate DESC LIMIT 100
sede
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Questions with a single tag. ### Input: CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId numb...
Which are the 11 -credit upper-level classes ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 11 AND program_course.category LIKE 'ULCS'
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which are the 11 -credit upper-level classes ? ### Input: CREATE TABLE course_offering ( offering_id int, course_id ...
What team scored 4 points?
CREATE TABLE table_20396_1 ( team VARCHAR, points VARCHAR )
SELECT team FROM table_20396_1 WHERE points = "4"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What team scored 4 points? ### Input: CREATE TABLE table_20396_1 ( team VARCHAR, points VARCHAR ) ### Response: SELE...
in the first hospital encounter what is patient 011-31229's age?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodici...
SELECT patient.age FROM patient WHERE patient.uniquepid = '011-31229' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime 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: in the first hospital encounter what is patient 011-31229's age? ### Input: CREATE TABLE allergy ( allergyid number, ...
What driver has 5 as the zan 2?
CREATE TABLE table_name_69 ( driver VARCHAR, zan_2 VARCHAR )
SELECT driver FROM table_name_69 WHERE zan_2 = "5"
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 driver has 5 as the zan 2? ### Input: CREATE TABLE table_name_69 ( driver VARCHAR, zan_2 VARCHAR ) ### Response...
When was the last year when Katharine Hepburn won?
CREATE TABLE table_54722 ( "Superlative" text, "Actress" text, "Record Set" text, "Year" real, "Notes" text )
SELECT MAX("Year") FROM table_54722 WHERE "Actress" = 'katharine hepburn'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the last year when Katharine Hepburn won? ### Input: CREATE TABLE table_54722 ( "Superlative" text, "Actres...
RUSSIAN 550 has which courses as prerequisites ?
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE semester ( ...
SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_0.department = 'RUSSIAN' AND COURSE_0.numb...
advising
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: RUSSIAN 550 has which courses as prerequisites ? ### Input: CREATE TABLE student_record ( student_id int, course_id ...
Which home team's venue is junction oval?
CREATE TABLE table_name_71 ( home_team VARCHAR, venue VARCHAR )
SELECT home_team FROM table_name_71 WHERE venue = "junction oval"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which home team's venue is junction oval? ### Input: CREATE TABLE table_name_71 ( home_team VARCHAR, venue VARCHAR )...
Name the average attendance with result of won 2-0 on 2 november 2007
CREATE TABLE table_name_82 ( attendance__away_ INTEGER, result VARCHAR, date VARCHAR )
SELECT AVG(attendance__away_) FROM table_name_82 WHERE result = "won 2-0" AND date = "2 november 2007"
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 average attendance with result of won 2-0 on 2 november 2007 ### Input: CREATE TABLE table_name_82 ( attendance...
since 1 year ago, patient 19144 has been admitted into 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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime ti...
SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 19144 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-1 year')
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: since 1 year ago, patient 19144 has been admitted into the hospital? ### Input: CREATE TABLE chartevents ( row_id number...
How many Wins have Losses larger than 2, and an Against of 73.3?
CREATE TABLE table_name_26 ( wins INTEGER, loses VARCHAR, against VARCHAR )
SELECT SUM(wins) FROM table_name_26 WHERE loses > 2 AND against = "73.3"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many Wins have Losses larger than 2, and an Against of 73.3? ### Input: CREATE TABLE table_name_26 ( wins INTEGER, ...
When was the station WLS-TV owned since?
CREATE TABLE table_2597 ( "Market Rank & City of license /Market" text, "Station" text, "Channel TV / DT" text, "Owned since" real, "Affiliation" text )
SELECT "Owned since" FROM table_2597 WHERE "Station" = 'WLS-TV'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When was the station WLS-TV owned since? ### Input: CREATE TABLE table_2597 ( "Market Rank & City of license /Market" te...
When did Geelong play as the home team?
CREATE TABLE table_name_89 ( date VARCHAR, home_team VARCHAR )
SELECT date FROM table_name_89 WHERE home_team = "geelong"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did Geelong play as the home team? ### Input: CREATE TABLE table_name_89 ( date VARCHAR, home_team VARCHAR ) ##...
le jour du mois o le plus grand nombre de question ont t pos es en octobre.
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE...
SELECT Name FROM PostTypes
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: le jour du mois o le plus grand nombre de question ont t pos es en octobre. ### Input: CREATE TABLE Comments ( Id number...
i'd like to have some information on a ticket from DENVER to ATLANTA with a stop in PITTSBURGH
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, ...
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 = 'ATLANTA' AND CITY_2.ci...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i'd like to have some information on a ticket from DENVER to ATLANTA with a stop in PITTSBURGH ### Input: CREATE TABLE date_...
Who was the outgoing manager who departed due to fc energie cottbus purchased rights?
CREATE TABLE table_47901 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text )
SELECT "Outgoing manager" FROM table_47901 WHERE "Manner of departure" = 'fc energie cottbus purchased rights'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the outgoing manager who departed due to fc energie cottbus purchased rights? ### Input: CREATE TABLE table_47901 ( ...
For each company, return the company name and the name of the building its office is located in.
CREATE TABLE companies ( id number, name text, headquarters text, industry text, sales_billion number, profits_billion number, assets_billion number, market_value_billion text ) CREATE TABLE office_locations ( building_id number, company_id number, move_in_year number ) CRE...
SELECT T3.name, T2.name FROM office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN companies AS T3 ON T1.company_id = T3.id
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: For each company, return the company name and the name of the building its office is located in. ### Input: CREATE TABLE com...
What is the medal named fatuma roba category:articles with hcards for?
CREATE TABLE table_33801 ( "Medal" text, "Name" text, "Games" text, "Sport" text, "Event" text )
SELECT "Medal" FROM table_33801 WHERE "Name" = 'fatuma roba category:articles with hcards'
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 medal named fatuma roba category:articles with hcards for? ### Input: CREATE TABLE table_33801 ( "Medal" tex...
On what date does Essendon play as the away team?
CREATE TABLE table_74677 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_74677 WHERE "Away team" = 'essendon'
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: On what date does Essendon play as the away team? ### Input: CREATE TABLE table_74677 ( "Home team" text, "Home team...
provide the number of patients whose death status is 0 and procedure long title is insertion of one vascular stent?
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Insertion of one vascular stent"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose death status is 0 and procedure long title is insertion of one vascular stent? ### Inpu...
Who is the pick from the Purdue College?
CREATE TABLE table_name_90 ( pick VARCHAR, college VARCHAR )
SELECT pick FROM table_name_90 WHERE college = "purdue"
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 pick from the Purdue College? ### Input: CREATE TABLE table_name_90 ( pick VARCHAR, college VARCHAR ) ###...
Name the party for bensalem
CREATE TABLE table_23332 ( "District" real, "Representative" text, "Party" text, "Residence" text, "Counties represented" text, "Term ends" real, "First Elected" real )
SELECT "Party" FROM table_23332 WHERE "Residence" = 'Bensalem'
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 party for bensalem ### Input: CREATE TABLE table_23332 ( "District" real, "Representative" text, "Party...
Draw a bar chart about the distribution of meter_600 and meter_100 , and could you display x axis in descending order?
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) ...
SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_600 DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Draw a bar chart about the distribution of meter_600 and meter_100 , and could you display x axis in descending order? ### I...
What is the Away Team score of North Melbourne?
CREATE TABLE table_name_24 ( away_team VARCHAR )
SELECT away_team AS score FROM table_name_24 WHERE away_team = "north melbourne"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Away Team score of North Melbourne? ### Input: CREATE TABLE table_name_24 ( away_team VARCHAR ) ### Response...
What was the score of the game played at Harmon Stadium on February 24?
CREATE TABLE table_42169 ( "Date" text, "Opponent" text, "Score" text, "Site/Stadium" text, "Record" text )
SELECT "Score" FROM table_42169 WHERE "Site/Stadium" = 'harmon stadium' AND "Date" = 'february 24'
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 score of the game played at Harmon Stadium on February 24? ### Input: CREATE TABLE table_42169 ( "Date" tex...
What is the lowest score for a year before 2008 and had 3rd place?
CREATE TABLE table_45320 ( "Year" real, "Program Title" text, "Placement" text, "Score" real, "Class" text )
SELECT MIN("Score") FROM table_45320 WHERE "Year" < '2008' AND "Placement" = '3rd'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest score for a year before 2008 and had 3rd place? ### Input: CREATE TABLE table_45320 ( "Year" real, ...
geriatric depression scale ( gds ) ( 62 ) score < 6
CREATE TABLE table_train_111 ( "id" int, "mini_mental_state_examination_mmse" int, "liver_disease" bool, "geriatric_depression_scale_gds" int, "rosen_modified_hachinski_ischemic_score" int, "plasma_creatinine" float, "NOUSE" float )
SELECT * FROM table_train_111 WHERE geriatric_depression_scale_gds < 6
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: geriatric depression scale ( gds ) ( 62 ) score < 6 ### Input: CREATE TABLE table_train_111 ( "id" int, "mini_mental...
What is the summary of the algorithm with a theta i of 0.43?
CREATE TABLE table_56059 ( "\\theta_i" real, "Simulated datasets (step 2)" text, "Summary statistic \\omega_{S,i} (step 3)" real, "Distance \\rho(\\omega_{S,i}, \\omega_E) (step 4)" real, "Outcome (step 4)" text )
SELECT "Summary statistic \\omega_{S,i} (step 3)" FROM table_56059 WHERE "\\theta_i" = '0.43'
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 summary of the algorithm with a theta i of 0.43? ### Input: CREATE TABLE table_56059 ( "\\theta_i" real, ...
name a horse that placed after hello and was owned by more than one person .
CREATE TABLE table_204_13 ( id number, "finished" text, "post" number, "horse" text, "jockey" text, "trainer" text, "owner" text, "time / behind" text )
SELECT "horse" FROM table_204_13 WHERE "finished" > (SELECT "finished" FROM table_204_13 WHERE "horse" = 'hello') AND "owner" > 1 ORDER BY "finished" 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: name a horse that placed after hello and was owned by more than one person . ### Input: CREATE TABLE table_204_13 ( id n...
How many terms did the governor that left office on August 4, 1825 serve?
CREATE TABLE table_name_46 ( terms VARCHAR, left_office VARCHAR )
SELECT terms FROM table_name_46 WHERE left_office = "august 4, 1825"
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 terms did the governor that left office on August 4, 1825 serve? ### Input: CREATE TABLE table_name_46 ( terms ...
Which visitor has detroit as the home, and february 24 as the date?
CREATE TABLE table_6607 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Visitor" FROM table_6607 WHERE "Home" = 'detroit' AND "Date" = 'february 24'
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 visitor has detroit as the home, and february 24 as the date? ### Input: CREATE TABLE table_6607 ( "Date" text, ...
Give me a histogram to show the date and the amount for all the payments processed with Visa, and show Date_Payment_Made in ascending order please.
CREATE TABLE Customers ( Customer_ID INTEGER, Customer_Details VARCHAR(255) ) CREATE TABLE Payments ( Payment_ID INTEGER, Settlement_ID INTEGER, Payment_Method_Code VARCHAR(255), Date_Payment_Made DATE, Amount_Payment INTEGER ) CREATE TABLE Settlements ( Settlement_ID INTEGER, Clai...
SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Date_Payment_Made
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: Give me a histogram to show the date and the amount for all the payments processed with Visa, and show Date_Payment_Made in ...
Name the vacator for resigned february 26, 1836 because of ill health
CREATE TABLE table_25103 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
SELECT "Vacator" FROM table_25103 WHERE "Reason for change" = 'Resigned February 26, 1836 because of ill health'
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 vacator for resigned february 26, 1836 because of ill health ### Input: CREATE TABLE table_25103 ( "District" t...
hcv infection, active
CREATE TABLE table_train_57 ( "id" int, "bleeding" int, "in_another_study" bool, "hiv_infection" bool, "hepatitis_c_infection" bool, "receiving_vasopressor" bool, "hypotension" bool, "NOUSE" float )
SELECT * FROM table_train_57 WHERE hepatitis_c_infection = 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: hcv infection, active ### Input: CREATE TABLE table_train_57 ( "id" int, "bleeding" int, "in_another_study" bool...
What tournament has a 2010 of 1r, and a 2008 of 1r?
CREATE TABLE table_name_4 ( tournament VARCHAR )
SELECT tournament FROM table_name_4 WHERE 2010 = "1r" AND 2008 = "1r"
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 tournament has a 2010 of 1r, and a 2008 of 1r? ### Input: CREATE TABLE table_name_4 ( tournament VARCHAR ) ### Resp...
What was the outcome of the game when the partner is Rafael Osuna?
CREATE TABLE table_2215159_2 ( outcome VARCHAR, partner VARCHAR )
SELECT outcome FROM table_2215159_2 WHERE partner = "Rafael Osuna"
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 outcome of the game when the partner is Rafael Osuna? ### Input: CREATE TABLE table_2215159_2 ( outcome VAR...
Who wrote the episodes that were viewed by 2.12 million viewers?
CREATE TABLE table_11111116_8 ( written_by VARCHAR, us_viewers__million_ VARCHAR )
SELECT written_by FROM table_11111116_8 WHERE us_viewers__million_ = "2.12"
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 wrote the episodes that were viewed by 2.12 million viewers? ### Input: CREATE TABLE table_11111116_8 ( written_by V...
what is maximum age of patients whose gender is m and ethnicity is hispanic/latino - puerto rican?
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 MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN"
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 maximum age of patients whose gender is m and ethnicity is hispanic/latino - puerto rican? ### Input: CREATE TABLE d...
How many elected catagories are there for the district with Saxby Chambliss as the incumbent?
CREATE TABLE table_28585 ( "District" text, "Incumbent" text, "Party" text, "Elected" real, "Status" text, "Result" text )
SELECT COUNT("Elected") FROM table_28585 WHERE "Incumbent" = 'Saxby Chambliss'
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 elected catagories are there for the district with Saxby Chambliss as the incumbent? ### Input: CREATE TABLE table_...
Show weight from each name
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Name, Weight FROM people
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 weight from each name ### Input: CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text...
What's the sum of Quantity for the Class of 1928 of CI-30?
CREATE TABLE table_name_1 ( quantity INTEGER, class_from_1928 VARCHAR )
SELECT SUM(quantity) FROM table_name_1 WHERE class_from_1928 = "ci-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: What's the sum of Quantity for the Class of 1928 of CI-30? ### Input: CREATE TABLE table_name_1 ( quantity INTEGER, ...
What is the Selsdon for the 17:19 Coombe Road?
CREATE TABLE table_name_14 ( selsdon VARCHAR, coombe_road VARCHAR )
SELECT selsdon FROM table_name_14 WHERE coombe_road = "17:19"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Selsdon for the 17:19 Coombe Road? ### Input: CREATE TABLE table_name_14 ( selsdon VARCHAR, coombe_road ...
What is the release Date for the Region in New Zealand ?
CREATE TABLE table_39389 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalogue" text )
SELECT "Date" FROM table_39389 WHERE "Region" = 'new zealand'
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 release Date for the Region in New Zealand ? ### Input: CREATE TABLE table_39389 ( "Region" text, "Date"...
How many drivers have 1942 points?
CREATE TABLE table_25750 ( "Position" real, "Driver" text, "Points" real, "Starts" real, "Wins" real, "Top 5s" real, "Top 10s" real, "Winnings ($)" real )
SELECT COUNT("Driver") FROM table_25750 WHERE "Points" = '1942'
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 drivers have 1942 points? ### Input: CREATE TABLE table_25750 ( "Position" real, "Driver" text, "Points...
daniel martin and joost posthuma both withdrew from the race because of what reason ?
CREATE TABLE table_204_530 ( id number, "type" text, "stage" number, "cyclist" text, "team" text, "reason" text )
SELECT "reason" FROM table_204_530 WHERE "cyclist" = 'daniel martin'
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: daniel martin and joost posthuma both withdrew from the race because of what reason ? ### Input: CREATE TABLE table_204_530 ...
Where did Carlton play as the home team?
CREATE TABLE table_52552 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Venue" FROM table_52552 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: Where did Carlton play as the home team? ### Input: CREATE TABLE table_52552 ( "Home team" text, "Home team score" t...
Get My Reputation and Location Data.
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE Id = 1042848
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 My Reputation and Location Data. ### Input: CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boo...
What is the 2013 BAFA adult flag division in Aylesbury?
CREATE TABLE table_name_95 ( location VARCHAR )
SELECT 2013 AS _bafa_adult_flag_division FROM table_name_95 WHERE location = "aylesbury"
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 2013 BAFA adult flag division in Aylesbury? ### Input: CREATE TABLE table_name_95 ( location VARCHAR ) ### R...
Name the series ^ when the CPU clock is 1500 and the model is t-52r
CREATE TABLE table_55084 ( "Series ^" text, "Model" text, "CPU clock ( MHz )" text, "CPU cores" real, "TDP ( W )" text, "L2 cache (KiB)" text, "Radeon cores" real, "DDR3 speed" real )
SELECT "Series ^" FROM table_55084 WHERE "CPU clock ( MHz )" = '1500' AND "Model" = 't-52r'
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 series ^ when the CPU clock is 1500 and the model is t-52r ### Input: CREATE TABLE table_55084 ( "Series ^" tex...
What is the I/O bus entry for the processor with a release price of $657?
CREATE TABLE table_66142 ( "Model number" text, "sSpec number" text, "Cores" text, "Frequency" text, "Turbo" text, "L2 cache" text, "L3 cache" text, "GPU model" text, "GPU frequency" text, "Socket" text, "I/O bus" text, "Release date" text, "Part number(s)" text, ...
SELECT "I/O bus" FROM table_66142 WHERE "Release price ( USD )" = '$657'
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 I/O bus entry for the processor with a release price of $657? ### Input: CREATE TABLE table_66142 ( "Model n...
Who did the Indians play on April 23?
CREATE TABLE table_name_89 ( opponent VARCHAR, date VARCHAR )
SELECT opponent FROM table_name_89 WHERE date = "april 23"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who did the Indians play on April 23? ### Input: CREATE TABLE table_name_89 ( opponent VARCHAR, date VARCHAR ) ### R...
What is the average number of bronze medals for total of all nations?
CREATE TABLE table_76045 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT AVG("Bronze") FROM table_76045 WHERE "Nation" = 'total'
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 number of bronze medals for total of all nations? ### Input: CREATE TABLE table_76045 ( "Rank" text,...
what is the number of patients whose admission type is elective and item id is 51265?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.itemid = "51265"
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 admission type is elective and item id is 51265? ### Input: CREATE TABLE demographic ( ...
What is the least total?
CREATE TABLE table_30711 ( "Sl. No" real, "Category wise" text, "Single lane" real, "Intermediate lane" real, "Double lane" real, "Multi lane" real, "Total" real )
SELECT MIN("Total") FROM table_30711
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 least total? ### Input: CREATE TABLE table_30711 ( "Sl. No" real, "Category wise" text, "Single lane...
Name the average bronze for total less than 1
CREATE TABLE table_74518 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT AVG("Bronze") FROM table_74518 WHERE "Total" < '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: Name the average bronze for total less than 1 ### Input: CREATE TABLE table_74518 ( "Rank" text, "Nation" text, ...
Which vocal type has the band mate with first name 'Solveig' played the most?
CREATE TABLE vocals ( bandmate VARCHAR ) CREATE TABLE band ( id VARCHAR )
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which vocal type has the band mate with first name 'Solveig' played the most? ### Input: CREATE TABLE vocals ( bandmate ...
Which title is in Portuguese?
CREATE TABLE table_name_28 ( title VARCHAR, language VARCHAR )
SELECT title FROM table_name_28 WHERE language = "portuguese"
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 title is in Portuguese? ### Input: CREATE TABLE table_name_28 ( title VARCHAR, language VARCHAR ) ### Response...
What percentage of voters chose McCain in the county where 1.1% of voters voted third party?
CREATE TABLE table_23640 ( "County" text, "Obama %" text, "Obama #" real, "McCain %" text, "McCain #" real, "Others %" text, "Others #" real )
SELECT "McCain %" FROM table_23640 WHERE "Others %" = '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 percentage of voters chose McCain in the county where 1.1% of voters voted third party? ### Input: CREATE TABLE table_2...
What Branding does WRKO calls use?
CREATE TABLE table_10333757_1 ( branding VARCHAR, calls VARCHAR )
SELECT branding FROM table_10333757_1 WHERE calls = "WRKO"
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 Branding does WRKO calls use? ### Input: CREATE TABLE table_10333757_1 ( branding VARCHAR, calls VARCHAR ) ### ...
count the number of patients that are prescribed 0.9% sodium chloride (mini bag plus) during the same hospital encounter after having been diagnosed with hy kid nos w cr kid i-iv.
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_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title =...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients that are prescribed 0.9% sodium chloride (mini bag plus) during the same hospital encounter aft...
How may lecturers are there in the case when there are more than 8 assistant professors, fewer than 35 associate professors, more than 14 professors and total of more than 81?
CREATE TABLE table_name_71 ( lecturers VARCHAR, total VARCHAR, associate_professors VARCHAR, assistant_professors VARCHAR, professors VARCHAR )
SELECT COUNT(lecturers) FROM table_name_71 WHERE assistant_professors > 8 AND professors > 14 AND associate_professors < 35 AND total > 81
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 may lecturers are there in the case when there are more than 8 assistant professors, fewer than 35 associate professors,...
what time was the last time patient 015-59552 had the maximum systemicsystolic value on this month/22?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-59552')) AND NOT vitalperiodic.systemicsystolic...
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 time was the last time patient 015-59552 had the maximum systemicsystolic value on this month/22? ### Input: CREATE TAB...
What was his average finish when his average start was 27.7?
CREATE TABLE table_2169966_2 ( avg_finish VARCHAR, avg_start VARCHAR )
SELECT avg_finish FROM table_2169966_2 WHERE avg_start = "27.7"
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 his average finish when his average start was 27.7? ### Input: CREATE TABLE table_2169966_2 ( avg_finish VARCHA...
what is the number of patients whose days of hospital stay is greater than 43 and drug name is bag?
CREATE TABLE procedures ( 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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "43" AND prescriptions.drug = "Bag"
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 days of hospital stay is greater than 43 and drug name is bag? ### Input: CREATE TABLE ...
what series was on may 14
CREATE TABLE table_34831 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Series" text )
SELECT "Series" FROM table_34831 WHERE "Date" = 'may 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: what series was on may 14 ### Input: CREATE TABLE table_34831 ( "Game" real, "Date" text, "Opponent" text, "...
What september has 10.35 in November?
CREATE TABLE table_1383 ( "Year" real, "January" text, "February" text, "March" text, "April" text, "May" text, "June" text, "July" text, "August" text, "September" text, "October" text, "November" text, "December" text, "Annual Additions(in millions)" text, "...
SELECT "September" FROM table_1383 WHERE "November" = '10.35'
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 september has 10.35 in November? ### Input: CREATE TABLE table_1383 ( "Year" real, "January" text, "Februar...
Name the most copa del rey for karim benzema
CREATE TABLE table_25565 ( "R" real, "Player" text, "Position" text, "League" real, "Champions League" real, "Copa del Rey" real, "Total" real )
SELECT MAX("Copa del Rey") FROM table_25565 WHERE "Player" = 'Karim Benzema'
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 most copa del rey for karim benzema ### Input: CREATE TABLE table_25565 ( "R" real, "Player" text, "Pos...
what was the first value of the arterial bp [diastolic] of patient 23070 on 12/04/this year.
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
SELECT 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 = 23070)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
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 first value of the arterial bp [diastolic] of patient 23070 on 12/04/this year. ### Input: CREATE TABLE inputev...
when was the last time patient 015-58787 had sodium chloride 0.9% 1000 ml pb prescribed this month?
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 medication ( medi...
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 = '015-58787')) AND medication.drugname = 'sodium chloride 0.9% 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 was the last time patient 015-58787 had sodium chloride 0.9% 1000 ml pb prescribed this month? ### Input: CREATE TABLE ...
Which drives drove a lexus, made all rounds, had a tyre of B and was on the team of petronas toyota team tom's?
CREATE TABLE table_48884 ( "Team" text, "Make" text, "Drivers" text, "Tyre" text, "Rounds" text )
SELECT "Drivers" FROM table_48884 WHERE "Rounds" = 'all' AND "Make" = 'lexus' AND "Tyre" = 'b' AND "Team" = 'petronas toyota team tom''s'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which drives drove a lexus, made all rounds, had a tyre of B and was on the team of petronas toyota team tom's? ### Input: C...
For those employees who did not have any job in the past, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart.
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, show me about the distribution of job_id and the average of employ...
Who has 187kg and a Snatch of Clean & Jerk?
CREATE TABLE table_65876 ( "World record" text, "Snatch" text, "Andrei Rybakou ( BLR )" text, "187kg" text, "Chiang Mai , Thailand" text )
SELECT "187kg" FROM table_65876 WHERE "Snatch" = 'clean & jerk'
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 has 187kg and a Snatch of Clean & Jerk? ### Input: CREATE TABLE table_65876 ( "World record" text, "Snatch" text...
how many more medals did india earn compared to pakistan ?
CREATE TABLE table_203_165 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT (SELECT "total" FROM table_203_165 WHERE "nation" = 'india') - (SELECT "total" FROM table_203_165 WHERE "nation" = 'pakistan')
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 more medals did india earn compared to pakistan ? ### Input: CREATE TABLE table_203_165 ( id number, "rank"...
i would like an AA flight from TORONTO to SAN DIEGO with a stopover in DENVER please
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
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 = 'SAN DIEGO' AND CITY_2...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: i would like an AA flight from TORONTO to SAN DIEGO with a stopover in DENVER please ### Input: CREATE TABLE aircraft ( ...
What is the season with a Skip of Eve Muirhead and a third of Kerry Barr?
CREATE TABLE table_50534 ( "Season" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
SELECT "Season" FROM table_50534 WHERE "Skip" = 'eve muirhead' AND "Third" = 'kerry barr'
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 season with a Skip of Eve Muirhead and a third of Kerry Barr? ### Input: CREATE TABLE table_50534 ( "Season"...
WHAT IS THE SUM OF PICK WITH AN OVERALL LARGER THAN 250, AND FOR FLORIDA COLLEGE?
CREATE TABLE table_name_62 ( pick INTEGER, overall VARCHAR, college VARCHAR )
SELECT SUM(pick) FROM table_name_62 WHERE overall > 250 AND college = "florida"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: WHAT IS THE SUM OF PICK WITH AN OVERALL LARGER THAN 250, AND FOR FLORIDA COLLEGE? ### Input: CREATE TABLE table_name_62 ( ...
What candidate is a member of the Republican party?
CREATE TABLE table_18298 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Candidates" FROM table_18298 WHERE "Party" = 'Republican'
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 candidate is a member of the Republican party? ### Input: CREATE TABLE table_18298 ( "District" text, "Incumben...
What is the venue when the away team scored 15.9 (99)?
CREATE TABLE table_52489 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Venue" FROM table_52489 WHERE "Away team score" = '15.9 (99)'
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 venue when the away team scored 15.9 (99)? ### Input: CREATE TABLE table_52489 ( "Home team" text, "Home...
What is Channel 4 and Channel 4+1's rating in E4 and E4+1 when the ratings were 780,200?
CREATE TABLE table_41882 ( "Episode number" real, "Title" text, "Original airing on Channel 4" text, "Time of airing on Channel 4" text, "Original airing on E4" text, "Time of airing on E4" text, "Position in Channel 4 and Channel 4+1's ratings" text, "Position in E4 and E4+1's ratings" ...
SELECT "Position in Channel 4 and Channel 4+1's ratings" FROM table_41882 WHERE "Position in E4 and E4+1's ratings" = '780,200'
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 Channel 4 and Channel 4+1's rating in E4 and E4+1 when the ratings were 780,200? ### Input: CREATE TABLE table_41882...
Bad questions, based on vote score and closure and the like_title.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Descri...
SELECT Score, CASE WHEN NOT ClosedDate IS NULL THEN 'N' ELSE 'Er' END AS "closed?", Title AS "post_link" FROM Posts WHERE PostTypeId = 1 AND (NOT ClosedDate IS NULL OR Score < -3) ORDER BY Score LIMIT 500
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: Bad questions, based on vote score and closure and the like_title. ### Input: CREATE TABLE PendingFlags ( Id number, ...
What are the names of the heads who are born outside the California state?
CREATE TABLE head ( name VARCHAR, born_state VARCHAR )
SELECT name FROM head WHERE born_state <> 'California'
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 names of the heads who are born outside the California state? ### Input: CREATE TABLE head ( name VARCHAR, ...
what is the yearly average dose of enteral tube intake: orogastric oral given to patient 015-94542 until 1967 days ago?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid tex...
SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-94542')) AND intakeoutput.celllabel = 'enter...
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 yearly average dose of enteral tube intake: orogastric oral given to patient 015-94542 until 1967 days ago? ### ...
provide the number of patients whose diagnoses long title is alkalosis and lab test abnormal status is abnormal?
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Alkalosis" AND lab.flag = "abnormal"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: provide the number of patients whose diagnoses long title is alkalosis and lab test abnormal status is abnormal? ### Input: ...
SAN FRANCISCO to DENVER
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE days ( days_code varchar, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '...
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: SAN FRANCISCO to DENVER ### Input: CREATE TABLE date_day ( month_number int, day_number int, year int, day_n...
Which Altitude (mslm) is the highest one that has an Area (km 2) smaller than 13.01, and a Population of 74536, and a Density (inhabitants/km 2) larger than 5869?
CREATE TABLE table_name_20 ( altitude__mslm_ INTEGER, density__inhabitants_km_2__ VARCHAR, area__km_2__ VARCHAR, population VARCHAR )
SELECT MAX(altitude__mslm_) FROM table_name_20 WHERE area__km_2__ < 13.01 AND population = 74536 AND density__inhabitants_km_2__ > 5869
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 Altitude (mslm) is the highest one that has an Area (km 2) smaller than 13.01, and a Population of 74536, and a Densit...
What was the Against when the Opposing Team was sheffield wednesday?
CREATE TABLE table_name_24 ( against VARCHAR, opposing_team VARCHAR )
SELECT against FROM table_name_24 WHERE opposing_team = "sheffield wednesday"
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 Against when the Opposing Team was sheffield wednesday? ### Input: CREATE TABLE table_name_24 ( against VAR...
Which Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/Retired of 1:48:11.023?
CREATE TABLE table_65671 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real )
SELECT "Driver" FROM table_65671 WHERE "Grid" < '17' AND "Points" > '0' AND "Laps" = '87' AND "Time/Retired" = '1:48:11.023'
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 Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/Retired of 1:48:11.023? ###...
give me the total doses of etoh grams/hour given to patient 27362.
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, chartti...
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27362)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the total doses of etoh grams/hour given to patient 27362. ### Input: CREATE TABLE d_labitems ( row_id number, ...
How many losses for the team with less than 4 wins, more than 0 byes and 2510 against?
CREATE TABLE table_62067 ( "Mininera DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
SELECT AVG("Losses") FROM table_62067 WHERE "Wins" < '4' AND "Against" = '2510' AND "Byes" > '0'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many losses for the team with less than 4 wins, more than 0 byes and 2510 against? ### Input: CREATE TABLE table_62067 (...
Show the names of climbers and the heights of mountains they climb by a bar chart, show from low to high by the Y-axis please.
CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int )
SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T2.Height
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 names of climbers and the heights of mountains they climb by a bar chart, show from low to high by the Y-axis pleas...
Name the district for others being 18.3
CREATE TABLE table_23214055_2 ( district VARCHAR, others VARCHAR )
SELECT district FROM table_23214055_2 WHERE others = "18.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: Name the district for others being 18.3 ### Input: CREATE TABLE table_23214055_2 ( district VARCHAR, others VARCHAR ...
When the team is yale what is max amount of times they placed fourth?
CREATE TABLE table_1313 ( "Team" text, "Titles" real, "Runner-up" real, "Third place" real, "Fourth place" real, "Years participated" real )
SELECT MAX("Fourth place") FROM table_1313 WHERE "Team" = 'Yale'
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 the team is yale what is max amount of times they placed fourth? ### Input: CREATE TABLE table_1313 ( "Team" text, ...
What is the average position of pilot petr krejcirik, who has less than 11 points?
CREATE TABLE table_49992 ( "Position" real, "Pilot" text, "Country" text, "Glider" text, "Points" real )
SELECT AVG("Position") FROM table_49992 WHERE "Points" < '11' AND "Pilot" = 'petr krejcirik'
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 position of pilot petr krejcirik, who has less than 11 points? ### Input: CREATE TABLE table_49992 ( ...
Who is the director for the witman boys?
CREATE TABLE table_1151 ( "Year (Ceremony)" text, "English title" text, "Hungarian title" text, "Director" text, "Result" text )
SELECT "Director" FROM table_1151 WHERE "English title" = 'The Witman Boys'
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 the director for the witman boys? ### Input: CREATE TABLE table_1151 ( "Year (Ceremony)" text, "English title...
A bar chart for showing the number of the countries that have managers of age above 50 or below 46, could you order x-axis from low to high order?
CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway_manage ( Railway_ID int, Manager_ID int, From_Year text ) CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, ...
SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: A bar chart for showing the number of the countries that have managers of age above 50 or below 46, could you order x-axis f...
What were the years active of the player from New Zealand with more than 11 caps?
CREATE TABLE table_14622 ( "Player" text, "Country" text, "Caps" real, "Goals" text, "Years Active" text )
SELECT "Years Active" FROM table_14622 WHERE "Caps" > '11' AND "Country" = 'new zealand'
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 years active of the player from New Zealand with more than 11 caps? ### Input: CREATE TABLE table_14622 ( ...
How many distinct students are enrolled in courses?
CREATE TABLE students ( student_id number, date_of_registration time, date_of_latest_logon time, login_name text, password text, personal_name text, middle_name text, family_name text ) CREATE TABLE subjects ( subject_id number, subject_name text ) CREATE TABLE student_course_e...
SELECT COUNT(DISTINCT student_id) FROM student_course_enrolment
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: How many distinct students are enrolled in courses? ### Input: CREATE TABLE students ( student_id number, date_of_re...
What's the exponent field that has 255 exp and value of + ?
CREATE TABLE table_38686 ( "Type" text, "Actual Exponent" text, "Exp (biased)" text, "Exponent field" text, "Significand (fraction field)" text, "Value" text )
SELECT "Exponent field" FROM table_38686 WHERE "Exp (biased)" = '255' AND "Value" = '+∞'
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 exponent field that has 255 exp and value of + ? ### Input: CREATE TABLE table_38686 ( "Type" text, "Actu...
may i see all the flights from CLEVELAND to DALLAS
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_da...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'CLEVELAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALL...
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: may i see all the flights from CLEVELAND to DALLAS ### Input: CREATE TABLE ground_service ( city_code text, airport_...
Stack bar chart of team_id vs ACC_Home based on all home, and could you display Y in asc order please?
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_Home, Team_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY Team_ID
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Stack bar chart of team_id vs ACC_Home based on all home, and could you display Y in asc order please? ### Input: CREATE TAB...