instruction
stringlengths
0
1.06k
input
stringlengths
33
7.14k
response
stringlengths
2
4.44k
source
stringclasses
25 values
text
stringlengths
302
8.5k
What is the total of overall values with a safety position in a round greater than 1?
CREATE TABLE table_name_26 ( overall VARCHAR, position VARCHAR, round VARCHAR )
SELECT COUNT(overall) FROM table_name_26 WHERE position = "safety" AND round > 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total of overall values with a safety position in a round greater than 1? ### Input: CREATE TABLE table_name_26 ...
Name the irish points for 23-1 record
CREATE TABLE table_25477 ( "Date" text, "Location" text, "Opponent" text, "Irish Points" real, "Opp. Points" real, "Record" text )
SELECT "Irish Points" FROM table_25477 WHERE "Record" = '23-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 irish points for 23-1 record ### Input: CREATE TABLE table_25477 ( "Date" text, "Location" text, "Oppon...
What is the ethernet ports of the u150 appliance?
CREATE TABLE table_43381 ( "Name" text, "Processor" text, "Hard Drive" text, "Ethernet Ports" text, "Dimensions" text )
SELECT "Ethernet Ports" FROM table_43381 WHERE "Name" = 'u150'
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 ethernet ports of the u150 appliance? ### Input: CREATE TABLE table_43381 ( "Name" text, "Processor" tex...
What is the Country, when Place is 'T4', and when Player is 'Scott Simpson'?
CREATE TABLE table_48770 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
SELECT "Country" FROM table_48770 WHERE "Place" = 't4' AND "Player" = 'scott simpson'
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 Country, when Place is 'T4', and when Player is 'Scott Simpson'? ### Input: CREATE TABLE table_48770 ( "Plac...
What is the lowest Round with Overall of 247 and pick less than 41?
CREATE TABLE table_75536 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT MIN("Round") FROM table_75536 WHERE "Overall" = '247' AND "Pick #" < '41'
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 Round with Overall of 247 and pick less than 41? ### Input: CREATE TABLE table_75536 ( "Round" real, ...
how many patients died during the same month after having been diagnosed since 2101 with edema?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose...
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_di...
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: how many patients died during the same month after having been diagnosed since 2101 with edema? ### Input: CREATE TABLE labe...
How many married patients are American Indian/Alaska native?
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 WHERE demographic.marital_status = "MARRIED" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
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 married patients are American Indian/Alaska native? ### Input: CREATE TABLE prescriptions ( subject_id text, ...
what is the first procedure that patient 13837 received when they came to the hospital first time?
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 d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13837 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admit...
mimic_iii
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the first procedure that patient 13837 received when they came to the hospital first time? ### Input: CREATE TABLE t...
What time was the game during week 5?
CREATE TABLE table_38501 ( "Week" real, "Date" text, "Opponent" text, "Location" text, "Time ( ET )" text, "Result" text, "Record" text )
SELECT "Time ( ET )" FROM table_38501 WHERE "Week" = '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 time was the game during week 5? ### Input: CREATE TABLE table_38501 ( "Week" real, "Date" text, "Opponent"...
tell me the number of summer olympics on the list .
CREATE TABLE table_204_266 ( id number, "#" number, "event year" number, "season" text, "flag bearer" text )
SELECT COUNT(*) FROM table_204_266 WHERE "season" = 'summer'
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: tell me the number of summer olympics on the list . ### Input: CREATE TABLE table_204_266 ( id number, "#" number, ...
Show me about the distribution of name and meter_100 in a bar chart, rank y axis in desc order please.
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimme...
SELECT name, meter_100 FROM swimmer ORDER BY meter_100 DESC
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show me about the distribution of name and meter_100 in a bar chart, rank y axis in desc order please. ### Input: CREATE TAB...
which airlines fly from TORONTO to SAN DIEGO and have a stopover in DENVER
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE...
SELECT DISTINCT airline.airline_code FROM airline, 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...
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: which airlines fly from TORONTO to SAN DIEGO and have a stopover in DENVER ### Input: CREATE TABLE class_of_service ( bo...
What is the average Number, when Position is Forward?
CREATE TABLE table_name_13 ( number INTEGER, position VARCHAR )
SELECT AVG(number) FROM table_name_13 WHERE position = "forward"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average Number, when Position is Forward? ### Input: CREATE TABLE table_name_13 ( number INTEGER, positi...
Show the number of climbers for each mountain in a bar chart, and sort Name in descending order.
CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text )
SELECT T2.Name, COUNT(T2.Name) FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID GROUP BY T2.Name ORDER BY T2.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: Show the number of climbers for each mountain in a bar chart, and sort Name in descending order. ### Input: CREATE TABLE cli...
What Class has the Identifier fo CBFX-FM-2?
CREATE TABLE table_66624 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text )
SELECT "Class" FROM table_66624 WHERE "Identifier" = 'cbfx-fm-2'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What Class has the Identifier fo CBFX-FM-2? ### Input: CREATE TABLE table_66624 ( "City of license" text, "Identifie...
what is marital status of subject name joseph dillman?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Joseph Dillman"
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 marital status of subject name joseph dillman? ### Input: CREATE TABLE demographic ( subject_id text, hadm_i...
How much #s have an Area in km larger than 13.5, and a Population Canada 2011 Census of 134,038?
CREATE TABLE table_33847 ( "Number (map)" real, "Borough" text, "Population Canada 2011 Census" real, "Area in km\u00b2" real, "Density per km\u00b2" real )
SELECT COUNT("Number (map)") FROM table_33847 WHERE "Area in km\u00b2" > '13.5' AND "Population Canada 2011 Census" = '134,038'
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 much #s have an Area in km larger than 13.5, and a Population Canada 2011 Census of 134,038? ### Input: CREATE TABLE tab...
what is the number of players who weight over 200 pounds ?
CREATE TABLE table_204_105 ( id number, "#" number, "name" text, "height" text, "weight (lbs.)" number, "position" text, "class" text, "hometown" text, "previous team(s)" text )
SELECT COUNT("name") FROM table_204_105 WHERE "weight (lbs.)" > 200
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the number of players who weight over 200 pounds ? ### Input: CREATE TABLE table_204_105 ( id number, "#" nu...
how many days has it been since patient 013-33898 was admitted into icu?
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid numb...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '013-33898' AND patient.unitdischargetime IS NULL
eicu
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many days has it been since patient 013-33898 was admitted into icu? ### Input: CREATE TABLE medication ( medication...
so what's the average urea nitrogen, urine value of patient 12775 on this hospital encounter?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
SELECT AVG(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'urea nitrogen, urine')
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: so what's the average urea nitrogen, urine value of patient 12775 on this hospital encounter? ### Input: CREATE TABLE microb...
how many times is the nation listed as united states with the total more than 1?
CREATE TABLE table_name_44 ( silver VARCHAR, nation VARCHAR, total VARCHAR )
SELECT COUNT(silver) FROM table_name_44 WHERE nation = "united states" AND total > 1
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many times is the nation listed as united states with the total more than 1? ### Input: CREATE TABLE table_name_44 ( ...
What format has conference iii as the conference?
CREATE TABLE table_name_42 ( format VARCHAR, conference VARCHAR )
SELECT format FROM table_name_42 WHERE conference = "conference iii"
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 format has conference iii as the conference? ### Input: CREATE TABLE table_name_42 ( format VARCHAR, conference...
Which ERP W is the highest one that has a Call sign of w255bi?
CREATE TABLE table_name_3 ( erp_w INTEGER, call_sign VARCHAR )
SELECT MAX(erp_w) FROM table_name_3 WHERE call_sign = "w255bi"
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 ERP W is the highest one that has a Call sign of w255bi? ### Input: CREATE TABLE table_name_3 ( erp_w INTEGER, ...
Top 30 Users with most upvotes. Top 20 Users with most upvotes/day to their answers to non-CW posts in the last 30 days
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE T...
SELECT SUM(UpVotes) AS upv, SUM(DownVotes) AS downv FROM Users ORDER BY upv DESC LIMIT 30
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 30 Users with most upvotes. Top 20 Users with most upvotes/day to their answers to non-CW posts in the last 30 days ### ...
At a longitude of 321.9e, what is the latitude of the features found?
CREATE TABLE table_16799784_3 ( latitude VARCHAR, longitude VARCHAR )
SELECT latitude FROM table_16799784_3 WHERE longitude = "321.9E"
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: At a longitude of 321.9e, what is the latitude of the features found? ### Input: CREATE TABLE table_16799784_3 ( latitud...
In what year saw a total distance of 1,870.23 km?
CREATE TABLE table_name_52 ( year VARCHAR, distance VARCHAR )
SELECT year FROM table_name_52 WHERE distance = "1,870.23 km"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what year saw a total distance of 1,870.23 km? ### Input: CREATE TABLE table_name_52 ( year VARCHAR, distance VAR...
When did the Wolverhampton Wanderers play at home?
CREATE TABLE table_name_52 ( date VARCHAR, home_team VARCHAR )
SELECT date FROM table_name_52 WHERE home_team = "wolverhampton wanderers"
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 the Wolverhampton Wanderers play at home? ### Input: CREATE TABLE table_name_52 ( date VARCHAR, home_team V...
what is the minimum attendance with record being 4 6
CREATE TABLE table_933 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attendance" real )
SELECT MIN("Attendance") FROM table_933 WHERE "Record" = '4–6'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what is the minimum attendance with record being 4 6 ### Input: CREATE TABLE table_933 ( "Week" real, "Date" text, ...
How many Points have a Position larger than 4, and Losses larger than 5, and a Conceded of 15, and a Scored larger than 11?
CREATE TABLE table_63139 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws P.K. Wins / P.K. Losses" text, "Losses" real, "Scored" real, "Conceded" real, "Points" real )
SELECT COUNT("Points") FROM table_63139 WHERE "Position" > '4' AND "Losses" > '5' AND "Conceded" = '15' AND "Scored" > '11'
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 have a Position larger than 4, and Losses larger than 5, and a Conceded of 15, and a Scored larger than 11? ...
When the tries against is 90 how many points are there?
CREATE TABLE table_name_92 ( points VARCHAR, tries_against VARCHAR )
SELECT points FROM table_name_92 WHERE tries_against = "90"
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 the tries against is 90 how many points are there? ### Input: CREATE TABLE table_name_92 ( points VARCHAR, trie...
What is the Time/Retired for Grid 6?
CREATE TABLE table_10665 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Time/Retired" FROM table_10665 WHERE "Grid" = '6'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the Time/Retired for Grid 6? ### Input: CREATE TABLE table_10665 ( "Driver" text, "Constructor" text, "L...
What's the shortest length from north klondike highway that has a length less than 326?
CREATE TABLE table_37259 ( "Name" text, "Number" real, "From" text, "Length (km)" real, "Length (mi)" real )
SELECT MIN("Length (km)") FROM table_37259 WHERE "Name" = 'north klondike highway' AND "Length (mi)" < '326'
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 shortest length from north klondike highway that has a length less than 326? ### Input: CREATE TABLE table_37259 ...
What is Fractievoorzitter, when Lijsttrekker is 'No Elections', and when Year is after 2005?
CREATE TABLE table_9582 ( "Year" real, "Lijsttrekker" text, "Fractievoorzitter" text, "Cabinet" text, "Chair" text )
SELECT "Fractievoorzitter" FROM table_9582 WHERE "Lijsttrekker" = 'no elections' AND "Year" > '2005'
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 Fractievoorzitter, when Lijsttrekker is 'No Elections', and when Year is after 2005? ### Input: CREATE TABLE table_9...
What scores happened on February 9?
CREATE TABLE table_23486853_7 ( score VARCHAR, date VARCHAR )
SELECT score FROM table_23486853_7 WHERE date = "February 9"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What scores happened on February 9? ### Input: CREATE TABLE table_23486853_7 ( score VARCHAR, date VARCHAR ) ### Res...
Name the windows builders for apache gump
CREATE TABLE table_25529 ( "Name" text, "Platform" text, "License" text, "Windows builders" text, "Java builders" text, "Other builders" text, "SCM system" text, "Notification" text, "IDE Integration" text, "Other Integration" text )
SELECT "Windows builders" FROM table_25529 WHERE "Name" = 'Apache Gump'
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 windows builders for apache gump ### Input: CREATE TABLE table_25529 ( "Name" text, "Platform" text, "L...
which stadium can hold more people than ballymena showgrounds , but less than windsor park ?
CREATE TABLE table_203_420 ( id number, "#" number, "stadium" text, "capacity" number, "city" text, "home team" text )
SELECT "stadium" FROM table_203_420 WHERE "capacity" > (SELECT "capacity" FROM table_203_420 WHERE "stadium" = 'ballymena showgrounds') AND "capacity" < (SELECT "capacity" FROM table_203_420 WHERE "stadium" = 'windsor park')
squall
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: which stadium can hold more people than ballymena showgrounds , but less than windsor park ? ### Input: CREATE TABLE table_2...
Which college's round is more than 4, when the overall is less than 237 and Ted Cottrell was the name?
CREATE TABLE table_name_90 ( college VARCHAR, name VARCHAR, round VARCHAR, overall VARCHAR )
SELECT college FROM table_name_90 WHERE round > 4 AND overall < 237 AND name = "ted cottrell"
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 college's round is more than 4, when the overall is less than 237 and Ted Cottrell was the name? ### Input: CREATE TAB...
What city is the headquarter of the store Blackville?
CREATE TABLE district ( district_id number, district_name text, headquartered_city text, city_population number, city_area number ) CREATE TABLE product ( product_id number, product text, dimensions text, dpi number, pages_per_minute_color number, max_page_size text, int...
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville"
spider
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What city is the headquarter of the store Blackville? ### Input: CREATE TABLE district ( district_id number, distric...
what is the name of the allergy which patient 003-17096 has in 12/this year?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-17096')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIM...
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 name of the allergy which patient 003-17096 has in 12/this year? ### Input: CREATE TABLE microlab ( microlab...
How many of the patients with icd9 code 3761 have an unspecified death status?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "3761"
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 of the patients with icd9 code 3761 have an unspecified death status? ### Input: CREATE TABLE demographic ( sub...
For those records from the products and each product's manufacturer, what is the relationship between code and manufacturer , and group by attribute name?
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.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those records from the products and each product's manufacturer, what is the relationship between code and manufacturer ...
What place did the player that took won $350 finish in?
CREATE TABLE table_name_21 ( place VARCHAR, money___$__ VARCHAR )
SELECT place FROM table_name_21 WHERE money___$__ = 350
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 did the player that took won $350 finish in? ### Input: CREATE TABLE table_name_21 ( place VARCHAR, money...
Tell me the result of july 16, 2000
CREATE TABLE table_name_68 ( result VARCHAR, date VARCHAR )
SELECT result FROM table_name_68 WHERE date = "july 16, 2000"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the result of july 16, 2000 ### Input: CREATE TABLE table_name_68 ( result VARCHAR, date VARCHAR ) ### Respo...
Which Name has Games of 105?
CREATE TABLE table_name_53 ( name VARCHAR, games VARCHAR )
SELECT name FROM table_name_53 WHERE games = 105
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 Name has Games of 105? ### Input: CREATE TABLE table_name_53 ( name VARCHAR, games VARCHAR ) ### Response: SEL...
Top 300 users from Romania.
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%arad%romania%' ORDER BY Reputation DESC LIMIT 300
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 300 users from Romania. ### Input: CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description t...
Name the top-10 with top-5 less than 1
CREATE TABLE table_35859 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
SELECT "Top-10" FROM table_35859 WHERE "Top-5" < '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 top-10 with top-5 less than 1 ### Input: CREATE TABLE table_35859 ( "Tournament" text, "Wins" real, "To...
give me the number of patients whose admission location is emergency room admit and diagnoses icd9 code is 52809?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.icd9_code = "52809"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the number of patients whose admission location is emergency room admit and diagnoses icd9 code is 52809? ### Input:...
For all storms with at least 1 death, compare the number of deaths by name.
CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_cit...
SELECT Name, Number_Deaths FROM storm WHERE Number_Deaths >= 1
nvbench
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For all storms with at least 1 death, compare the number of deaths by name. ### Input: CREATE TABLE storm ( Storm_ID int...
Which motor's class was bs 1910?
CREATE TABLE table_41253 ( "Class" text, "Quantity" real, "Manufacturer" text, "Motor" text, "Seats" real )
SELECT "Motor" FROM table_41253 WHERE "Class" = 'bs 1910'
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 motor's class was bs 1910? ### Input: CREATE TABLE table_41253 ( "Class" text, "Quantity" real, "Manufactu...
provide the number of patients whose procedure icd9 code is 4610 and drug type is additive?
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4610" AND prescriptions.drug_type = "ADDITIVE"
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 procedure icd9 code is 4610 and drug type is additive? ### Input: CREATE TABLE diagnose...
What rank is Takat riki?
CREATE TABLE table_58735 ( "Name" text, "Total" real, "First" text, "Last" text, "Highest rank" text )
SELECT "Highest rank" FROM table_58735 WHERE "Name" = 'takatōriki'
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 rank is Takat riki? ### Input: CREATE TABLE table_58735 ( "Name" text, "Total" real, "First" text, "Las...
What percentage of users were using Safari during the period in which 30.82% were using Firefox?
CREATE TABLE table_name_96 ( safari VARCHAR, firefox VARCHAR )
SELECT safari FROM table_name_96 WHERE firefox = "30.82%"
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 percentage of users were using Safari during the period in which 30.82% were using Firefox? ### Input: CREATE TABLE tab...
Who is every driver for the location of Estoril Circuit?
CREATE TABLE table_25942 ( "SF Round" real, "Country" text, "Location" text, "Date" text, "Driver" text, "Race 1(pts)" real, "Race 2(pts)" real, "Race Total(pts)" real )
SELECT "Driver" FROM table_25942 WHERE "Location" = 'Estoril Circuit'
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 every driver for the location of Estoril Circuit? ### Input: CREATE TABLE table_25942 ( "SF Round" real, "Cou...
Create a bar chart showing all_games_percent across all neutral, sort by the y axis from high to low.
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent 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: Create a bar chart showing all_games_percent across all neutral, sort by the y axis from high to low. ### Input: CREATE TABL...
what are the three most frequently given diagnoses for patients who have been diagnosed with cellulitis - abdomen/pelvis before in the same month, since 2105?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cellulitis - abdomen/pelvis' AND STRFTIM...
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 are the three most frequently given diagnoses for patients who have been diagnosed with cellulitis - abdomen/pelvis bef...
What is the greatest number of caps for Bruce Djite?
CREATE TABLE table_71177 ( "Player" text, "Country" text, "Caps" real, "Goals" text, "Years Active" text, "Years at Club" text )
SELECT MAX("Caps") FROM table_71177 WHERE "Player" = 'bruce djite'
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 greatest number of caps for Bruce Djite? ### Input: CREATE TABLE table_71177 ( "Player" text, "Country" ...
how many patients whose admission type is emergency and ethnicity is american indian/alaska native?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission type is emergency and ethnicity is american indian/alaska native? ### Input: CREATE TABLE ...
Who was promoted to the league when Coventry was relegated to the league?
CREATE TABLE table_26411 ( "Season" text, "Name" text, "Teams" real, "Relegated to league" text, "Promoted to league" text, "Promoted from league" text, "Relegated from league" text )
SELECT "Promoted to league" FROM table_26411 WHERE "Relegated to league" = 'Coventry'
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 promoted to the league when Coventry was relegated to the league? ### Input: CREATE TABLE table_26411 ( "Season"...
Which NFL Club has a Player of sam tidmore, and a Pick of 81?
CREATE TABLE table_59758 ( "Player" text, "Draft" text, "Round" real, "Pick" real, "Position" text, "NFL Club" text )
SELECT "NFL Club" FROM table_59758 WHERE "Player" = 'sam tidmore' AND "Pick" = '81'
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 NFL Club has a Player of sam tidmore, and a Pick of 81? ### Input: CREATE TABLE table_59758 ( "Player" text, "...
when is the opponent lyoto machida?
CREATE TABLE table_43572 ( "Result" text, "TUF Competitor" text, "Opponent" text, "Method" text, "Event" text, "Date" text )
SELECT "Date" FROM table_43572 WHERE "Opponent" = 'lyoto machida'
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 is the opponent lyoto machida? ### Input: CREATE TABLE table_43572 ( "Result" text, "TUF Competitor" text, ...
Which music is jive?
CREATE TABLE table_38756 ( "Couple" text, "Score" text, "Style" text, "Music" text, "Result" text )
SELECT "Music" FROM table_38756 WHERE "Style" = 'jive'
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 music is jive? ### Input: CREATE TABLE table_38756 ( "Couple" text, "Score" text, "Style" text, "Music...
What is the frequency of the processor with an sSpec number of sl3bn(kc0)sl3e9(kc0)?
CREATE TABLE table_name_79 ( frequency VARCHAR, sspec_number VARCHAR )
SELECT frequency FROM table_name_79 WHERE sspec_number = "sl3bn(kc0)sl3e9(kc0)"
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 frequency of the processor with an sSpec number of sl3bn(kc0)sl3e9(kc0)? ### Input: CREATE TABLE table_name_79 (...
How many bill cosponsored during those years where bills originally cosponsored is 113?
CREATE TABLE table_22638 ( "Years covered" text, "All bills sponsored" real, "All amendments sponsored" real, "All bills cosponsored" real, "All amendments cosponsored" real, "Bills originally cosponsored" real, "Amendments originally cosponsored" real )
SELECT "All bills cosponsored" FROM table_22638 WHERE "Bills originally cosponsored" = '113'
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 bill cosponsored during those years where bills originally cosponsored is 113? ### Input: CREATE TABLE table_22638 ...
What is the number of countries in the artist table?, and I want to rank how many country in descending order.
CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int...
SELECT Country, COUNT(Country) FROM artist GROUP BY Country ORDER BY COUNT(Country) 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 is the number of countries in the artist table?, and I want to rank how many country in descending order. ### Input: CR...
What was the signed year for the Chinese name who separated in 1987?
CREATE TABLE table_name_82 ( year_signed VARCHAR, year_separated VARCHAR, chinese_name VARCHAR )
SELECT year_signed FROM table_name_82 WHERE year_separated = "1987" AND chinese_name = "蘇永康"
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 signed year for the Chinese name who separated in 1987? ### Input: CREATE TABLE table_name_82 ( year_signed...
Name the explanation for alben w. barkley
CREATE TABLE table_2026548_1 ( explanation VARCHAR, vice_president VARCHAR )
SELECT explanation FROM table_2026548_1 WHERE vice_president = "Alben W. Barkley"
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 explanation for alben w. barkley ### Input: CREATE TABLE table_2026548_1 ( explanation VARCHAR, vice_presid...
what component comes after bluetooth ?
CREATE TABLE table_204_451 ( id number, "component" text, "model 01" text, "model 01+" text, "model 02" text, "model e2" text, "model 2+ (pre-production)" text, "model 03 (china copy)" text )
SELECT "component" FROM table_204_451 WHERE id = (SELECT id FROM table_204_451 WHERE "component" = 'bluetooth') + 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: what component comes after bluetooth ? ### Input: CREATE TABLE table_204_451 ( id number, "component" text, "mod...
What is the lowest rank of Jens Kruppa in a lane larger than 2?
CREATE TABLE table_71392 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
SELECT MIN("Rank") FROM table_71392 WHERE "Name" = 'jens kruppa' AND "Lane" > '2'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the lowest rank of Jens Kruppa in a lane larger than 2? ### Input: CREATE TABLE table_71392 ( "Rank" real, "...
For the Republican party what are the names of the incumbents?
CREATE TABLE table_18516 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT "Incumbent" FROM table_18516 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: For the Republican party what are the names of the incumbents? ### Input: CREATE TABLE table_18516 ( "District" text, ...
when they visited the hospital last time, has patient 033-250 received any medication?
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospita...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-250' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.ho...
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 they visited the hospital last time, has patient 033-250 received any medication? ### Input: CREATE TABLE microlab ( ...
Are there any courses on UM Chemistry Program at Peking University , Beijing for 17 credits ?
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jo...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%UM Chemistry Program at Peking University , Beijing%' OR name LIKE '%UM Chemistry Program at Peking University , Beijing%') AND credits = 17
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: Are there any courses on UM Chemistry Program at Peking University , Beijing for 17 credits ? ### Input: CREATE TABLE requir...
For those records from the products and each product's manufacturer, find founder and the sum of price , and group by attribute founder, and visualize them by a bar chart, and order by the y-axis in descending.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) 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, find founder and the sum of price , and group by attrib...
What is the to par of player john buczek, who has a t9 place and is from the United States?
CREATE TABLE table_46821 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
SELECT "To par" FROM table_46821 WHERE "Place" = 't9' AND "Country" = 'united states' AND "Player" = 'john buczek'
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 to par of player john buczek, who has a t9 place and is from the United States? ### Input: CREATE TABLE table_46...
Name the ship with hull number of aor-6
CREATE TABLE table_37185 ( "Ship" text, "Hull No." text, "Builder" text, "Home Port" text, "Commissioned\u2013 Decommissioned" text, "NVR page" text )
SELECT "Ship" FROM table_37185 WHERE "Hull No." = 'aor-6'
wikisql
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the ship with hull number of aor-6 ### Input: CREATE TABLE table_37185 ( "Ship" text, "Hull No." text, "Bui...
how many patients whose admission type is newborn and admission location is transfer from hosp/extram?
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 WHERE demographic.admission_type = "NEWBORN" AND demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: how many patients whose admission type is newborn and admission location is transfer from hosp/extram? ### Input: CREATE TAB...
List the Human Physiology-Laboratory courses worth 3 credits .
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Human Physiology-Laboratory%' OR name LIKE '%Human Physiology-Laboratory%') AND credits = 3
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: List the Human Physiology-Laboratory courses worth 3 credits . ### Input: CREATE TABLE course_prerequisite ( pre_course_...
What is stanford's average overall?
CREATE TABLE table_76607 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT AVG("Overall") FROM table_76607 WHERE "College" = 'stanford'
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 stanford's average overall? ### Input: CREATE TABLE table_76607 ( "Round" real, "Pick" real, "Overall" r...
where did marie-laure taya win?
CREATE TABLE table_name_90 ( venue VARCHAR, winner VARCHAR )
SELECT venue FROM table_name_90 WHERE winner = "marie-laure taya"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: where did marie-laure taya win? ### Input: CREATE TABLE table_name_90 ( venue VARCHAR, winner VARCHAR ) ### Response...
What title did Bill Foster direct ?
CREATE TABLE table_25276528_2 ( title VARCHAR, directed_by VARCHAR )
SELECT title FROM table_25276528_2 WHERE directed_by = "Bill Foster"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What title did Bill Foster direct ? ### Input: CREATE TABLE table_25276528_2 ( title VARCHAR, directed_by VARCHAR ) ...
How many new entries this round have clubs 2 1?
CREATE TABLE table_75454 ( "Round" text, "Date" text, "Matches" real, "Clubs" text, "New entries this round" text, "Prize money" text )
SELECT "New entries this round" FROM table_75454 WHERE "Clubs" = '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: How many new entries this round have clubs 2 1? ### Input: CREATE TABLE table_75454 ( "Round" text, "Date" text, ...
what is the number of patients whose ethnicity is american indian/alaska native and drug type is additive?
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.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND prescriptions.drug_type = "ADDITIVE"
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 ethnicity is american indian/alaska native and drug type is additive? ### Input: CREATE...
what is the last model ?
CREATE TABLE table_204_582 ( id number, "model" text, "launch" text, "code name" text, "fab (nm)" number, "bus interface" text, "memory (mib)" text, "core clock (mhz)" number, "memory clock (mhz)" number, "config core1" text, "fillrate\nmoperations/s" number, "fillrate\nm...
SELECT "model" FROM table_204_582 ORDER BY id DESC 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: what is the last model ? ### Input: CREATE TABLE table_204_582 ( id number, "model" text, "launch" text, "co...
list the top four most frequent medications that patients have been prescribed in the same hospital encounter after being diagnosed with upper urinary tract infection since 2100.
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'upper urinary t...
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: list the top four most frequent medications that patients have been prescribed in the same hospital encounter after being di...
How many different last names do the actors and actresses have?
CREATE TABLE actor ( last_name VARCHAR )
SELECT COUNT(DISTINCT last_name) FROM actor
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 different last names do the actors and actresses have? ### Input: CREATE TABLE actor ( last_name VARCHAR ) ### ...
how many total pillow pals were both reintroduced and retired in 1999 ?
CREATE TABLE table_204_111 ( id number, "name" text, "animal type" text, "introduced" number, "reintroduced" text, "retired" number, "beanie baby resembled" text )
SELECT COUNT("name") FROM table_204_111 WHERE "reintroduced" = 1999 AND "retired" = 1999
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 total pillow pals were both reintroduced and retired in 1999 ? ### Input: CREATE TABLE table_204_111 ( id numbe...
what LIMOUSINE service in TORONTO
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, m...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'TORONTO' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'LIMOUSINE'
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 LIMOUSINE service in TORONTO ### Input: CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int...
What is the year 2001 with a total larger than 1, and 2009 with 8?
CREATE TABLE table_68544 ( "2001" text, "2004" text, "2009" text, "2013" text, "Total" real )
SELECT "2001" FROM table_68544 WHERE "Total" > '1' AND "2009" = '8'
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 2001 with a total larger than 1, and 2009 with 8? ### Input: CREATE TABLE table_68544 ( "2001" text, ...
How much reputation would we get in commie SO?.
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREA...
SELECT SUM(Reputation) / COUNT(*) AS Average_rep FROM Users WHERE Reputation > 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: How much reputation would we get in commie SO?. ### Input: CREATE TABLE ReviewTaskResultTypes ( Id number, Name text...
Which country has a finish of t22?
CREATE TABLE table_name_87 ( country VARCHAR, finish VARCHAR )
SELECT country FROM table_name_87 WHERE finish = "t22"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which country has a finish of t22? ### Input: CREATE TABLE table_name_87 ( country VARCHAR, finish VARCHAR ) ### Res...
How many times is the couple laura and colin?
CREATE TABLE table_29583818_3 ( place VARCHAR, couple VARCHAR )
SELECT COUNT(place) FROM table_29583818_3 WHERE couple = "Laura and Colin"
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 times is the couple laura and colin? ### Input: CREATE TABLE table_29583818_3 ( place VARCHAR, couple VARCH...
What's the smallest draw of Warrnambool when the against was less than 1299, more than 7 wins, and less than 2 losses?
CREATE TABLE table_name_29 ( draws INTEGER, losses VARCHAR, club VARCHAR, against VARCHAR, wins VARCHAR )
SELECT MIN(draws) FROM table_name_29 WHERE against < 1299 AND wins > 7 AND club = "warrnambool" AND losses < 2
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What's the smallest draw of Warrnambool when the against was less than 1299, more than 7 wins, and less than 2 losses? ### I...
what is date of birth and admission time of subject name fernando wontor?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.dob, demographic.admittime FROM demographic WHERE demographic.name = "Fernando Wontor"
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 date of birth and admission time of subject name fernando wontor? ### Input: CREATE TABLE demographic ( subject_...
What are the most bronze medals in a rank more than 1 with a total larger than 3?
CREATE TABLE table_79722 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MAX("Bronze") FROM table_79722 WHERE "Total" > '3' AND "Rank" > '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 are the most bronze medals in a rank more than 1 with a total larger than 3? ### Input: CREATE TABLE table_79722 ( ...
What was the method for the resolution of nc where the fight lasted less than 3 rounds?
CREATE TABLE table_52239 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT "Method" FROM table_52239 WHERE "Round" < '3' AND "Res." = 'nc'
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 method for the resolution of nc where the fight lasted less than 3 rounds? ### Input: CREATE TABLE table_52239 ...
What is the score on december 10?
CREATE TABLE table_name_98 ( score VARCHAR, date VARCHAR )
SELECT score FROM table_name_98 WHERE date = "december 10"
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 score on december 10? ### Input: CREATE TABLE table_name_98 ( score VARCHAR, date VARCHAR ) ### Response...
Which party experienced a result of lost re-election democratic-republican hold?
CREATE TABLE table_28914 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text )
SELECT "Party" FROM table_28914 WHERE "Result" = 'Lost re-election Democratic-Republican hold'
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 party experienced a result of lost re-election democratic-republican hold? ### Input: CREATE TABLE table_28914 ( "...
Which player went to Wake Forest and was selected with a pick after 145?
CREATE TABLE table_44157 ( "Round" real, "Pick" real, "Player" text, "Nationality" text, "College" text )
SELECT "Player" FROM table_44157 WHERE "Pick" > '145' AND "College" = 'wake forest'
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 player went to Wake Forest and was selected with a pick after 145? ### Input: CREATE TABLE table_44157 ( "Round" r...
How many of the patients with colangitis as their primary disease died in or before the year 2186?
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COLANGITIS" AND demographic.dod_year <= "2186.0"
mimicsql_data
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many of the patients with colangitis as their primary disease died in or before the year 2186? ### Input: CREATE TABLE p...
Who are the candidates in Washington 1 district?
CREATE TABLE table_16185956_1 ( district VARCHAR )
SELECT 2008 AS _candidates FROM table_16185956_1 WHERE district = "Washington 1"
sql_create_context
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who are the candidates in Washington 1 district? ### Input: CREATE TABLE table_16185956_1 ( district VARCHAR ) ### Respo...
Name the name of the state
CREATE TABLE table_15463188_7 ( name VARCHAR, school_club_team VARCHAR )
SELECT name FROM table_15463188_7 WHERE school_club_team = "State"
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 name of the state ### Input: CREATE TABLE table_15463188_7 ( name VARCHAR, school_club_team VARCHAR ) ### R...