instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
give me the number of patients whose drug name is sertraline? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sertraline" | 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 drug name is sertraline? ### Input: CREATE TABLE demographic (
subject_id text,
... |
What wrestling event was participated in during the 2008 Beijing games? | CREATE TABLE table_75293 (
"Medal" text,
"Name" text,
"Games" text,
"Sport" text,
"Event" text
) | SELECT "Event" FROM table_75293 WHERE "Games" = '2008 beijing' AND "Sport" = 'wrestling' | 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 wrestling event was participated in during the 2008 Beijing games? ### Input: CREATE TABLE table_75293 (
"Medal" te... |
Before round 7, what is the greatest Pick # for a player that plays defensive tackle? | CREATE TABLE table_5385 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT MAX("Pick #") FROM table_5385 WHERE "Position" = 'defensive tackle' AND "Round" < '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: Before round 7, what is the greatest Pick # for a player that plays defensive tackle? ### Input: CREATE TABLE table_5385 (
... |
What are the names of device shops, and what are the carriers that they carry devices in stock for?, display Y-axis in desc order please. | CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE stock (
Shop_ID int,
Device... | SELECT Carrier, COUNT(Carrier) FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID GROUP BY Carrier ORDER BY COUNT(Carrier) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the names of device shops, and what are the carriers that they carry devices in stock for?, display Y-axis in desc ... |
What are the distinct payment method codes in all the invoices? | CREATE TABLE INVOICES (
payment_method_code VARCHAR
) | SELECT DISTINCT payment_method_code FROM INVOICES | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What are the distinct payment method codes in all the invoices? ### Input: CREATE TABLE INVOICES (
payment_method_code V... |
User Reputation of Java comments. | CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate t... | SELECT Id, Reputation FROM Users WHERE Id IN (SELECT UserId FROM Comments WHERE CreationDate < '2014-10-10' AND PostId IN (SELECT Id FROM Posts WHERE ParentId IN (SELECT Id FROM Posts WHERE Tags LIKE '%<php>%') UNION SELECT Id FROM Posts WHERE Tags LIKE '%<php>%')) AND Reputation <= 3 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: User Reputation of Java comments. ### Input: CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
... |
When does week 11 start? | CREATE TABLE table_name_25 (
date VARCHAR,
week VARCHAR
) | SELECT date FROM table_name_25 WHERE week = "11" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When does week 11 start? ### Input: CREATE TABLE table_name_25 (
date VARCHAR,
week VARCHAR
) ### Response: SELECT d... |
how many patients were diagnosed with acute coronary syndrome - unstable angina since 2102 after undergoing nasogastric tube - insertion within 2 months? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE p... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'nasogastric tube - insertion' AND STRFTIME('%y', treatment.treatmenttime) >= '2102') AS t1 JOIN (SELECT pati... | 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 patients were diagnosed with acute coronary syndrome - unstable angina since 2102 after undergoing nasogastric tube... |
Which Score points has an Event of og beijing, and Rank points of olympic gold medalist? | CREATE TABLE table_60307 (
"Shooter" text,
"Event" text,
"Rank points" text,
"Score points" text,
"Total" text
) | SELECT "Score points" FROM table_60307 WHERE "Event" = 'og beijing' AND "Rank points" = 'olympic gold medalist' | 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 Score points has an Event of og beijing, and Rank points of olympic gold medalist? ### Input: CREATE TABLE table_60307... |
When melbourne was the away team, what was the lowest crowd turnout they had? | CREATE TABLE table_name_75 (
crowd INTEGER,
away_team VARCHAR
) | SELECT MIN(crowd) FROM table_name_75 WHERE away_team = "melbourne" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When melbourne was the away team, what was the lowest crowd turnout they had? ### Input: CREATE TABLE table_name_75 (
cr... |
Terraform Ansible Puppet Chef Salt. | CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistory (
Id num... | SELECT CreationDate, Tags, ViewCount, Score, CommentCount FROM Posts WHERE Tags LIKE '<terraform>' OR Tags LIKE '<ansible>' OR Tags LIKE '<chef>' OR Tags LIKE '<puppet>' | 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: Terraform Ansible Puppet Chef Salt. ### Input: CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE R... |
What is the score for april 29? | CREATE TABLE table_11964263_13 (
score VARCHAR,
date VARCHAR
) | SELECT score FROM table_11964263_13 WHERE date = "April 29" | 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 for april 29? ### Input: CREATE TABLE table_11964263_13 (
score VARCHAR,
date VARCHAR
) ### Respon... |
how many emergency hospital admission patients have other shock without mention of trauma diagnoses? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Other shock without mention of trauma" | 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 emergency hospital admission patients have other shock without mention of trauma diagnoses? ### Input: CREATE TABLE... |
Hawthorn played as an Away team in which venue? | CREATE TABLE table_10584 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_10584 WHERE "Away team" = 'hawthorn' | 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: Hawthorn played as an Away team in which venue? ### Input: CREATE TABLE table_10584 (
"Home team" text,
"Home team s... |
For 14 credits , how many upper-level classes are there ? | CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 14 AND program_course.category LIKE 'ULCS' | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For 14 credits , how many upper-level classes are there ? ### Input: CREATE TABLE course_offering (
offering_id int,
... |
What is the smallest grid with collision as the Time/Retired for pedro diniz? | CREATE TABLE table_name_6 (
grid INTEGER,
time_retired VARCHAR,
driver VARCHAR
) | SELECT MIN(grid) FROM table_name_6 WHERE time_retired = "collision" AND driver = "pedro diniz" | 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 smallest grid with collision as the Time/Retired for pedro diniz? ### Input: CREATE TABLE table_name_6 (
gri... |
How many candidates ran in the race where the incumbent is J. L. Pilcher? | CREATE TABLE table_18477 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT COUNT("Candidates") FROM table_18477 WHERE "Incumbent" = 'J. L. Pilcher' | 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 candidates ran in the race where the incumbent is J. L. Pilcher? ### Input: CREATE TABLE table_18477 (
"Distric... |
What is the Height for Years of Rockets of 2005-06? | CREATE TABLE table_54249 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
) | SELECT "Height in Ft." FROM table_54249 WHERE "Years for Rockets" = '2005-06' | 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 Height for Years of Rockets of 2005-06? ### Input: CREATE TABLE table_54249 (
"Player" text,
"No.(s)" te... |
Return a scatter chart about the correlation between ID and salary . | CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREAT... | SELECT ID, salary FROM instructor ORDER BY salary | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Return a scatter chart about the correlation between ID and salary . ### Input: CREATE TABLE teaches (
ID varchar(5),
... |
what percentile of the hgb value of 9.1 is among patients of the same age as patient 011-20295 on the last hospital encounter? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE microlab (
microl... | SELECT DISTINCT t1.c1 FROM (SELECT lab.labresult, PERCENT_RANK() OVER (ORDER BY lab.labresult) AS c1 FROM lab WHERE lab.labname = 'hgb' AND lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age = (SELECT patient.age FROM patient WHERE patient.uniquepid = '011-20295' AND NOT patient.h... | 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 percentile of the hgb value of 9.1 is among patients of the same age as patient 011-20295 on the last hospital encounte... |
give me the duration of the first stay of patient 005-86645 in the icu. | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
... | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-86645') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: give me the duration of the first stay of patient 005-86645 in the icu. ### Input: CREATE TABLE medication (
medicationi... |
How many companies are in either 'Banking' industry or 'Conglomerate' industry? | CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value_billion text
)
CREATE TABLE office_locations (
building_id number,
company_id number,
move_in_year number
)
CRE... | SELECT COUNT(*) FROM companies WHERE industry = "Banking" OR industry = "Conglomerate" | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many companies are in either 'Banking' industry or 'Conglomerate' industry? ### Input: CREATE TABLE companies (
id n... |
how many days has elapsed since the first time patient 027-142451 had a mpv lab test on the current hospital encounter? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsysto... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-142451' AND patient.hosp... | 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 elapsed since the first time patient 027-142451 had a mpv lab test on the current hospital encounter? ### ... |
What is the enrollment for Augsburg college? | CREATE TABLE table_3493 (
"Institution" text,
"Nickname" text,
"Location (all in Minnesota)" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text
) | SELECT MIN("Enrollment") FROM table_3493 WHERE "Institution" = 'Augsburg College' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the enrollment for Augsburg college? ### Input: CREATE TABLE table_3493 (
"Institution" text,
"Nickname" tex... |
What is every 5-year peek with a when Anatoly Karpov, 2820 is 15-year peak? | CREATE TABLE table_21321 (
"Rank" real,
"1-year peak" text,
"5-year peak" text,
"10-year peak" text,
"15-year peak" text,
"20-year peak" text
) | SELECT "5-year peak" FROM table_21321 WHERE "15-year peak" = 'Anatoly Karpov, 2820' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every 5-year peek with a when Anatoly Karpov, 2820 is 15-year peak? ### Input: CREATE TABLE table_21321 (
"Rank"... |
what is the typhoid fever number for the year 1934 | CREATE TABLE table_15910 (
"Year" text,
"Typhus" real,
"Typhoid fever" real,
"Relapsing fever" real,
"Smallpox" real,
"Malaria" text
) | SELECT "Typhoid fever" FROM table_15910 WHERE "Year" = '1934' | 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 typhoid fever number for the year 1934 ### Input: CREATE TABLE table_15910 (
"Year" text,
"Typhus" real,... |
How many students are advised by each rank of faculty? List the rank and the number of students. Show the proportion. | CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Participates_in (
stuid INTEG... | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank | 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: How many students are advised by each rank of faculty? List the rank and the number of students. Show the proportion. ### In... |
What is the award for the Choice TV: Breakout Star Female category? | CREATE TABLE table_name_36 (
award VARCHAR,
category VARCHAR
) | SELECT award FROM table_name_36 WHERE category = "choice tv: breakout star female" | 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 award for the Choice TV: Breakout Star Female category? ### Input: CREATE TABLE table_name_36 (
award VARCHA... |
what flights are there from HOUSTON to DALLAS | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'HOUSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what flights are there from HOUSTON to DALLAS ### Input: CREATE TABLE date_day (
month_number int,
day_number int,
... |
Give me the comparison about ACC_Percent over the ACC_Regular_Season , and rank by the Y-axis in descending. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_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: Give me the comparison about ACC_Percent over the ACC_Regular_Season , and rank by the Y-axis in descending. ### Input: CREA... |
how many patients whose procedure short title is radiotherapeut proc nec? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Radiotherapeut proc NEC" | 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 procedure short title is radiotherapeut proc nec? ### Input: CREATE TABLE prescriptions (
subjec... |
what number of patients who were admitted before the year 2135 were diagnosed with lower extremity embolism? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.short_title = "Lower extremity embolism" | 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 number of patients who were admitted before the year 2135 were diagnosed with lower extremity embolism? ### Input: CREA... |
What position was played by the player during 1986 1991 1997 1999? | CREATE TABLE table_name_57 (
position VARCHAR,
years VARCHAR
) | SELECT position FROM table_name_57 WHERE years = "1986 – 1991 1997 – 1999" | 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 position was played by the player during 1986 1991 1997 1999? ### Input: CREATE TABLE table_name_57 (
position VARC... |
What was the score for United States when the player was Mike Reid and the To par was e? | CREATE TABLE table_name_30 (
score VARCHAR,
player VARCHAR,
country VARCHAR,
to_par VARCHAR
) | SELECT score FROM table_name_30 WHERE country = "united states" AND to_par = "e" AND player = "mike reid" | 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 score for United States when the player was Mike Reid and the To par was e? ### Input: CREATE TABLE table_name_... |
When rank is more than 10, what is the total rate? | CREATE TABLE table_63428 (
"Rank" real,
"Player" text,
"Goals" real,
"Apps" real,
"Rate" real
) | SELECT SUM("Rate") FROM table_63428 WHERE "Rank" > '10' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When rank is more than 10, what is the total rate? ### Input: CREATE TABLE table_63428 (
"Rank" real,
"Player" text,... |
What is the average and minimum age of all artists from United States. | CREATE TABLE artist (
artist_id number,
name text,
country text,
year_join number,
age number
)
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
artist_id number,
ticket_price number
)
CREATE TABLE exhibition_record (
exhibition_id number,
date t... | SELECT AVG(age), MIN(age) FROM artist WHERE country = 'United States' | 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 is the average and minimum age of all artists from United States. ### Input: CREATE TABLE artist (
artist_id number... |
Who had the high point total against cleveland? | CREATE TABLE table_17311783_9 (
high_points VARCHAR,
team VARCHAR
) | SELECT high_points FROM table_17311783_9 WHERE team = "Cleveland" | 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 had the high point total against cleveland? ### Input: CREATE TABLE table_17311783_9 (
high_points VARCHAR,
team... |
what is the maximum age of patients who have stayed in the hospital for 11 days and died before the year 2148? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.days_stay = "11" AND demographic.dod_year < "2148.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: what is the maximum age of patients who have stayed in the hospital for 11 days and died before the year 2148? ### Input: CR... |
how many ranks are there ? | CREATE TABLE table_204_521 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time (hand)" text,
"notes" text
) | SELECT COUNT("rank") FROM table_204_521 | 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 ranks are there ? ### Input: CREATE TABLE table_204_521 (
id number,
"rank" number,
"name" text,
"n... |
What is the date when Joseph is the decision and San Jose is the home team? | CREATE TABLE table_69018 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | SELECT "Date" FROM table_69018 WHERE "Decision" = 'joseph' AND "Home" = 'san jose' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the date when Joseph is the decision and San Jose is the home team? ### Input: CREATE TABLE table_69018 (
"Date"... |
What is the year that nahete colles was named? | CREATE TABLE table_45103 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real
) | SELECT MAX("Year named") FROM table_45103 WHERE "Name" = 'nahete colles' | 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 that nahete colles was named? ### Input: CREATE TABLE table_45103 (
"Name" text,
"Latitude" text,
... |
What is the earliest year built for the ship refurbished earlier than 2013? | CREATE TABLE table_14055 (
"Ship name" text,
"Year built" real,
"Last refurbished" real,
"Length" text,
"Crew" real,
"Guests" real,
"Staterooms" real,
"Comments" text
) | SELECT MIN("Year built") FROM table_14055 WHERE "Last refurbished" < '2013' | 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 earliest year built for the ship refurbished earlier than 2013? ### Input: CREATE TABLE table_14055 (
"Ship ... |
Name the area for north bay village | CREATE TABLE table_22916979_5 (
metropolitan_area VARCHAR,
densest_incorporated_place VARCHAR
) | SELECT metropolitan_area FROM table_22916979_5 WHERE densest_incorporated_place = "North Bay Village" | 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 area for north bay village ### Input: CREATE TABLE table_22916979_5 (
metropolitan_area VARCHAR,
densest_in... |
Who regulates radio electrical = lren? | CREATE TABLE table_18776 (
"Serial & Branch" real,
"Seaman" text,
"Mechanical" text,
"Secretariat" text,
"Supply" text,
"Electrical" text,
"Radio Electrical" text,
"Regulating" text,
"Medical" text
) | SELECT "Regulating" FROM table_18776 WHERE "Radio Electrical" = 'LREN' | 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 regulates radio electrical = lren? ### Input: CREATE TABLE table_18776 (
"Serial & Branch" real,
"Seaman" text,
... |
Number of Questions for each year. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT COUNT(Id), YEAR(CreationDate) FROM Posts WHERE PostTypeId = 1 GROUP BY YEAR(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: Number of Questions for each year. ### Input: CREATE TABLE Users (
Id number,
Reputation number,
CreationDate ti... |
On what Date is the Crowd larger than 17,000? | CREATE TABLE table_name_8 (
date VARCHAR,
crowd INTEGER
) | SELECT date FROM table_name_8 WHERE crowd > 17 OFFSET 000 | 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: On what Date is the Crowd larger than 17,000? ### Input: CREATE TABLE table_name_8 (
date VARCHAR,
crowd INTEGER
) #... |
Please tell the salary of each hire date using a line chart. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0... | SELECT HIRE_DATE, SALARY FROM employees | 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: Please tell the salary of each hire date using a line chart. ### Input: CREATE TABLE job_history (
EMPLOYEE_ID decimal(6... |
ELECT TOP 200 ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], Id AS [User Link], R. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%india%' OR UPPER(Location) LIKE '%IND' ORDER BY Reputation DESC LIMIT 200 | 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: ELECT TOP 200 ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], Id AS [User Link], R. ### Input: CREATE TABLE Users (
... |
Which Game is the lowest one that has Points smaller than 92? | CREATE TABLE table_name_14 (
game INTEGER,
points INTEGER
) | SELECT MIN(game) FROM table_name_14 WHERE points < 92 | 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 Game is the lowest one that has Points smaller than 92? ### Input: CREATE TABLE table_name_14 (
game INTEGER,
... |
has there ever been any enteral meds given to patient 027-154299 on this month/27? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-154299')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutp... | 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: has there ever been any enteral meds given to patient 027-154299 on this month/27? ### Input: CREATE TABLE allergy (
all... |
How much is the workload in EECS 559 ? | CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE ta (
campus_job_id int,
... | SELECT DISTINCT program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number = 559 AND program_course.course_id = course.course_id | 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: How much is the workload in EECS 559 ? ### Input: CREATE TABLE course_prerequisite (
pre_course_id int,
course_id in... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, order total number from high to low order. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not ... |
What is the code name when the FSB / HT (MHz) is 100 (fsb)? | CREATE TABLE table_name_12 (
code_name VARCHAR,
fsb___ht__mhz_ VARCHAR
) | SELECT code_name FROM table_name_12 WHERE fsb___ht__mhz_ = "100 (fsb)" | 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 code name when the FSB / HT (MHz) is 100 (fsb)? ### Input: CREATE TABLE table_name_12 (
code_name VARCHAR,
... |
What was the GTP winning team in the round in Portland during which Jack Baldwin become part of the GTU winning team? | CREATE TABLE table_13643320_2 (
gtp_winning_team VARCHAR,
circuit VARCHAR,
gtu_winning_team VARCHAR
) | SELECT gtp_winning_team FROM table_13643320_2 WHERE circuit = "Portland" AND gtu_winning_team = "Jack Baldwin" | 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 GTP winning team in the round in Portland during which Jack Baldwin become part of the GTU winning team? ### In... |
What is the 3rd place team for the year of 1955? | CREATE TABLE table_22511 (
"Year" real,
"1st Place Team" text,
"2nd Place Team" text,
"3rd Place Team" text,
"4th Place Team" text,
"Host Location" text
) | SELECT "3rd Place Team" FROM table_22511 WHERE "Year" = '1955' | 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 3rd place team for the year of 1955? ### Input: CREATE TABLE table_22511 (
"Year" real,
"1st Place Team"... |
count the number of patients whose diagnosis short title is hx surgery to organs nec and drug route is iv drip. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx surgery to organs NEC" AND prescriptions.route = "IV DRIP" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: count the number of patients whose diagnosis short title is hx surgery to organs nec and drug route is iv drip. ### Input: C... |
What is the name for the locomotive n464? | CREATE TABLE table_56247 (
"Locomotive" text,
"Name" text,
"Serial No" text,
"Entered service" text,
"Owner" text
) | SELECT "Name" FROM table_56247 WHERE "Locomotive" = 'n464' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the name for the locomotive n464? ### Input: CREATE TABLE table_56247 (
"Locomotive" text,
"Name" text,
... |
What is the title of the one who ruled from 2007 BC? | CREATE TABLE table_46029 (
"Type" text,
"Name" text,
"Title" text,
"Royal house" text,
"From" text
) | SELECT "Title" FROM table_46029 WHERE "From" = '2007 bc' | 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 title of the one who ruled from 2007 BC? ### Input: CREATE TABLE table_46029 (
"Type" text,
"Name" text,... |
Home site' of election voters. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance... | SELECT COUNT(u.Id), u.Id FROM Badges AS b LEFT JOIN Users AS u ON u.Id = b.UserId WHERE b.Name = 'Constituent' GROUP BY u.Id | 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: Home site' of election voters. ### Input: CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Descriptio... |
what is the number of patients less than 70 years of age who were tested for total iron binding capacity? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "70" AND lab.label = "Iron Binding Capacity, Total" | 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 less than 70 years of age who were tested for total iron binding capacity? ### Input: CREATE ... |
Which position has a pick less than 41 from Ohio State? | CREATE TABLE table_name_31 (
position VARCHAR,
pick VARCHAR,
school_club_team VARCHAR
) | SELECT position FROM table_name_31 WHERE pick < 41 AND school_club_team = "ohio 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: Which position has a pick less than 41 from Ohio State? ### Input: CREATE TABLE table_name_31 (
position VARCHAR,
pi... |
How many parks are there in the state of NY? | CREATE TABLE player_college (
player_id text,
college_id text,
year number
)
CREATE TABLE player_award_vote (
award_id text,
year number,
league_id text,
player_id text,
points_won number,
points_max number,
votes_first number
)
CREATE TABLE fielding_postseason (
player_id ... | SELECT COUNT(*) FROM park WHERE state = 'NY' | spider | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many parks are there in the state of NY? ### Input: CREATE TABLE player_college (
player_id text,
college_id tex... |
how many patients whose year of birth is less than 2023 and item id is 51263? | 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 demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2023" AND lab.itemid = "51263" | 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 year of birth is less than 2023 and item id is 51263? ### Input: CREATE TABLE diagnoses (
subjec... |
Badge Samaritan - nice answer- answers that need 1 upvote. http://stackoverflow.com/help/badges/23/nice-answer 'Answer score of 10 or more. This badge can be awarded multiple times. | CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
... | SELECT a.Id AS "post_link", a.Score, a.CreationDate FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id INNER JOIN PostHistory AS ph ON ph.PostId = q.Id INNER JOIN Users AS u ON u.Id = a.OwnerUserId WHERE ph.PostHistoryTypeId != 14 AND a.Score = 9 AND a.OwnerUserId NOT IN (SELECT DISTINCT (UserId) FROM Badges WH... | 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: Badge Samaritan - nice answer- answers that need 1 upvote. http://stackoverflow.com/help/badges/23/nice-answer 'Answer score... |
What is the 2004 value with A in 2005, A in 2008, and lq in 2009? | CREATE TABLE table_48546 (
"Tournament" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"Career SR" text,
"Career W\u2013L" text
) | SELECT "2004" FROM table_48546 WHERE "2005" = 'a' AND "2008" = 'a' AND "2009" = 'lq' | 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 2004 value with A in 2005, A in 2008, and lq in 2009? ### Input: CREATE TABLE table_48546 (
"Tournament" tex... |
Find comment with the given text. | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time... | SELECT Id AS "comment_link", PostId AS "post_link", CreationDate FROM Comments WHERE Text LIKE '%##Text##%' ORDER BY CreationDate 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: Find comment with the given text. ### Input: CREATE TABLE Comments (
Id number,
PostId number,
Score number,
... |
What is the height of the player from club vk primorac kotor who plays gk? | CREATE TABLE table_name_96 (
height VARCHAR,
pos VARCHAR,
club VARCHAR
) | SELECT height FROM table_name_96 WHERE pos = "gk" AND club = "vk primorac kotor" | 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 height of the player from club vk primorac kotor who plays gk? ### Input: CREATE TABLE table_name_96 (
heigh... |
On which week was the result safe and the song choice ' across the universe '? | CREATE TABLE table_40293 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" real,
"Result" text
) | SELECT "Week #" FROM table_40293 WHERE "Result" = 'safe' AND "Song choice" = ' across the universe ' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: On which week was the result safe and the song choice ' across the universe '? ### Input: CREATE TABLE table_40293 (
"We... |
What amount of prize money was there when the rank was less than 7, there were more than 6 events, and the country was Fiji? | CREATE TABLE table_36214 (
"Rank" real,
"Player" text,
"Country" text,
"Events" real,
"Prize money ( $ )" real
) | SELECT "Prize money ( $ )" FROM table_36214 WHERE "Rank" < '7' AND "Events" > '6' AND "Country" = 'fiji' | 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 amount of prize money was there when the rank was less than 7, there were more than 6 events, and the country was Fiji?... |
In 1865, what was the first party? | CREATE TABLE table_80141 (
"Year" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
) | SELECT "1st Party" FROM table_80141 WHERE "Year" = '1865' | 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 1865, what was the first party? ### Input: CREATE TABLE table_80141 (
"Year" text,
"1st Member" text,
"1st Pa... |
Which Title has an album of tough talk, and a Label-Nr of x-371? | CREATE TABLE table_name_4 (
title VARCHAR,
from_album VARCHAR,
label VARCHAR,
Nr VARCHAR,
x VARCHAR
) | SELECT title FROM table_name_4 WHERE from_album = "tough talk" AND label - Nr = x - 371 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which Title has an album of tough talk, and a Label-Nr of x-371? ### Input: CREATE TABLE table_name_4 (
title VARCHAR,
... |
Which matches had draw odds from Bet365 higher than 3? | CREATE TABLE football_data (
season text,
datetime time,
div text,
country text,
league text,
referee text,
hometeam text,
awayteam text,
fthg number,
ftag number,
ftr text,
hthg number,
htag number,
htr text,
psh number,
psd number,
psa number,
b3... | SELECT * FROM football_data WHERE b365d > 3 | worldsoccerdatabase | Below are sql tables 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 matches had draw odds from Bet365 higher than 3? ### Input: CREATE TABLE football_data (
season text,
datetime... |
What was the home team that played Geelong? | CREATE TABLE table_name_43 (
home_team VARCHAR,
away_team VARCHAR
) | SELECT home_team AS score FROM table_name_43 WHERE away_team = "geelong" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was the home team that played Geelong? ### Input: CREATE TABLE table_name_43 (
home_team VARCHAR,
away_team VAR... |
Which city expects their project completion in 2017? | CREATE TABLE table_10997 (
"Stadium" text,
"Capacity" text,
"City" text,
"Province" text,
"Expected Completion" text
) | SELECT "City" FROM table_10997 WHERE "Expected Completion" = '2017' | 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 city expects their project completion in 2017? ### Input: CREATE TABLE table_10997 (
"Stadium" text,
"Capacity... |
How many laps were driven in 2009? | CREATE TABLE table_24594 (
"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 "Laps" FROM table_24594 WHERE "Year" = '2009' | 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 laps were driven in 2009? ### Input: CREATE TABLE table_24594 (
"Year" real,
"Date" text,
"Driver" text... |
Give me a histogram showing the famous titles and ages of each artist with the age in descending order. | CREATE TABLE music_festival (
ID int,
Music_Festival text,
Date_of_ceremony text,
Category text,
Volume int,
Result text
)
CREATE TABLE volume (
Volume_ID int,
Volume_Issue text,
Issue_Date text,
Weeks_on_Top real,
Song text,
Artist_ID int
)
CREATE TABLE artist (
Ar... | SELECT Famous_Title, Age FROM artist ORDER BY Age 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: Give me a histogram showing the famous titles and ages of each artist with the age in descending order. ### Input: CREATE TA... |
indicate the monthly maximum amount of urine out foley output that patient 13329 had had until 647 days ago. | 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 MAX(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13329)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'uri... | 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: indicate the monthly maximum amount of urine out foley output that patient 13329 had had until 647 days ago. ### Input: CREA... |
What is the 2011 value that has a 2r in 2008 and a 4r in 2012? | CREATE TABLE table_11459 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2011" FROM table_11459 WHERE "2008" = '2r' AND "2012" = '4r' | 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 2011 value that has a 2r in 2008 and a 4r in 2012? ### Input: CREATE TABLE table_11459 (
"Tournament" text,
... |
What episode number had production code e4423? | CREATE TABLE table_10842344_1 (
no_in_season INTEGER,
production_code VARCHAR
) | SELECT MAX(no_in_season) FROM table_10842344_1 WHERE production_code = "E4423" | 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 episode number had production code e4423? ### Input: CREATE TABLE table_10842344_1 (
no_in_season INTEGER,
prod... |
How many episodes were written by Warren Leight? | CREATE TABLE table_30977 (
"Season no." real,
"Series no." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) | SELECT COUNT("Season no.") FROM table_30977 WHERE "Written by" = 'Warren Leight' | 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 episodes were written by Warren Leight? ### Input: CREATE TABLE table_30977 (
"Season no." real,
"Series no... |
Find the sum of credits of courses that have more than one prerequisites for each department with a bar chart, could you show by the y axis in desc? | CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(... | SELECT dept_name, SUM(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY dept_name ORDER BY SUM(credits) 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 sum of credits of courses that have more than one prerequisites for each department with a bar chart, could you sho... |
A bar chart about what is the total revenue of each manufacturer?, display by the x-axis in descending please. | 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 Name, SUM(Revenue) FROM Manufacturers GROUP BY Name ORDER BY 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: A bar chart about what is the total revenue of each manufacturer?, display by the x-axis in descending please. ### Input: CR... |
Find the name of medication used on the patient who stays in room 111? | CREATE TABLE affiliated_with (
physician number,
department number,
primaryaffiliation boolean
)
CREATE TABLE procedures (
code number,
name text,
cost number
)
CREATE TABLE on_call (
nurse number,
blockfloor number,
blockcode number,
oncallstart time,
oncallend time
)
CRE... | SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn JOIN prescribes AS T3 ON T3.patient = T2.ssn JOIN medication AS T4 ON T3.medication = T4.code WHERE room = 111 | 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 the name of medication used on the patient who stays in room 111? ### Input: CREATE TABLE affiliated_with (
physici... |
can you find the last opponent in 2013 league ? | CREATE TABLE table_204_375 (
id number,
"#" number,
"season" number,
"competition" text,
"date" text,
"round" text,
"opponent" text,
"h / a" text,
"result" text,
"scorer (s)" text
) | SELECT "opponent" FROM table_204_375 WHERE "season" = 2013 ORDER BY "date" 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: can you find the last opponent in 2013 league ? ### Input: CREATE TABLE table_204_375 (
id number,
"#" number,
"... |
What is the roll number of Orautoha school in Raetihi, which has a decile smaller than 8? | CREATE TABLE table_name_63 (
roll INTEGER,
decile VARCHAR,
area VARCHAR,
name VARCHAR
) | SELECT SUM(roll) FROM table_name_63 WHERE area = "raetihi" AND name = "orautoha school" AND decile < 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 roll number of Orautoha school in Raetihi, which has a decile smaller than 8? ### Input: CREATE TABLE table_name... |
With 0 Goals and less than 1 Tries, what is Matt James position? | CREATE TABLE table_name_38 (
position VARCHAR,
player VARCHAR,
goals VARCHAR,
tries VARCHAR
) | SELECT position FROM table_name_38 WHERE goals = "0" AND tries < 1 AND player = "matt james" | 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: With 0 Goals and less than 1 Tries, what is Matt James position? ### Input: CREATE TABLE table_name_38 (
position VARCHA... |
what is the number of channels she has appeared on ? | CREATE TABLE table_203_543 (
id number,
"year" text,
"show" text,
"role" text,
"channel" text,
"extra" text
) | SELECT COUNT(DISTINCT "channel") FROM table_203_543 | 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 channels she has appeared on ? ### Input: CREATE TABLE table_203_543 (
id number,
"year" text,... |
How is DHYGRACK 688 different from DHYGRACK 683 ? | 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, description, number FROM course WHERE (department = 'DHYGRACK' AND number = 688) OR (department = 'DHYGRACK' AND number = 683) | 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: How is DHYGRACK 688 different from DHYGRACK 683 ? ### Input: CREATE TABLE course_prerequisite (
pre_course_id int,
c... |
List the id of students who registered course statistics in the order of registration date. | CREATE TABLE student_course_registrations (
student_id VARCHAR,
course_id VARCHAR,
registration_date VARCHAR
)
CREATE TABLE courses (
course_id VARCHAR,
course_name VARCHAR
) | SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date | 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: List the id of students who registered course statistics in the order of registration date. ### Input: CREATE TABLE student_... |
What was the Attendance before Week 17 with a Record of Bye? | CREATE TABLE table_44429 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Kickoff Time" text,
"Attendance" text
) | SELECT "Attendance" FROM table_44429 WHERE "Week" < '17' AND "Record" = 'bye' | 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 Attendance before Week 17 with a Record of Bye? ### Input: CREATE TABLE table_44429 (
"Week" real,
"Dat... |
Which Year(s) won has a Total of 147? | CREATE TABLE table_47450 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
) | SELECT "Year(s) won" FROM table_47450 WHERE "Total" = '147' | 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 Year(s) won has a Total of 147? ### Input: CREATE TABLE table_47450 (
"Player" text,
"Country" text,
"Year... |
I want the lowest Grid for David Coulthard | CREATE TABLE table_name_85 (
grid INTEGER,
driver VARCHAR
) | SELECT MIN(grid) FROM table_name_85 WHERE driver = "david coulthard" | 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: I want the lowest Grid for David Coulthard ### Input: CREATE TABLE table_name_85 (
grid INTEGER,
driver VARCHAR
) ##... |
what was the first value of a laboratory test -monos of patient 005-87465 during this hospital visit? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
... | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = '-monos' ORDER... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what was the first value of a laboratory test -monos of patient 005-87465 during this hospital visit? ### Input: CREATE TABL... |
What is the roll number for East Gore School? | CREATE TABLE table_69789 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | SELECT COUNT("Roll") FROM table_69789 WHERE "Name" = 'east gore school' | 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 roll number for East Gore School? ### Input: CREATE TABLE table_69789 (
"Name" text,
"Years" text,
"... |
which team ranked below chile 's ? | CREATE TABLE table_204_735 (
id number,
"rank" number,
"team" text,
"names" text,
"time" text,
"qualification" text
) | SELECT "team" FROM table_204_735 WHERE "rank" = (SELECT "rank" FROM table_204_735 WHERE "team" = 'chile') + 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 ranked below chile 's ? ### Input: CREATE TABLE table_204_735 (
id number,
"rank" number,
"team" text... |
Calculate the total number of patients admitted before the year 2110 who had a blood test by lab | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2110" AND lab.fluid = "Blood" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Calculate the total number of patients admitted before the year 2110 who had a blood test by lab ### Input: CREATE TABLE pre... |
What position had a debut in round 6? | CREATE TABLE table_name_66 (
position VARCHAR,
debut VARCHAR
) | SELECT position FROM table_name_66 WHERE debut = "round 6" | 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 position had a debut in round 6? ### Input: CREATE TABLE table_name_66 (
position VARCHAR,
debut VARCHAR
) ### ... |
How many people watched episode number 13? | CREATE TABLE table_29631 (
"#" real,
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Viewers" real,
"Original airdate" text,
"Prod. code" real
) | SELECT "Viewers" FROM table_29631 WHERE "#" = '13' | 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 people watched episode number 13? ### Input: CREATE TABLE table_29631 (
"#" real,
"No." real,
"Title" t... |
How many vehicle thefts data were recorded if forcible rape is 1232? | CREATE TABLE table_28285 (
"Year" real,
"Population" real,
"Total" real,
"Violent" real,
"Property Crimes" real,
"Forcible rape" real,
"Robbery" real,
"Aggravated assault" real,
"Burglary" real,
"Larceny Theft" real,
"Vehicle Theft" real
) | SELECT COUNT("Vehicle Theft") FROM table_28285 WHERE "Forcible rape" = '1232' | 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 vehicle thefts data were recorded if forcible rape is 1232? ### Input: CREATE TABLE table_28285 (
"Year" real,
... |
What year was Waynesburg University founded in Pennsylvania? | CREATE TABLE table_42725 (
"Institution name" text,
"City/ town" text,
"State/ province" text,
"Total enrollment" text,
"Year founded" real
) | SELECT "Year founded" FROM table_42725 WHERE "State/ province" = 'pennsylvania' AND "Institution name" = 'waynesburg university' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What year was Waynesburg University founded in Pennsylvania? ### Input: CREATE TABLE table_42725 (
"Institution name" te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.