instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
find the name of pilots who did not win the matches held in the country of Australia.
CREATE TABLE pilot ( name VARCHAR, pilot_id VARCHAR, Winning_Pilot VARCHAR, country VARCHAR ) CREATE TABLE MATCH ( name VARCHAR, pilot_id VARCHAR, Winning_Pilot VARCHAR, country VARCHAR )
SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')
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: find the name of pilots who did not win the matches held in the country of Australia. ### Input: CREATE TABLE pilot ( na...
What is the highest championship that has 1 as the league cup, and 17 as the total?
CREATE TABLE table_name_85 ( championship INTEGER, league_cup VARCHAR, total VARCHAR )
SELECT MAX(championship) FROM table_name_85 WHERE league_cup = 1 AND total = "17"
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 highest championship that has 1 as the league cup, and 17 as the total? ### Input: CREATE TABLE table_name_85 ( ...
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, display in ascending by the the average of salary.
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varch...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY)
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about...
Name the verb meaning for half drosch
CREATE TABLE table_1745843_9 ( verb_meaning VARCHAR, part_2 VARCHAR )
SELECT verb_meaning FROM table_1745843_9 WHERE part_2 = "half drosch"
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 verb meaning for half drosch ### Input: CREATE TABLE table_1745843_9 ( verb_meaning VARCHAR, part_2 VARCHAR...
count the number of patients whose marital status is married and lab test name is albumin?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.label = "Albumin"
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 patients whose marital status is married and lab test name is albumin? ### Input: CREATE TABLE prescript...
How many patients admitted as clinic referral (premature) were diagnosed with percutaneous transluminal coronary angioplasty status?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.long_title = "Percutaneous transluminal coronary angioplasty status"
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 admitted as clinic referral (premature) were diagnosed with percutaneous transluminal coronary angioplasty...
What's the cores with the part number cl8064701477202?
CREATE TABLE table_13573 ( "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 "Cores" FROM table_13573 WHERE "Part number(s)" = 'cl8064701477202'
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 cores with the part number cl8064701477202? ### Input: CREATE TABLE table_13573 ( "Model number" text, "s...
how many countries have at least 10 gold medals in the asian youth games ?
CREATE TABLE table_203_747 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT COUNT("nation") FROM table_203_747 WHERE "gold" >= 10
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 countries have at least 10 gold medals in the asian youth games ? ### Input: CREATE TABLE table_203_747 ( id nu...
calculate the maximum age of patients with abdominal pain primary disease who were admitted to hospital for 43 days.
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.days_stay = "43"
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 maximum age of patients with abdominal pain primary disease who were admitted to hospital for 43 days. ### Inp...
What is the Chinese title with a premiere rating of 31?
CREATE TABLE table_name_91 ( chinese_title VARCHAR, premiere VARCHAR )
SELECT chinese_title FROM table_name_91 WHERE premiere = 31
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 Chinese title with a premiere rating of 31? ### Input: CREATE TABLE table_name_91 ( chinese_title VARCHAR, ...
Which mountain range includes Mount Hubbard?
CREATE TABLE table_71991 ( "Rank" real, "Mountain Peak" text, "Province" text, "Mountain Range" text, "Location" text )
SELECT "Mountain Range" FROM table_71991 WHERE "Mountain Peak" = 'mount hubbard'
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 mountain range includes Mount Hubbard? ### Input: CREATE TABLE table_71991 ( "Rank" real, "Mountain Peak" text...
what flights are available friday from PHILADELPHIA to OAKLAND
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE aircraft ( ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d...
atis
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights are available friday from PHILADELPHIA to OAKLAND ### Input: CREATE TABLE flight_stop ( flight_id int, ...
Final that has a Date of january 10, 2004 had what opponent?
CREATE TABLE table_name_23 ( opponent_in_the_final VARCHAR, date VARCHAR )
SELECT opponent_in_the_final FROM table_name_23 WHERE date = "january 10, 2004"
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: Final that has a Date of january 10, 2004 had what opponent? ### Input: CREATE TABLE table_name_23 ( opponent_in_the_fin...
What are the numbers of wines for different grapes Plot them as bar chart, sort by the bar in desc.
CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area...
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape 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: What are the numbers of wines for different grapes Plot them as bar chart, sort by the bar in desc. ### Input: CREATE TABLE ...
Who was the visiting team at Lincoln Financial Field when the final score was 24-14?
CREATE TABLE table_11235 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
SELECT "Visiting Team" FROM table_11235 WHERE "Stadium" = 'lincoln financial field' AND "Final Score" = '24-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: Who was the visiting team at Lincoln Financial Field when the final score was 24-14? ### Input: CREATE TABLE table_11235 ( ...
How many customers do we have?
CREATE TABLE services ( service_id number, service_type_code text, workshop_group_id number, product_description text, product_name text, product_price number, other_product_service_details text ) CREATE TABLE performers ( performer_id number, address_id number, customer_name te...
SELECT COUNT(*) FROM customers
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 customers do we have? ### Input: CREATE TABLE services ( service_id number, service_type_code text, wor...
What unit has an Avoirdupois value of 57.602 gr.?
CREATE TABLE table_37329 ( "Unit" text, "Russian" text, "Translation" text, "Ratio" real, "Metric value" text, "Avoirdupois value" text, "Ordinary value" text )
SELECT "Unit" FROM table_37329 WHERE "Avoirdupois value" = '57.602 gr.'
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 unit has an Avoirdupois value of 57.602 gr.? ### Input: CREATE TABLE table_37329 ( "Unit" text, "Russian" text,...
What date was the result 6 2, 4 6, 6 4?
CREATE TABLE table_11636213_7 ( date VARCHAR, result VARCHAR )
SELECT date FROM table_11636213_7 WHERE result = "6–2, 4–6, 6–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 date was the result 6 2, 4 6, 6 4? ### Input: CREATE TABLE table_11636213_7 ( date VARCHAR, result VARCHAR ) ##...
How many teams scored exactly 38 points
CREATE TABLE table_19215 ( "Team" text, "First Played" real, "Played" real, "Win" real, "Draw" real, "Loss" real, "Points For" real, "Ponts Against" real, "Last Meeting" real )
SELECT COUNT("Team") FROM table_19215 WHERE "Points For" = '38'
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 teams scored exactly 38 points ### Input: CREATE TABLE table_19215 ( "Team" text, "First Played" real, ...
was hot love released before run to me ?
CREATE TABLE table_204_742 ( id number, "release date" text, "single title" text, "uk singles chart\nposition" number, "french\ncharts" number, "german\ncharts" number, "irish\ncharts" number, "various" text )
SELECT (SELECT "release date" FROM table_204_742 WHERE "single title" = '"hot love"') < (SELECT "release date" FROM table_204_742 WHERE "single title" = '"run to me"')
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: was hot love released before run to me ? ### Input: CREATE TABLE table_204_742 ( id number, "release date" text, ...
the previous year, what were the five most common input events?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY intakeoutput.celllabel) AS ...
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: the previous year, what were the five most common input events? ### Input: CREATE TABLE intakeoutput ( intakeoutputid nu...
When the regular season of 2nd, Northeast and the year was less than 2008 what was the total number of Division?
CREATE TABLE table_40634 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text )
SELECT COUNT("Division") FROM table_40634 WHERE "Regular Season" = '2nd, northeast' AND "Year" < '2008'
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 regular season of 2nd, Northeast and the year was less than 2008 what was the total number of Division? ### Input: ...
Who was the away team in a tie no larger than 16 with forest green rovers at home?
CREATE TABLE table_78226 ( "Tie no" real, "Home team" text, "Score" text, "Away team" text, "Attendance" real )
SELECT "Away team" FROM table_78226 WHERE "Tie no" > '16' AND "Home team" = 'forest green rovers'
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 away team in a tie no larger than 16 with forest green rovers at home? ### Input: CREATE TABLE table_78226 ( ...
What is the largest number of consecutive starts for jason gildon?
CREATE TABLE table_30622 ( "Position" text, "Player" text, "Period" text, "Teams" text, "Consecutive starts" real, "Playoffs" real, "Total" real )
SELECT MAX("Consecutive starts") FROM table_30622 WHERE "Player" = 'Jason Gildon'
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 consecutive starts for jason gildon? ### Input: CREATE TABLE table_30622 ( "Position" text...
What's the record when the attendance was 41,573?
CREATE TABLE table_77731 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
SELECT "Record" FROM table_77731 WHERE "Attendance" = '41,573'
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 record when the attendance was 41,573? ### Input: CREATE TABLE table_77731 ( "Date" text, "Opponent" text...
sepsis induced immunosuppression
CREATE TABLE table_train_27 ( "id" int, "bone_marrow_transplant" bool, "antimicrobial_therapy" bool, "immune_suppression" bool, "hiv_infection" bool, "autoimmune_disease" bool, "hepatitis_b_infection" bool, "renal_disease" bool, "total_parenteral_nutrition" bool, "surgery" bool, ...
SELECT * FROM table_train_27 WHERE immune_suppression = 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: sepsis induced immunosuppression ### Input: CREATE TABLE table_train_27 ( "id" int, "bone_marrow_transplant" bool, ...
what is the play when the company is cyprus theatre organisation?
CREATE TABLE table_79409 ( "play" text, "author" text, "company" text, "base" text, "country" text )
SELECT "play" FROM table_79409 WHERE "company" = 'cyprus theatre organisation'
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 play when the company is cyprus theatre organisation? ### Input: CREATE TABLE table_79409 ( "play" text, ...
Give me the number of unmarried patients who were ordered a transferrin lab test.
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 prescription...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "Transferrin"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Give me the number of unmarried patients who were ordered a transferrin lab test. ### Input: CREATE TABLE procedures ( s...
Can you tell me the Opponent that has the Result of w 37-14?
CREATE TABLE table_name_25 ( opponent VARCHAR, result VARCHAR )
SELECT opponent FROM table_name_25 WHERE result = "w 37-14"
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: Can you tell me the Opponent that has the Result of w 37-14? ### Input: CREATE TABLE table_name_25 ( opponent VARCHAR, ...
What is the Date with a Opponent with wimbledon, and a Result of won 2-0?
CREATE TABLE table_77998 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text )
SELECT "Date" FROM table_77998 WHERE "Opponent" = 'wimbledon' AND "Result" = 'won 2-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: What is the Date with a Opponent with wimbledon, and a Result of won 2-0? ### Input: CREATE TABLE table_77998 ( "Round" ...
How many wrestlers were born in nara, and have a completed 'career and other notes' section?
CREATE TABLE table_1557974_1 ( career_and_other_notes VARCHAR, birthplace VARCHAR )
SELECT COUNT(career_and_other_notes) FROM table_1557974_1 WHERE birthplace = "Nara"
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 wrestlers were born in nara, and have a completed 'career and other notes' section? ### Input: CREATE TABLE table_1...
What is the zodiac sign for the English March?
CREATE TABLE table_60473 ( "English name" text, "Thai name" text, "Abbr." text, "Transcription" text, "Sanskrit word" text, "Zodiac sign" text )
SELECT "Zodiac sign" FROM table_60473 WHERE "English name" = 'march'
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 zodiac sign for the English March? ### Input: CREATE TABLE table_60473 ( "English name" text, "Thai name...
show me all the flights between OAKLAND and DENVER
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int )...
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 = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER...
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: show me all the flights between OAKLAND and DENVER ### Input: CREATE TABLE class_of_service ( booking_class varchar, ...
only opponent to defeat mocho cota in 1994
CREATE TABLE table_204_373 ( id number, "wager" text, "winner" text, "loser" text, "location" text, "date" text )
SELECT "winner" FROM table_204_373 WHERE "loser" = 'mocho cota' AND "date" = 1994
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: only opponent to defeat mocho cota in 1994 ### Input: CREATE TABLE table_204_373 ( id number, "wager" text, "win...
When was the game where the home team score was 8.9 (57)?
CREATE TABLE table_53070 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_53070 WHERE "Home team score" = '8.9 (57)'
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 game where the home team score was 8.9 (57)? ### Input: CREATE TABLE table_53070 ( "Home team" text, "H...
Top 150 users from China. Top 150 SO users from China
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%sweden%' OR UPPER(Location) LIKE '%SWEDEN%' OR Location LIKE '%SWEDEN%' AND Reputation >= 0 ORDER BY Reputation DESC LIMIT 150
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: Top 150 users from China. Top 150 SO users from China ### Input: CREATE TABLE Users ( Id number, Reputation number, ...
When was the successor who got his seat because of 'until august 2, 1813' seated?
CREATE TABLE table_25067 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
SELECT "Date successor seated" FROM table_25067 WHERE "Reason for change" = 'Until August 2, 1813'
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 successor who got his seat because of 'until august 2, 1813' seated? ### Input: CREATE TABLE table_25067 ( ...
Who was the team when the category is field goal percentage?
CREATE TABLE table_28628309_6 ( team VARCHAR, category VARCHAR )
SELECT team FROM table_28628309_6 WHERE category = "Field goal percentage"
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 team when the category is field goal percentage? ### Input: CREATE TABLE table_28628309_6 ( team VARCHAR, ...
how many points scored by sportivo luque o
CREATE TABLE table_21068 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Scored" real, "Conceded" real, "Points" real )
SELECT COUNT("Points") FROM table_21068 WHERE "Team" = 'Sportivo Luqueño'
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 points scored by sportivo luque o ### Input: CREATE TABLE table_21068 ( "Position" real, "Team" text, "...
What is the competition type of the event with a result of 3-2 and a score of 2-1?
CREATE TABLE table_68487 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Competition" FROM table_68487 WHERE "Result" = '3-2' AND "Score" = '2-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 of the event with a result of 3-2 and a score of 2-1? ### Input: CREATE TABLE table_68487 ( ...
How many new entries started in the round where winners from the previous round is 32?
CREATE TABLE table_18328569_1 ( new_entries_this_round VARCHAR, winners_from_previous_round VARCHAR )
SELECT new_entries_this_round FROM table_18328569_1 WHERE winners_from_previous_round = "32"
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 new entries started in the round where winners from the previous round is 32? ### Input: CREATE TABLE table_1832856...
which episode was Transmitted on friday if the episode of '515 the adventures of tintin' was transmitted on monday?
CREATE TABLE table_18173916_8 ( friday VARCHAR, monday VARCHAR )
SELECT friday FROM table_18173916_8 WHERE monday = "515 The Adventures of Tintin"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which episode was Transmitted on friday if the episode of '515 the adventures of tintin' was transmitted on monday? ### Inpu...
What is the highest league cup with more than 0 FA cups, a premier league less than 34 and a total of 11?
CREATE TABLE table_name_77 ( league_cup INTEGER, total VARCHAR, fa_cup VARCHAR, premier_league VARCHAR )
SELECT MAX(league_cup) FROM table_name_77 WHERE fa_cup > 0 AND premier_league < 34 AND total = 11
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest league cup with more than 0 FA cups, a premier league less than 34 and a total of 11? ### Input: CREATE ...
bmi 25 to 35 inclusive
CREATE TABLE table_train_234 ( "id" int, "orthostatic_hypotension" bool, "systolic_blood_pressure_sbp" int, "estimated_glomerular_filtration_rate_egfr" int, "postural_fall_of_dbp" int, "diastolic_blood_pressure_dbp" int, "postural_fall_of_sbp" int, "allergy_to_sglt_2_inhibitors" bool, ...
SELECT * FROM table_train_234 WHERE body_mass_index_bmi >= 25 AND body_mass_index_bmi <= 35
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: bmi 25 to 35 inclusive ### Input: CREATE TABLE table_train_234 ( "id" int, "orthostatic_hypotension" bool, "syst...
What is the year the institution Tougaloo College joined?
CREATE TABLE table_16187 ( "Institution" text, "Location" text, "Mens Nickname" text, "Womens Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" text )
SELECT "Joined" FROM table_16187 WHERE "Institution" = 'Tougaloo College'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the year the institution Tougaloo College joined? ### Input: CREATE TABLE table_16187 ( "Institution" text, ...
Who had Pole position for the French Grand Prix?
CREATE TABLE table_11142 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text )
SELECT "Pole position" FROM table_11142 WHERE "Race" = 'french grand prix'
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 had Pole position for the French Grand Prix? ### Input: CREATE TABLE table_11142 ( "Race" text, "Circuit" text, ...
show me the airlines that fly from DENVER to SAN FRANCISCO
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 airline.airline_code FROM airline, 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na...
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: show me the airlines that fly from DENVER to SAN FRANCISCO ### Input: CREATE TABLE aircraft ( aircraft_code varchar, ...
Name the record for verizon center 20,173
CREATE TABLE table_21460 ( "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_21460 WHERE "Location Attendance" = 'Verizon Center 20,173'
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 record for verizon center 20,173 ### Input: CREATE TABLE table_21460 ( "Game" real, "Date" text, "Team"...
what is the number of patients whose drug code is eryt250 and lab test fluid is cerebrospinal fliuid (csf)?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ERYT250" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
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 drug code is eryt250 and lab test fluid is cerebrospinal fliuid (csf)? ### Input: CREAT...
Name the total number of height for number 32
CREATE TABLE table_25360865_1 ( height VARCHAR, _number VARCHAR )
SELECT COUNT(height) FROM table_25360865_1 WHERE _number = 32
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 total number of height for number 32 ### Input: CREATE TABLE table_25360865_1 ( height VARCHAR, _number VAR...
Compare the total number of each fate with a bar chart, show from high to low by the x axis.
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text )
SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate ORDER BY Fate 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: Compare the total number of each fate with a bar chart, show from high to low by the x axis. ### Input: CREATE TABLE ship ( ...
what were the new prescriptions of patient 97395 today compared to the prescription they received yesterday?
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97395) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what were the new prescriptions of patient 97395 today compared to the prescription they received yesterday? ### Input: CREA...
What is the best time for a team with a first-qualifying time of 59.448?
CREATE TABLE table_name_6 ( best VARCHAR, qual_1 VARCHAR )
SELECT best FROM table_name_6 WHERE qual_1 = "59.448"
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 best time for a team with a first-qualifying time of 59.448? ### Input: CREATE TABLE table_name_6 ( best VAR...
who write the episode that have 14.39 million viewers
CREATE TABLE table_19417244_2 ( written_by VARCHAR, us_viewers__millions_ VARCHAR )
SELECT written_by FROM table_19417244_2 WHERE us_viewers__millions_ = "14.39"
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 write the episode that have 14.39 million viewers ### Input: CREATE TABLE table_19417244_2 ( written_by VARCHAR, ...
When Thomas Clayton had a gain less than 71, what was the highest long value?
CREATE TABLE table_name_40 ( long INTEGER, name VARCHAR, gain VARCHAR )
SELECT MAX(long) FROM table_name_40 WHERE name = "thomas clayton" AND gain < 71
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 Thomas Clayton had a gain less than 71, what was the highest long value? ### Input: CREATE TABLE table_name_40 ( lo...
Name the gdp per capita for haiti
CREATE TABLE table_26313243_1 ( gdp__ppp__per_capita___intl_$___2011 VARCHAR, country VARCHAR )
SELECT gdp__ppp__per_capita___intl_$___2011 FROM table_26313243_1 WHERE country = "Haiti"
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 gdp per capita for haiti ### Input: CREATE TABLE table_26313243_1 ( gdp__ppp__per_capita___intl_$___2011 VARCHA...
What is the total number of population in the land with an area of 149.32 km2?
CREATE TABLE table_21283 ( "Official Name" text, "Status" text, "Area km 2" text, "Population" real, "Census Ranking" text )
SELECT COUNT("Population") FROM table_21283 WHERE "Area km 2" = '149.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: What is the total number of population in the land with an area of 149.32 km2? ### Input: CREATE TABLE table_21283 ( "Of...
Proportion of users who've asked no questions. Counts the number of users with Rep>=1000 who've asked no questions, and the total number of users with Rep>=1000.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
SELECT (SELECT COUNT(u.DisplayName) FROM Users AS u WHERE u.Reputation >= 1000) AS "significant_users", (SELECT COUNT(u.DisplayName) FROM Users AS u WHERE u.Id NOT IN (SELECT DISTINCT OwnerUserId FROM Posts WHERE PostTypeId = 1 AND OwnerUserId != '') AND u.Reputation >= 94000) AS "with_no_questions"
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: Proportion of users who've asked no questions. Counts the number of users with Rep>=1000 who've asked no questions, and the ...
What is Player, when Money ( $ ) is less than 387, and when Score is '73-76-74-72=295'?
CREATE TABLE table_name_40 ( player VARCHAR, money___$__ VARCHAR, score VARCHAR )
SELECT player FROM table_name_40 WHERE money___$__ < 387 AND score = 73 - 76 - 74 - 72 = 295
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 Player, when Money ( $ ) is less than 387, and when Score is '73-76-74-72=295'? ### Input: CREATE TABLE table_name_4...
What's the ijekavian translation of the ikavian word grijati?
CREATE TABLE table_29854 ( "English" text, "Predecessor" text, "Ekavian" text, "Ikavian" text, "Ijekavian" text, "Ijekavian development" text )
SELECT "Ijekavian" FROM table_29854 WHERE "Ikavian" = 'grijati'
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 ijekavian translation of the ikavian word grijati? ### Input: CREATE TABLE table_29854 ( "English" text, ...
What date did the T328 that entered service on 18 June 1956 re-enter service?
CREATE TABLE table_name_22 ( re_entered_service__p_ VARCHAR, entered_service__t_ VARCHAR, pre_conversion VARCHAR )
SELECT re_entered_service__p_ FROM table_name_22 WHERE entered_service__t_ = "18 june 1956" AND pre_conversion = "t328"
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 date did the T328 that entered service on 18 June 1956 re-enter service? ### Input: CREATE TABLE table_name_22 ( re...
Name the country for sky primafila 7 hd
CREATE TABLE table_15887683_6 ( country VARCHAR, television_service VARCHAR )
SELECT country FROM table_15887683_6 WHERE television_service = "Sky Primafila 7 HD"
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 country for sky primafila 7 hd ### Input: CREATE TABLE table_15887683_6 ( country VARCHAR, television_servi...
Which nominating festival nominated Iao Lethem's film?
CREATE TABLE table_15380 ( "Category" text, "Film" text, "Director(s)" text, "Country" text, "Nominating Festival" text )
SELECT "Nominating Festival" FROM table_15380 WHERE "Director(s)" = 'iao lethem'
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 nominating festival nominated Iao Lethem's film? ### Input: CREATE TABLE table_15380 ( "Category" text, "Film"...
What is the largest number of Games Played with Losses of 3, and more Wins than 5?
CREATE TABLE table_11772 ( "Team" text, "Games Played" real, "Wins" real, "Losses" real, "Ties" real, "Goals For" real, "Goals Against" real )
SELECT MAX("Games Played") FROM table_11772 WHERE "Losses" = '3' AND "Wins" > '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: What is the largest number of Games Played with Losses of 3, and more Wins than 5? ### Input: CREATE TABLE table_11772 ( ...
What county has an IHSAA Football Class of A, and a Mascot of royals?
CREATE TABLE table_63746 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Football Class" text, "Primary Conference" text, "County" text )
SELECT "County" FROM table_63746 WHERE "IHSAA Football Class" = 'a' AND "Mascot" = 'royals'
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 county has an IHSAA Football Class of A, and a Mascot of royals? ### Input: CREATE TABLE table_63746 ( "School" tex...
what is during the first hospital encounter maximum neutrophils value of patient 99647?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( ...
SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99647 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = '...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is during the first hospital encounter maximum neutrophils value of patient 99647? ### Input: CREATE TABLE d_icd_diagno...
Overlap between a given tag and related ones.
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense...
SELECT *, CAST(100.0 * without_tag / (without_tag + with_tag) AS FLOAT(18, 2)) AS perc_not_tag FROM (SELECT COUNT(p.Id) AS post_count, t.TagName, SUM(CASE WHEN p.Tags LIKE '%<##Tag##>%' THEN 1 ELSE 0 END) AS with_tag, SUM(CASE WHEN NOT p.Tags LIKE '%<##Tag##>%' THEN 1 ELSE 0 END) AS without_tag FROM Posts AS p JOIN Pos...
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: Overlap between a given tag and related ones. ### Input: CREATE TABLE CloseReasonTypes ( Id number, Name text, D...
Give me a bar chart to show the revenue of the company that earns the highest revenue in each headquarter city.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT Headquarter, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter
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 bar chart to show the revenue of the company that earns the highest revenue in each headquarter city. ### Input: C...
What is the lowest Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802?
CREATE TABLE table_name_10 ( grid INTEGER, time VARCHAR, laps VARCHAR, manufacturer VARCHAR )
SELECT MIN(grid) FROM table_name_10 WHERE laps = 21 AND manufacturer = "yamaha" AND time = "+18.802"
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 Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802? ### Input: CREATE TABLE tab...
What's the lowest grid with and entrant of fred saunders?
CREATE TABLE table_62894 ( "Driver" text, "Entrant" text, "Constructor" text, "Time/Retired" text, "Grid" real )
SELECT MIN("Grid") FROM table_62894 WHERE "Entrant" = 'fred saunders'
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 lowest grid with and entrant of fred saunders? ### Input: CREATE TABLE table_62894 ( "Driver" text, "Entr...
What name was proposed on 12/30/1982 in rockingham county with a CERCLIS ID of nhd062004569?
CREATE TABLE table_9427 ( "CERCLIS ID" text, "Name" text, "County" text, "Proposed" text, "Listed" text, "Construction completed" text, "Partially deleted" text )
SELECT "Name" FROM table_9427 WHERE "Proposed" = '12/30/1982' AND "County" = 'rockingham' AND "CERCLIS ID" = 'nhd062004569'
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 name was proposed on 12/30/1982 in rockingham county with a CERCLIS ID of nhd062004569? ### Input: CREATE TABLE table_9...
Name the stock for colt model mt6601
CREATE TABLE table_12834315_4 ( stock VARCHAR, colt_model_no VARCHAR )
SELECT stock FROM table_12834315_4 WHERE colt_model_no = "MT6601"
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 stock for colt model mt6601 ### Input: CREATE TABLE table_12834315_4 ( stock VARCHAR, colt_model_no VARCHAR...
What year was the West Coast League established than the championships are greater than 0?
CREATE TABLE table_36871 ( "Club" text, "Sport" text, "League" text, "Venue" text, "Established" real, "Championships" real )
SELECT "Established" FROM table_36871 WHERE "Championships" > '0' AND "League" = 'west coast league'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was the West Coast League established than the championships are greater than 0? ### Input: CREATE TABLE table_368...
Show the name of each party and the corresponding number of delegates from that party Plot them as bar chart, sort by the x axis from low to high please.
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 T2.Party, SUM(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY T2.Party
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 name of each party and the corresponding number of delegates from that party Plot them as bar chart, sort by the x ...
Which Institutional authority has a Rocket launch of rehnuma-10?
CREATE TABLE table_57777 ( "Rocket launch" text, "Launch Date" text, "Mission" text, "Institutional authority" text, "Launch Site" text, "Outcomes" text, "Derivatives" text )
SELECT "Institutional authority" FROM table_57777 WHERE "Rocket launch" = 'rehnuma-10'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Institutional authority has a Rocket launch of rehnuma-10? ### Input: CREATE TABLE table_57777 ( "Rocket launch" t...
What are Utah's high points?
CREATE TABLE table_name_49 ( high_points VARCHAR, team VARCHAR )
SELECT high_points FROM table_name_49 WHERE team = "utah"
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 Utah's high points? ### Input: CREATE TABLE table_name_49 ( high_points VARCHAR, team VARCHAR ) ### Respons...
Give swimsuit scores of participants 8.847 in preliminary
CREATE TABLE table_21281 ( "Country" text, "Preliminary" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Average" text )
SELECT "Swimsuit" FROM table_21281 WHERE "Preliminary" = '8.847'
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: Give swimsuit scores of participants 8.847 in preliminary ### Input: CREATE TABLE table_21281 ( "Country" text, "Pre...
i want a flight on CO from BOSTON to SAN FRANCISCO
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) 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, round_trip_req...
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: i want a flight on CO from BOSTON to SAN FRANCISCO ### Input: CREATE TABLE time_interval ( period text, begin_time i...
The Catalog of ilps 9153 is from what region?
CREATE TABLE table_8574 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text )
SELECT "Region" FROM table_8574 WHERE "Catalog" = 'ilps 9153'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The Catalog of ilps 9153 is from what region? ### Input: CREATE TABLE table_8574 ( "Region" text, "Date" text, "...
What is the February number of the game with the Vancouver Canucks as the opponent and a game number greater than 55?
CREATE TABLE table_name_48 ( february VARCHAR, opponent VARCHAR, game VARCHAR )
SELECT COUNT(february) FROM table_name_48 WHERE opponent = "vancouver canucks" AND game > 55
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 February number of the game with the Vancouver Canucks as the opponent and a game number greater than 55? ### In...
what was the name of the drug, which patient 52898 was last prescribed via right ear route since 02/2105?
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 prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898) AND prescriptions.route = 'right ear' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-02' 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: what was the name of the drug, which patient 52898 was last prescribed via right ear route since 02/2105? ### Input: CREATE ...
What is the average rank of one who is at 76 laps?
CREATE TABLE table_10504 ( "Grid" real, "Constructor" text, "Qual" real, "Rank" real, "Laps" real, "Time/retired" text )
SELECT AVG("Rank") FROM table_10504 WHERE "Laps" = '76'
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 rank of one who is at 76 laps? ### Input: CREATE TABLE table_10504 ( "Grid" real, "Constructor" ...
count the number of patients whose diagnoses short title is atrial fibrillation and drug route is tp?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Atrial fibrillation" AND prescriptions.route = "TP"
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 patients whose diagnoses short title is atrial fibrillation and drug route is tp? ### Input: CREATE TABL...
What country is the film that has music of nino oliviero?
CREATE TABLE table_name_10 ( country VARCHAR, music VARCHAR )
SELECT country FROM table_name_10 WHERE music = "nino oliviero"
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 country is the film that has music of nino oliviero? ### Input: CREATE TABLE table_name_10 ( country VARCHAR, m...
When can I take 421 ?
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varc...
SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 421 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste...
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: When can I take 421 ? ### Input: CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( r...
Show the relationship between the number of schools in each county and total enrollment in each county by a scatter plot.
CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollment int, IHSAA_Class text, IHSAA_Football_Class text, County text ) CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE budget ...
SELECT COUNT(*), SUM(Enrollment) FROM School GROUP BY County
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 relationship between the number of schools in each county and total enrollment in each county by a scatter plot. ##...
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, I want to show by the X in desc.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.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 records from the products and each product's manufacturer, visualize a bar chart about the distribution of name an...
Who played Richmond at home?
CREATE TABLE table_14312471_7 ( home_team VARCHAR, away_team VARCHAR )
SELECT home_team FROM table_14312471_7 WHERE away_team = "Richmond"
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 played Richmond at home? ### Input: CREATE TABLE table_14312471_7 ( home_team VARCHAR, away_team VARCHAR ) ### R...
What label is after 2004?
CREATE TABLE table_53217 ( "Year" real, "Tracks" text, "Title" text, "Format, Special Notes" text, "Label" text )
SELECT "Label" FROM table_53217 WHERE "Year" > '2004'
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 label is after 2004? ### Input: CREATE TABLE table_53217 ( "Year" real, "Tracks" text, "Title" text, "F...
how many seats in a 734
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE airline ( airline_code...
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = '734'
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: how many seats in a 734 ### Input: CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high...
what is the name when the constituency number is 150?
CREATE TABLE table_63371 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real )
SELECT "Name" FROM table_63371 WHERE "Constituency number" = '150'
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 when the constituency number is 150? ### Input: CREATE TABLE table_63371 ( "Constituency number" text, ...
WHAT PLACE WAS A SCORE 67-70=137?
CREATE TABLE table_name_48 ( place VARCHAR, score VARCHAR )
SELECT place FROM table_name_48 WHERE score = 67 - 70 = 137
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 PLACE WAS A SCORE 67-70=137? ### Input: CREATE TABLE table_name_48 ( place VARCHAR, score VARCHAR ) ### Respons...
mention the discharge time and diagnosis icd9 code of subject id 42820.
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 demographic.dischtime, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "42820"
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: mention the discharge time and diagnosis icd9 code of subject id 42820. ### Input: CREATE TABLE diagnoses ( subject_id t...
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and department_id , and could you rank names from high to low order?
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0...
SELECT JOB_ID, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the di...
provide the number of patients whose primary disease is ruq pain and year of birth is less than 2112?
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 WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.dob_year < "2112"
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 primary disease is ruq pain and year of birth is less than 2112? ### Input: CREATE TABL...
How many patients are with discharge location short term hospital and below age 67?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.age < "67"
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 are with discharge location short term hospital and below age 67? ### Input: CREATE TABLE procedures ( ...
When was the church in Arnafjord built?
CREATE TABLE table_59057 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
SELECT "Year Built" FROM table_59057 WHERE "Location of the Church" = 'arnafjord'
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 church in Arnafjord built? ### Input: CREATE TABLE table_59057 ( "Parish (Prestegjeld)" text, "Sub-Pari...
What was the result of the game that had 56,500 in attendance?
CREATE TABLE table_59320 ( "Date" text, "Time" text, "Opponent#" text, "Rank #" text, "Result" text, "Attendance" text )
SELECT "Result" FROM table_59320 WHERE "Attendance" = '56,500'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the result of the game that had 56,500 in attendance? ### Input: CREATE TABLE table_59320 ( "Date" text, "T...
How many rounds have School/club team of pan american?
CREATE TABLE table_name_91 ( round INTEGER, school_club_team VARCHAR )
SELECT SUM(round) FROM table_name_91 WHERE school_club_team = "pan american"
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 rounds have School/club team of pan american? ### Input: CREATE TABLE table_name_91 ( round INTEGER, school...
What is the number of people in attendance when the time is 3:00?
CREATE TABLE table_77393 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real )
SELECT "Attendance" FROM table_77393 WHERE "Time" = '3:00'
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 number of people in attendance when the time is 3:00? ### Input: CREATE TABLE table_77393 ( "Game" real, ...