instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
did patient 006-62367 ever underwent any therapeutic antibacterials - vancomycin procedure in 2105? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-62367')) AND treatment.treatmentname = 'therapeutic antibacterials - van... | 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: did patient 006-62367 ever underwent any therapeutic antibacterials - vancomycin procedure in 2105? ### Input: CREATE TABLE ... |
When the score is 71 and the player is from United States what is the place? | CREATE TABLE table_name_89 (
place VARCHAR,
score VARCHAR,
country VARCHAR
) | SELECT place FROM table_name_89 WHERE score = 71 AND country = "united states" | 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 score is 71 and the player is from United States what is the place? ### Input: CREATE TABLE table_name_89 (
pla... |
What score has notts county as the home team? | CREATE TABLE table_7254 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Score" FROM table_7254 WHERE "Home team" = 'notts county' | 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 score has notts county as the home team? ### Input: CREATE TABLE table_7254 (
"Tie no" text,
"Home team" text,
... |
What are the names of artists who are Male and are from UK? | CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating number,
languages text,
releasedate time,
resolution number
)
... | SELECT artist_name FROM artist WHERE country = "UK" AND gender = "Male" | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the names of artists who are Male and are from UK? ### Input: CREATE TABLE files (
f_id number,
artist_name... |
What is the 2006 when the 2013 is 1r, and the 2012 is 1r? | CREATE TABLE table_75955 (
"Tournament" text,
"2006" text,
"2009" text,
"2012" text,
"2013" text
) | SELECT "2006" FROM table_75955 WHERE "2013" = '1r' AND "2012" = '1r' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the 2006 when the 2013 is 1r, and the 2012 is 1r? ### Input: CREATE TABLE table_75955 (
"Tournament" text,
"... |
what was the drug patient 22648 had been prescribed two or more times in this month? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22648) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 ... | 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 drug patient 22648 had been prescribed two or more times in this month? ### Input: CREATE TABLE admissions (
... |
nelsano albano served in the same year as which washington twp . member ? | CREATE TABLE table_204_699 (
id number,
"district" text,
"name" text,
"party" text,
"residence" text,
"first served" number
) | SELECT "name" FROM table_204_699 WHERE "name" <> 'nelson albano' AND "first served" = (SELECT "first served" FROM table_204_699 WHERE "name" = 'nelson albano') AND "residence" = 'washington twp' | 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: nelsano albano served in the same year as which washington twp . member ? ### Input: CREATE TABLE table_204_699 (
id num... |
Which Score has a Place of t2? | CREATE TABLE table_name_95 (
score VARCHAR,
place VARCHAR
) | SELECT score FROM table_name_95 WHERE place = "t2" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Score has a Place of t2? ### Input: CREATE TABLE table_name_95 (
score VARCHAR,
place VARCHAR
) ### Response: ... |
what time was the last time patient 006-2586 had the maximum respiration value today? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-2586')) AND NOT vitalperiodic.respiration IS NU... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what time was the last time patient 006-2586 had the maximum respiration value today? ### Input: CREATE TABLE treatment (
... |
Buscando posts sobre windows phone de 2018 at hoje. | CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT Id, LastActivityDate, CreationDate, Score, ViewCount, Body, OwnerUserId, Title, Tags, AnswerCount FROM Posts WHERE Tags LIKE '%<windows-phone%' AND PostTypeId = 1 AND CreationDate >= '01/01/2018' ORDER BY LastActivityDate DESC | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Buscando posts sobre windows phone de 2018 at hoje. ### Input: CREATE TABLE Posts (
Id number,
PostTypeId number,
... |
For those employees who did not have any job in the past, visualize the relationship between salary and commission_pct . | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID ... | SELECT SALARY, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees who did not have any job in the past, visualize the relationship between salary and commission_pct . ###... |
What type of object has an NGC number higher than 2090 and has a right ascension (J2000) of 05h52m19s? | CREATE TABLE table_53963 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text
) | SELECT "Object type" FROM table_53963 WHERE "NGC number" > '2090' AND "Right ascension ( J2000 )" = '05h52m19s' | 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 type of object has an NGC number higher than 2090 and has a right ascension (J2000) of 05h52m19s? ### Input: CREATE TAB... |
In which year did he finish 8th? | CREATE TABLE table_14378 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Distance" text
) | SELECT "Year" FROM table_14378 WHERE "Result" = '8th' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In which year did he finish 8th? ### Input: CREATE TABLE table_14378 (
"Year" real,
"Tournament" text,
"Venue" t... |
In what Year was Rhode Island the National Champion? | CREATE TABLE table_name_77 (
year VARCHAR,
national_champion VARCHAR
) | SELECT year FROM table_name_77 WHERE national_champion = "rhode island" | 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 was Rhode Island the National Champion? ### Input: CREATE TABLE table_name_77 (
year VARCHAR,
national_... |
give me US flights for next wednesday from CLEVELAND to MIAMI | CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_s... | 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 = 'MIAMI' AND date_day.day_number = 23 AND date_day.month_number = 4 AND da... | 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: give me US flights for next wednesday from CLEVELAND to MIAMI ### Input: CREATE TABLE airline (
airline_code varchar,
... |
What's the number of the game played on June 22? | CREATE TABLE table_19778010_5 (
game INTEGER,
date VARCHAR
) | SELECT MAX(game) FROM table_19778010_5 WHERE date = "June 22" | 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 number of the game played on June 22? ### Input: CREATE TABLE table_19778010_5 (
game INTEGER,
date VARCH... |
How many total points did roman Koudelka have | CREATE TABLE table_19338 (
"Rank" real,
"Name" text,
"Nationality" text,
"1st (m)" text,
"2nd (m)" text,
"Points" text,
"Overall FHT points" text,
"Overall WC points (Rank)" text
) | SELECT "Overall WC points (Rank)" FROM table_19338 WHERE "Name" = 'Roman Koudelka' | 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 total points did roman Koudelka have ### Input: CREATE TABLE table_19338 (
"Rank" real,
"Name" text,
"N... |
What is Tries Against, when Tries For is 20? | CREATE TABLE table_name_22 (
tries_against VARCHAR,
tries_for VARCHAR
) | SELECT tries_against FROM table_name_22 WHERE tries_for = "20" | 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 Tries Against, when Tries For is 20? ### Input: CREATE TABLE table_name_22 (
tries_against VARCHAR,
tries_fo... |
when is the last time patient 015-52724 has had a heartrate measurement since 2 days ago? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-52724')) AND NOT vitalperiodic.heartrate IS NUL... | 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 is the last time patient 015-52724 has had a heartrate measurement since 2 days ago? ### Input: CREATE TABLE intakeoutp... |
is there a meal on DL flight 852 from SAN FRANCISCO to DALLAS FORT WORTH | 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 food_service.compartment, food_service.meal_code, food_service.meal_number FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, food_service WHERE (((CITY_1.city_code = AIRPORT_SERVI... | 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: is there a meal on DL flight 852 from SAN FRANCISCO to DALLAS FORT WORTH ### Input: CREATE TABLE aircraft (
aircraft_cod... |
What were the LOA metres for the yacht ichi ban? | CREATE TABLE table_3313 (
"Position" real,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Corrected time d:hh:mm:ss" text
) | SELECT "LOA (Metres)" FROM table_3313 WHERE "Yacht" = 'Ichi Ban' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What were the LOA metres for the yacht ichi ban? ### Input: CREATE TABLE table_3313 (
"Position" real,
"Sail number"... |
Which tournament resulted in 6th place? | CREATE TABLE table_58606 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
) | SELECT "Tournament" FROM table_58606 WHERE "Result" = '6th' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which tournament resulted in 6th place? ### Input: CREATE TABLE table_58606 (
"Year" real,
"Tournament" text,
"V... |
Give me a group line chart showing the number of documents in different ending date The x-axis is ending date and group by location code, rank by the x axis from low to high please. | CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
... | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code, Date_in_Locaton_To ORDER BY Date_in_Locaton_To | 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 group line chart showing the number of documents in different ending date The x-axis is ending date and group by l... |
How tall is the structure built in 1907? | CREATE TABLE table_59946 (
"Rank" text,
"Name" text,
"Height ft (m)" text,
"Floors" real,
"Year" real
) | SELECT "Height ft (m)" FROM table_59946 WHERE "Year" = '1907' | 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 tall is the structure built in 1907? ### Input: CREATE TABLE table_59946 (
"Rank" text,
"Name" text,
"Height... |
What is the issued serial given in 1966? | CREATE TABLE table_49496 (
"Issued" real,
"Type" text,
"Design" text,
"Serial format" text,
"Serials issued" text
) | SELECT "Serials issued" FROM table_49496 WHERE "Issued" = '1966' | 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 issued serial given in 1966? ### Input: CREATE TABLE table_49496 (
"Issued" real,
"Type" text,
"Desi... |
Find the name and account balance of the customer whose name includes the letter a Visualize them using a bar chart, show y-axis in descending order. | CREATE TABLE bank (
branch_ID int,
bname varchar(20),
no_of_customers int,
city varchar(10),
state varchar(20)
)
CREATE TABLE customer (
cust_ID varchar(3),
cust_name varchar(20),
acc_type char(1),
acc_bal int,
no_of_loans int,
credit_score int,
branch_ID int,
state ... | SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' ORDER BY acc_bal 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: Find the name and account balance of the customer whose name includes the letter a Visualize them using a bar chart, show y-... |
what is the object type when the right ascension (j2000) is 11h10m42.8s? | CREATE TABLE table_name_77 (
object_type VARCHAR,
right_ascension___j2000__ VARCHAR
) | SELECT object_type FROM table_name_77 WHERE right_ascension___j2000__ = "11h10m42.8s" | 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 object type when the right ascension (j2000) is 11h10m42.8s? ### Input: CREATE TABLE table_name_77 (
object_... |
What loss has 26-9 as a loss? | CREATE TABLE table_name_96 (
loss VARCHAR,
record VARCHAR
) | SELECT loss FROM table_name_96 WHERE record = "26-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 loss has 26-9 as a loss? ### Input: CREATE TABLE table_name_96 (
loss VARCHAR,
record VARCHAR
) ### Response: S... |
which team was the first team to score six goals ? | CREATE TABLE table_203_620 (
id number,
"tie no" number,
"home team" text,
"score" text,
"away team" text,
"attendance" number
) | SELECT "home team" FROM table_203_620 WHERE "score" = 6 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: which team was the first team to score six goals ? ### Input: CREATE TABLE table_203_620 (
id number,
"tie no" numbe... |
what stadium has a prior record of 7th? | CREATE TABLE table_68203 (
"Team" text,
"City" text,
"Stadium" text,
"Manager" text,
"Past season" text
) | SELECT "Stadium" FROM table_68203 WHERE "Past season" = '7th' | 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 stadium has a prior record of 7th? ### Input: CREATE TABLE table_68203 (
"Team" text,
"City" text,
"Stadium... |
When the elevator was Innocent IV what was the nationality? | CREATE TABLE table_47749 (
"Elector" text,
"Nationality" text,
"Order and title" text,
"Elevated" text,
"Elevator" text
) | SELECT "Nationality" FROM table_47749 WHERE "Elevator" = 'innocent iv' | 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 elevator was Innocent IV what was the nationality? ### Input: CREATE TABLE table_47749 (
"Elector" text,
"N... |
Find all the catalog publishers whose name contains 'Murray | CREATE TABLE attribute_definitions (
attribute_id number,
attribute_name text,
attribute_data_type text
)
CREATE TABLE catalog_contents (
catalog_entry_id number,
catalog_level_number number,
parent_entry_id number,
previous_entry_id number,
next_entry_id number,
catalog_entry_name ... | SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%" | 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: Find all the catalog publishers whose name contains 'Murray ### Input: CREATE TABLE attribute_definitions (
attribute_id... |
Tell me the tournament with a hard surface for 6 1, 6 2 | CREATE TABLE table_31945 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | SELECT "Tournament" FROM table_31945 WHERE "Surface" = 'hard' AND "Score" = '6–1, 6–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: Tell me the tournament with a hard surface for 6 1, 6 2 ### Input: CREATE TABLE table_31945 (
"Outcome" text,
"Date"... |
What's the date when Yelena Isinbayeva for Russia was in Beijing, China? | CREATE TABLE table_66262 (
"Event" text,
"Performance" text,
"Athlete" text,
"Nation" text,
"Place" text,
"Date" text
) | SELECT "Date" FROM table_66262 WHERE "Nation" = 'russia' AND "Place" = 'beijing, china' AND "Athlete" = 'yelena isinbayeva' | 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 date when Yelena Isinbayeva for Russia was in Beijing, China? ### Input: CREATE TABLE table_66262 (
"Event" t... |
How many earnings values are associated with players who had a best finish of T38? | CREATE TABLE table_28540609_2 (
earnings__ VARCHAR,
best_finish VARCHAR
) | SELECT COUNT(earnings__) AS €_ FROM table_28540609_2 WHERE best_finish = "T38" | 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 earnings values are associated with players who had a best finish of T38? ### Input: CREATE TABLE table_28540609_2 ... |
What is the total where there are 4 MLS Cups and more US Open Cups than 1? | CREATE TABLE table_58991 (
"Name" text,
"Years" text,
"MLS Cup" real,
"U.S. Open Cup" real,
"CONCACAF" real,
"Other" real,
"Total" real
) | SELECT COUNT("Total") FROM table_58991 WHERE "MLS Cup" = '4' AND "U.S. Open Cup" > '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 total where there are 4 MLS Cups and more US Open Cups than 1? ### Input: CREATE TABLE table_58991 (
"Name" ... |
High Rep users with the peer pressure badge. A way to find which users (mostly high rep) have the peer pressure badge. Was just playing around with T-SQL and cooked this. =D | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGu... | SELECT Id AS "user_link", DisplayName, Reputation FROM Users WHERE Reputation > @RepLimit AND NOT EXISTS(SELECT Id FROM Badges AS b WHERE b.UserId = Users.Id AND b.Name = 'Peer Pressure') ORDER BY Reputation DESC | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: High Rep users with the peer pressure badge. A way to find which users (mostly high rep) have the peer pressure badge. Was j... |
how many patients with drug code glyb5 died in or before 2115? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2115.0" AND prescriptions.formulary_drug_cd = "GLYB5" | 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 with drug code glyb5 died in or before 2115? ### Input: CREATE TABLE procedures (
subject_id text,
... |
Which junior team is associated with an NHL pick by the Buffalo Sabres? | CREATE TABLE table_4036 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "College/junior/club team" FROM table_4036 WHERE "NHL team" = 'Buffalo Sabres' | 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 junior team is associated with an NHL pick by the Buffalo Sabres? ### Input: CREATE TABLE table_4036 (
"Pick #" re... |
What is the average Jianshu higher than rank 2, with a Qiangshu smaller than 9.85? | CREATE TABLE table_name_29 (
jianshu INTEGER,
rank VARCHAR,
qiangshu VARCHAR
) | SELECT AVG(jianshu) FROM table_name_29 WHERE rank < 2 AND qiangshu < 9.85 | 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 Jianshu higher than rank 2, with a Qiangshu smaller than 9.85? ### Input: CREATE TABLE table_name_29 (
... |
what is the date for the first game played in the meadowlands ? | CREATE TABLE table_204_443 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"game site" text,
"attendance" number,
"bye" text
) | SELECT "date" FROM table_204_443 WHERE "game site" = 'the meadowlands' ORDER BY "date" 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 date for the first game played in the meadowlands ? ### Input: CREATE TABLE table_204_443 (
id number,
"... |
provide the number of patients whose admission location is phys referral/normal deli and diagnoses short title is 29-30 comp wks gestation? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.short_title = "29-30 comp wks gestation" | 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 admission location is phys referral/normal deli and diagnoses short title is 29-30 comp... |
Tell me the average top 25 with events of 5 and cuts madde less than 3 | CREATE TABLE table_name_33 (
top_25 INTEGER,
events VARCHAR,
cuts_made VARCHAR
) | SELECT AVG(top_25) FROM table_name_33 WHERE events = 5 AND cuts_made < 3 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Tell me the average top 25 with events of 5 and cuts madde less than 3 ### Input: CREATE TABLE table_name_33 (
top_25 IN... |
Find all cities which has a ' Taj Mahal ' . | CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE business (
bid int,
business_id varchar,
name varchar,
full_address varchar,
city varchar,
latitude varchar,
longitude varchar,
review_count bigint,
is_open tinyint,
rat... | SELECT city FROM business WHERE name = 'Taj Mahal' | yelp | Below are sql tables 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 all cities which has a ' Taj Mahal ' . ### Input: CREATE TABLE neighborhood (
id int,
business_id varchar,
... |
If the points is 15, what is the fin. pos? | CREATE TABLE table_17330069_1 (
fin_pos VARCHAR,
points VARCHAR
) | SELECT COUNT(fin_pos) FROM table_17330069_1 WHERE points = "15" | 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: If the points is 15, what is the fin. pos? ### Input: CREATE TABLE table_17330069_1 (
fin_pos VARCHAR,
points VARCHA... |
What is the percent yes of Alberta, which had a percent no larger than 60.2? | CREATE TABLE table_name_68 (
percent_yes VARCHAR,
jurisdiction VARCHAR,
percent_no VARCHAR
) | SELECT COUNT(percent_yes) FROM table_name_68 WHERE jurisdiction = "alberta" AND percent_no > 60.2 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the percent yes of Alberta, which had a percent no larger than 60.2? ### Input: CREATE TABLE table_name_68 (
per... |
Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes? | CREATE TABLE table_37099 (
"Title" text,
"Date" text,
"Theatre" text,
"Role" text,
"Dance Partner" text,
"Director" text,
"Lyrics" text,
"Music" text
) | SELECT "Title" FROM table_37099 WHERE "Dance Partner" = 'adele astaire' AND "Lyrics" = 'ira gershwin' AND "Director" = 'felix edwardes' | 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 Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes? ### Input: C... |
How many joined when the enrollment was 1150 in Sioux City, Iowa? | CREATE TABLE table_28499 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real,
"Nickname" text
) | SELECT "Joined" FROM table_28499 WHERE "Enrollment" = '1150' AND "Location" = 'Sioux City, Iowa' | 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 joined when the enrollment was 1150 in Sioux City, Iowa? ### Input: CREATE TABLE table_28499 (
"Institution" te... |
What year did the San Agustin gym open? | CREATE TABLE table_name_44 (
year_opened VARCHAR,
arena_venue VARCHAR
) | SELECT year_opened FROM table_name_44 WHERE arena_venue = "san agustin gym" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year did the San Agustin gym open? ### Input: CREATE TABLE table_name_44 (
year_opened VARCHAR,
arena_venue VAR... |
What episode in the season was episode us18 in the series? | CREATE TABLE table_23398 (
"No. in series" text,
"No. in season" real,
"Family/families" text,
"Location(s)" text,
"Original air date" text
) | SELECT COUNT("No. in season") FROM table_23398 WHERE "No. in series" = 'US18' | 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 episode in the season was episode us18 in the series? ### Input: CREATE TABLE table_23398 (
"No. in series" text,
... |
What is the total number of enrollment of schools that do not have any goalie player? | CREATE TABLE tryout (
enr INTEGER,
cName VARCHAR,
pPos VARCHAR
)
CREATE TABLE college (
enr INTEGER,
cName VARCHAR,
pPos VARCHAR
) | SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = "goalie") | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the total number of enrollment of schools that do not have any goalie player? ### Input: CREATE TABLE tryout (
e... |
what is the maximum monthly number of patients who have had chro kidney dis stage ii since 2102? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id... | SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chro kidney dis stage ii') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2102' GROUP BY STRFTIME('%y... | 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 maximum monthly number of patients who have had chro kidney dis stage ii since 2102? ### Input: CREATE TABLE pro... |
How many seasons are there for the 3rd position? | CREATE TABLE table_4195 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
) | SELECT COUNT("Season") FROM table_4195 WHERE "Position" = '3rd' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many seasons are there for the 3rd position? ### Input: CREATE TABLE table_4195 (
"Season" real,
"Series" text,
... |
When the clippers are the team how many games are there? | CREATE TABLE table_23285849_10 (
game VARCHAR,
team VARCHAR
) | SELECT COUNT(game) FROM table_23285849_10 WHERE team = "Clippers" | 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 clippers are the team how many games are there? ### Input: CREATE TABLE table_23285849_10 (
game VARCHAR,
t... |
what are the number of times re elected is listed as the result ? | CREATE TABLE table_204_109 (
id number,
"district" text,
"incumbent" text,
"party" text,
"first\nelected" text,
"result" text,
"candidates" text
) | SELECT COUNT(*) FROM table_204_109 WHERE "result" = 're-elected' | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the number of times re elected is listed as the result ? ### Input: CREATE TABLE table_204_109 (
id number,
... |
What are the names and seatings for all tracks opened after 2000, ordered by seating? | CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
)
CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
) | SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the names and seatings for all tracks opened after 2000, ordered by seating? ### Input: CREATE TABLE track (
tr... |
papers from 2014 | CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperkeyphrase (
paperid int,
... | SELECT DISTINCT paperid FROM paper WHERE year = 2014 | scholar | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: papers from 2014 ### Input: CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE keyphrase (
... |
Which team was the visitor on January 10? | CREATE TABLE table_name_69 (
visitor VARCHAR,
date VARCHAR
) | SELECT visitor FROM table_name_69 WHERE date = "january 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: Which team was the visitor on January 10? ### Input: CREATE TABLE table_name_69 (
visitor VARCHAR,
date VARCHAR
) ##... |
state all spokesperson for the channel where dual commentator was elena batinova | CREATE TABLE table_2192 (
"Year(s)" real,
"Commentator" text,
"Dual Commentator" text,
"Spokesperson" text,
"Channel" text
) | SELECT "Spokesperson" FROM table_2192 WHERE "Dual Commentator" = 'Elena Batinova' | 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: state all spokesperson for the channel where dual commentator was elena batinova ### Input: CREATE TABLE table_2192 (
"Y... |
list the number of patients who were admitted before the year 2107. | 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.admityear < "2107" | 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: list the number of patients who were admitted before the year 2107. ### Input: CREATE TABLE procedures (
subject_id text... |
What is the remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15? | CREATE TABLE table_43083 (
"Usage" text,
"Sn/Sb (%)" text,
"Liquid at (\u00b0C)" text,
"Casting at (\u00b0C)" text,
"Remelting at (\u00b0C)" text,
"Hardness" text
) | SELECT "Remelting at (\u00b0C)" FROM table_43083 WHERE "Sn/Sb (%)" = '9.5/15' | 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 remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15? ### Input: CREATE TABLE table_43083 (
... |
Name the total number for report july 23 | CREATE TABLE table_2697 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
) | SELECT COUNT("Report") FROM table_2697 WHERE "Date" = 'July 23' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the total number for report july 23 ### Input: CREATE TABLE table_2697 (
"Year" real,
"Date" text,
"Driver"... |
Did Flamengo play in the Recopa Sudamericana in 1998 | CREATE TABLE table_14962316_9 (
recopa_sudamericana_1998 VARCHAR,
team VARCHAR
) | SELECT recopa_sudamericana_1998 FROM table_14962316_9 WHERE team = "Flamengo" | 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: Did Flamengo play in the Recopa Sudamericana in 1998 ### Input: CREATE TABLE table_14962316_9 (
recopa_sudamericana_1998... |
Which line offers Fast to Norwood Junction? | CREATE TABLE table_1612760_1 (
line VARCHAR,
service_pattern VARCHAR
) | SELECT line FROM table_1612760_1 WHERE service_pattern = "Fast to Norwood Junction" | 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 line offers Fast to Norwood Junction? ### Input: CREATE TABLE table_1612760_1 (
line VARCHAR,
service_pattern ... |
did patient 016-9636 have calcium gluconate 10% prescribed since 12/2105? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... | 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 = '016-9636')) AND medication.drugname = 'calcium gluconate 10%' AND STRFTIME... | 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: did patient 016-9636 have calcium gluconate 10% prescribed since 12/2105? ### Input: CREATE TABLE microlab (
microlabid ... |
Which city lives most of staffs? List the city name and number of staffs. | CREATE TABLE Addresses (
city VARCHAR,
address_id VARCHAR
)
CREATE TABLE Staff (
staff_address_id VARCHAR
) | SELECT T1.city, COUNT(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which city lives most of staffs? List the city name and number of staffs. ### Input: CREATE TABLE Addresses (
city VARCH... |
Which season did he have 0 points and 31st position? | CREATE TABLE table_21429 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"FLaps" real,
"Podiums" real,
"Points" real,
"Position" text
) | SELECT MAX("Season") FROM table_21429 WHERE "Points" = '0' AND "Position" = '31st' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which season did he have 0 points and 31st position? ### Input: CREATE TABLE table_21429 (
"Season" real,
"Series" t... |
what date is after october 1st ? | CREATE TABLE table_204_55 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
) | SELECT "date" FROM table_204_55 WHERE "date" > (SELECT "date" FROM table_204_55 WHERE "date" = 'october 1, 2005') ORDER BY "date" 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 date is after october 1st ? ### Input: CREATE TABLE table_204_55 (
id number,
"date" text,
"time" text,
... |
What's the average Year for the Position of 7th (sf)? | CREATE TABLE table_name_47 (
year INTEGER,
position VARCHAR
) | SELECT AVG(year) FROM table_name_47 WHERE position = "7th (sf)" | 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 average Year for the Position of 7th (sf)? ### Input: CREATE TABLE table_name_47 (
year INTEGER,
position... |
What is the lowest Against when the played is more than 10? | CREATE TABLE table_name_4 (
against INTEGER,
played INTEGER
) | SELECT MIN(against) FROM table_name_4 WHERE played > 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 lowest Against when the played is more than 10? ### Input: CREATE TABLE table_name_4 (
against INTEGER,
... |
What is the number of films of each director? Return a bar chart, and could you display by the how many directed by in asc? | CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by ORDER BY COUNT(Directed_by) | 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 films of each director? Return a bar chart, and could you display by the how many directed by in asc? ... |
what is patient 027-144847's gender? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '027-144847' | 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 patient 027-144847's gender? ### Input: CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid num... |
what's the total number of tasmania with new south wales crop of 190 kilotonnes | CREATE TABLE table_1057262_2 (
tasmania VARCHAR,
new_south_wales VARCHAR
) | SELECT COUNT(tasmania) FROM table_1057262_2 WHERE new_south_wales = 190 | 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 total number of tasmania with new south wales crop of 190 kilotonnes ### Input: CREATE TABLE table_1057262_2 (
... |
What is the least amount of wickets? | CREATE TABLE table_27922491_8 (
wickets INTEGER
) | SELECT MIN(wickets) FROM table_27922491_8 | 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 least amount of wickets? ### Input: CREATE TABLE table_27922491_8 (
wickets INTEGER
) ### Response: SELECT M... |
who were the top 3 finishers in the 2005 belgian grand prix ? | CREATE TABLE table_202_179 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | SELECT "driver" FROM table_202_179 ORDER BY "points" DESC LIMIT 3 | squall | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who were the top 3 finishers in the 2005 belgian grand prix ? ### Input: CREATE TABLE table_202_179 (
id number,
"po... |
what is drug type of drug name nafcillin? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Nafcillin" | 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 drug type of drug name nafcillin? ### Input: CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
... |
how many patients with infected right thigh graft were of american indian/alaska native ethnicty? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.diagnosis = "INFECTED RIGHT THIGH GRAFT" | 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 with infected right thigh graft were of american indian/alaska native ethnicty? ### Input: CREATE TABLE de... |
Show the number of documents in different ending date Bin ending date by weekday and group by location code with a stacked bar chart, could you display in descending by the y axis please? | CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
D... | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Locaton_To) 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 documents in different ending date Bin ending date by weekday and group by location code with a stacked b... |
Which Position has a Round larger than 4, and a Player of patrick johnson? | CREATE TABLE table_name_45 (
position VARCHAR,
round VARCHAR,
player VARCHAR
) | SELECT position FROM table_name_45 WHERE round > 4 AND player = "patrick johnson" | 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 Position has a Round larger than 4, and a Player of patrick johnson? ### Input: CREATE TABLE table_name_45 (
posit... |
when was the last time that patient 31482 had a minimum calcium, total on their current hospital encounter? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31482 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calcium, total') ORDER BY labevents.valuenum, ... | mimic_iii | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the last time that patient 31482 had a minimum calcium, total on their current hospital encounter? ### Input: CREAT... |
Who was the fight against when loss was the result at the Gladiator Challenge 87: Collision Course event? | CREATE TABLE table_66332 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Opponent" FROM table_66332 WHERE "Res." = 'loss' AND "Event" = 'gladiator challenge 87: collision course' | 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 fight against when loss was the result at the Gladiator Challenge 87: Collision Course event? ### Input: CREATE ... |
when was the last time patient 010-1155 had a drug intake of volume (ml) magnesium sulfate since 01/16/2105? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-1155')) AND intakeoutput.cellpath LIKE '%intake%'... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the last time patient 010-1155 had a drug intake of volume (ml) magnesium sulfate since 01/16/2105? ### Input: CREA... |
What is the primary disease and drug route of Albers Bauer? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT demographic.diagnosis, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Albert Bauer" | 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 primary disease and drug route of Albers Bauer? ### Input: CREATE TABLE prescriptions (
subject_id text,
... |
did patient 006-171217 suffer from any type of allergy in the previous year? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time... | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-171217')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIME(CURR... | 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: did patient 006-171217 suffer from any type of allergy in the previous year? ### Input: CREATE TABLE cost (
costid numbe... |
Which venue had an against smaller than 7? | CREATE TABLE table_12963 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | SELECT "Venue" FROM table_12963 WHERE "Against" < '7' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which venue had an against smaller than 7? ### Input: CREATE TABLE table_12963 (
"Opposing Teams" text,
"Against" re... |
What was the to par of the tournament that had Ken Duke as a runner-up? | CREATE TABLE table_77498 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner-up" text
) | SELECT "To par" FROM table_77498 WHERE "Runner-up" = 'ken duke' | 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 to par of the tournament that had Ken Duke as a runner-up? ### Input: CREATE TABLE table_77498 (
"Date" tex... |
Who is in November after 1988 when Prinzzess is in October? | CREATE TABLE table_name_52 (
november VARCHAR,
year VARCHAR,
october VARCHAR
) | SELECT november FROM table_name_52 WHERE year > 1988 AND october = "prinzzess" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who is in November after 1988 when Prinzzess is in October? ### Input: CREATE TABLE table_name_52 (
november VARCHAR,
... |
What time do NATIVEAM 311 lectures start next semester ? | CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE gsi (
c... | SELECT DISTINCT course_offering.start_time FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'NATIVEAM' AND cours... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What time do NATIVEAM 311 lectures start next semester ? ### Input: CREATE TABLE program (
program_id int,
name varc... |
COMP 416 requires me to take what classes before I can take it ? | CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABL... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... | 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: COMP 416 requires me to take what classes before I can take it ? ### Input: CREATE TABLE requirement (
requirement_id in... |
what is the name of the first race in the year ? | CREATE TABLE table_204_48 (
id number,
"date" text,
"race name" text,
"location" text,
"uci rating" text,
"winner" text,
"team" text
) | SELECT "race name" FROM table_204_48 ORDER BY "date" 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 name of the first race in the year ? ### Input: CREATE TABLE table_204_48 (
id number,
"date" text,
... |
For each year, bin the year into day of the week interval, and return the average of the number of times the team Boston Red Stockings won in the postseasons using a line chart, order X in desc order please. | CREATE TABLE player_award (
player_id TEXT,
award_id TEXT,
year INTEGER,
league_id TEXT,
tie TEXT,
notes TEXT
)
CREATE TABLE team_half (
year INTEGER,
league_id TEXT,
team_id TEXT,
half INTEGER,
div_id TEXT,
div_win TEXT,
rank INTEGER,
g INTEGER,
w INTEGER,
... | SELECT year, AVG(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year 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 each year, bin the year into day of the week interval, and return the average of the number of times the team Boston Red... |
Reasonable quality old posts with spelling errors. | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
... | SELECT P.Id AS "post_link", P.CreationDate, P.Score, P.PostTypeId, p.LastEditDate, p.LastActivityDate FROM Posts AS P WHERE p.LastEditDate < DATEADD(month, -6, p.LastActivityDate) AND Score >= 5 AND (Title LIKE '%dinamic%' OR Title LIKE '%sintax%' OR Title LIKE '%programatically%') ORDER BY P.Score, P.CreationDate | 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: Reasonable quality old posts with spelling errors. ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
... |
who is the person that is part of the belgian vw club that works with fr d ric miclotte | CREATE TABLE table_30241 (
"Entrant" text,
"Constructor" text,
"Car" text,
"Driver" text,
"Co-driver" text,
"Rounds" text
) | SELECT "Driver" FROM table_30241 WHERE "Entrant" = 'Belgian VW Club' AND "Co-driver" = 'Frédéric Miclotte' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who is the person that is part of the belgian vw club that works with fr d ric miclotte ### Input: CREATE TABLE table_30241 ... |
What is the segment A on episode 237? | CREATE TABLE table_15187735_19 (
segment_a VARCHAR,
episode VARCHAR
) | SELECT segment_a FROM table_15187735_19 WHERE episode = 237 | 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 segment A on episode 237? ### Input: CREATE TABLE table_15187735_19 (
segment_a VARCHAR,
episode VARCHAR... |
What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | CREATE TABLE pilot (
Pilot_ID int,
Pilot_name text,
Rank int,
Age int,
Nationality text,
Position text,
Join_Year int,
Team text
)
CREATE TABLE pilot_record (
Record_ID int,
Pilot_ID int,
Aircraft_ID int,
Date text
)
CREATE TABLE aircraft (
Aircraft_ID int,
Orde... | SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. ### Inpu... |
Percent of closed answered negative-scored questions over time. | CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUser... | SELECT MAX(h.t), h.pc AS "Percent of closed answered negative-scored questions over time" FROM (SELECT q.t AS t, NTILE(100) OVER (ORDER BY q.t) AS pc FROM (SELECT ClosedDate - CreationDate AS t FROM Posts WHERE PostTypeId = 1 AND AnswerCount > 0 AND Score < 0 AND NOT ClosedDate IS NULL) AS q) AS h WHERE h.t <= '23:59:5... | 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: Percent of closed answered negative-scored questions over time. ### Input: CREATE TABLE ReviewTaskStates (
Id number,
... |
What was the first airdate or the season that had less than 24 episodes and a Nielsen ranking of #38? | CREATE TABLE table_name_68 (
first_airdate VARCHAR,
episodes VARCHAR,
nielsen_ranking VARCHAR
) | SELECT first_airdate FROM table_name_68 WHERE episodes < 24 AND nielsen_ranking = "#38" | 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 first airdate or the season that had less than 24 episodes and a Nielsen ranking of #38? ### Input: CREATE TABL... |
when was the first time patient 022-187132 had a gastric (ng) output during the previous day? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132')) AND intakeoutput.cellpath LIKE '%output... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: when was the first time patient 022-187132 had a gastric (ng) output during the previous day? ### Input: CREATE TABLE medica... |
did in 2105 patient 71689 visit the hospital? | CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 71689 AND STRFTIME('%y', admissions.admittime) = '2105' | 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: did in 2105 patient 71689 visit the hospital? ### Input: CREATE TABLE icustays (
row_id number,
subject_id number,
... |
has patient 24921 undergone any medical procedure on their first hospital encounter? | 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
chart... | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24921 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime 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: has patient 24921 undergone any medical procedure on their first hospital encounter? ### Input: CREATE TABLE transfers (
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.