instruction stringlengths 0 1.06k | input stringlengths 33 7.14k | response stringlengths 2 4.44k | source stringclasses 25
values | text stringlengths 302 8.5k |
|---|---|---|---|---|
what is minimum age of patients whose ethnicity is black/cape verdean and days of hospital stay is 10? | 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 MIN(demographic.age) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.days_stay = "10" | 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 minimum age of patients whose ethnicity is black/cape verdean and days of hospital stay is 10? ### Input: CREATE TAB... |
What is the description of the club named 'Tennis Club'? | CREATE TABLE member_of_club (
stuid number,
clubid number,
position text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE club (
clubid number,
clubname text,
clubdes... | SELECT clubdesc FROM club WHERE clubname = "Tennis Club" | 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 description of the club named 'Tennis Club'? ### Input: CREATE TABLE member_of_club (
stuid number,
club... |
Who wrote the episode that aired February 4, 2010? | CREATE TABLE table_2892 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Original air date" text,
"Production code" real
) | SELECT "Written by" FROM table_2892 WHERE "Original air date" = 'February 4, 2010' | 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 wrote the episode that aired February 4, 2010? ### Input: CREATE TABLE table_2892 (
"No. in series" real,
"No. i... |
provide the number of patients whose admission year is before 2166 and item id is 50885. | 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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2166" AND lab.itemid = "50885" | 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 year is before 2166 and item id is 50885. ### Input: CREATE TABLE diagnoses (... |
flights from KANSAS CITY to CLEVELAND | CREATE TABLE code_description (
code varchar,
description text
)
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 i... | 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 = 'KANSAS CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CL... | 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: flights from KANSAS CITY to CLEVELAND ### Input: CREATE TABLE code_description (
code varchar,
description text
)
C... |
Which school has more than 3 rounds with jason odom? | CREATE TABLE table_11511 (
"Pick" real,
"Round" real,
"Player" text,
"Position" text,
"School" text
) | SELECT "School" FROM table_11511 WHERE "Round" > '3' AND "Player" = 'jason odom' | 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 school has more than 3 rounds with jason odom? ### Input: CREATE TABLE table_11511 (
"Pick" real,
"Round" real... |
Find the dates of orders which belong to the customer named 'Jeramie', and count them by a line chart | CREATE TABLE Shipments (
shipment_id INTEGER,
order_id INTEGER,
invoice_number INTEGER,
shipment_tracking_number VARCHAR(80),
shipment_date DATETIME,
other_shipment_details VARCHAR(255)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
product_id INTEGER,
order_id INTEGER,
ord... | SELECT date_order_placed, COUNT(date_order_placed) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie" | 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 dates of orders which belong to the customer named 'Jeramie', and count them by a line chart ### Input: CREATE TABL... |
What is the lowest first elected? | CREATE TABLE table_1341423_21 (
first_elected INTEGER
) | SELECT MIN(first_elected) FROM table_1341423_21 | 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 first elected? ### Input: CREATE TABLE table_1341423_21 (
first_elected INTEGER
) ### Response: SELEC... |
Name the # for bill finger edmond hamilton dick sprang , et al. | CREATE TABLE table_19534677_1 (
_number VARCHAR,
creators VARCHAR
) | SELECT _number FROM table_19534677_1 WHERE creators = "Bill Finger Edmond Hamilton Dick Sprang , et al." | 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 # for bill finger edmond hamilton dick sprang , et al. ### Input: CREATE TABLE table_19534677_1 (
_number VARCH... |
Which episode had viewership of 0.296 million? | CREATE TABLE table_3948 (
"Order" real,
"Episode" text,
"Original airdate" text,
"Timeslot" text,
"Viewers (millions)" text,
"Nightly rank" real,
"Weekly rank" text
) | SELECT "Episode" FROM table_3948 WHERE "Viewers (millions)" = '0.296' | 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 episode had viewership of 0.296 million? ### Input: CREATE TABLE table_3948 (
"Order" real,
"Episode" text,
... |
What is the highest League, when Title Playoff is greater than 0? | CREATE TABLE table_44971 (
"Player" text,
"League" real,
"Title Playoff" real,
"Super Cup" real,
"Total" real
) | SELECT MAX("League") FROM table_44971 WHERE "Title Playoff" > '0' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest League, when Title Playoff is greater than 0? ### Input: CREATE TABLE table_44971 (
"Player" text,
... |
How many caps for alister campbell from brumbies? | CREATE TABLE table_name_67 (
caps INTEGER,
club_province VARCHAR,
player VARCHAR
) | SELECT MIN(caps) FROM table_name_67 WHERE club_province = "brumbies" AND player = "alister campbell" | 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 caps for alister campbell from brumbies? ### Input: CREATE TABLE table_name_67 (
caps INTEGER,
club_provinc... |
For those employees who was hired before 2002-06-21, show me about the distribution of job_id and the sum of employee_id , and group by attribute job_id in a bar chart, and I want to sort by the y-axis in desc. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(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 who was hired before 2002-06-21, show me about the distribution of job_id and the sum of employee_id , a... |
Find the number of routes for each source airport and the airport name. | CREATE TABLE routes (
rid number,
dst_apid number,
dst_ap text,
src_apid number,
src_ap text,
alid number,
airline text,
codeshare text
)
CREATE TABLE airlines (
alid number,
name text,
iata text,
icao text,
callsign text,
country text,
active text
)
CREATE ... | SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name | 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 number of routes for each source airport and the airport name. ### Input: CREATE TABLE routes (
rid number,
... |
what are the three most commonly prescribed drugs for patients who had been prescribed with polyethylene glycol 3350 17 gram oral powder packet at the same time, during a year before? | 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 t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'polyethylene glycol 3350 17 gram oral powder packet... | eicu | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the three most commonly prescribed drugs for patients who had been prescribed with polyethylene glycol 3350 17 gram... |
Wat is the tax source system code and master customer id of the taxes related to each parking fine id? | CREATE TABLE Parking_Fines (
council_tax_id VARCHAR,
cmi_cross_ref_id VARCHAR
)
CREATE TABLE CMI_Cross_References (
source_system_code VARCHAR,
master_customer_id VARCHAR,
cmi_cross_ref_id VARCHAR
) | SELECT T1.source_system_code, T1.master_customer_id, T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id | 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: Wat is the tax source system code and master customer id of the taxes related to each parking fine id? ### Input: CREATE TAB... |
how much money was requested on the show which aired on 4 september 2011? | CREATE TABLE table_name_87 (
money_requested__ INTEGER,
first_aired VARCHAR
) | SELECT SUM(money_requested__) AS £_ FROM table_name_87 WHERE first_aired = "4 september 2011" | 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 much money was requested on the show which aired on 4 september 2011? ### Input: CREATE TABLE table_name_87 (
money_... |
Give the full name and customer id of the customer with the fewest accounts. | CREATE TABLE customers_cards (
card_id number,
customer_id number,
card_type_code text,
card_number text,
date_valid_from time,
date_valid_to time,
other_card_details text
)
CREATE TABLE accounts (
account_id number,
customer_id number,
account_name text,
other_account_detai... | SELECT T2.customer_first_name, T2.customer_last_name, T1.customer_id FROM accounts AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) LIMIT 1 | 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: Give the full name and customer id of the customer with the fewest accounts. ### Input: CREATE TABLE customers_cards (
c... |
who were the candidates for district ohio 6? | CREATE TABLE table_18276 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Candidates" FROM table_18276 WHERE "District" = 'Ohio 6' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: who were the candidates for district ohio 6? ### Input: CREATE TABLE table_18276 (
"District" text,
"Incumbent" text... |
What is the highest number of viewers for the episode that has an 18-49 of 1.8/6? | CREATE TABLE table_50919 (
"Episode" text,
"Air Date" text,
"Timeslot" text,
"18-49" text,
"Viewers" real
) | SELECT MAX("Viewers") FROM table_50919 WHERE "18-49" = '1.8/6' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the highest number of viewers for the episode that has an 18-49 of 1.8/6? ### Input: CREATE TABLE table_50919 (
... |
Who is the manufacturer for Henk Vd Lagemaat? | CREATE TABLE table_44668 (
"Rider" text,
"Manufacturer" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
) | SELECT "Manufacturer" FROM table_44668 WHERE "Rider" = 'henk vd lagemaat' | 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 manufacturer for Henk Vd Lagemaat? ### Input: CREATE TABLE table_44668 (
"Rider" text,
"Manufacturer" tex... |
What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE? | CREATE TABLE department (
dno number,
division text,
dname text,
room text,
building text,
dphone number
)
CREATE TABLE minor_in (
stuid number,
dno number
)
CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room... | SELECT T2.dname, T2.room FROM course AS T1 JOIN department AS T2 ON T1.dno = T2.dno WHERE T1.cname = "INTRODUCTION TO COMPUTER SCIENCE" | 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 department name and room for the course INTRODUCTION TO COMPUTER SCIENCE? ### Input: CREATE TABLE department (
... |
What is Points, when Points is 60, and when Club is Bedwas RFC? | CREATE TABLE table_46322 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Bonus Points" text,
"Points" text
) | SELECT "Points for" FROM table_46322 WHERE "Points" = '60' AND "Club" = 'bedwas rfc' | 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 Points, when Points is 60, and when Club is Bedwas RFC? ### Input: CREATE TABLE table_46322 (
"Club" text,
"... |
What is the position in e4s ratings b when June 30, 2010 is the original airing on channel 4? | CREATE TABLE table_24837 (
"Episode number" real,
"Title" text,
"Original airing on Channel 4" text,
"Time of airing on Channel 4" text,
"Original airing on E4" text,
"Time of airing on E4" text,
"Position in Channel 4s ratings a" text,
"Position in E4s ratings b" text,
"Total viewer... | SELECT "Position in E4s ratings b" FROM table_24837 WHERE "Original airing on Channel 4" = 'June 30, 2010' | 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 position in e4s ratings b when June 30, 2010 is the original airing on channel 4? ### Input: CREATE TABLE table_... |
Show me a line chart to show the change of salary for those employees whose first name does not containing the letter M over the corresponding hire date, and show by the X-axis in descending. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
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... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY HIRE_DATE DESC | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Show me a line chart to show the change of salary for those employees whose first name does not containing the letter M over... |
In football league one, what coach was hired as a replacement on 8 October 2007 | CREATE TABLE table_30375 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text,
"Position in table" text
) | SELECT "Replaced by" FROM table_30375 WHERE "Date of vacancy" = '8 October 2007' | 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 football league one, what coach was hired as a replacement on 8 October 2007 ### Input: CREATE TABLE table_30375 (
"T... |
what is the number of patients less than 83 years who are suffering from acute subdural hematoma primary disease? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ACUTE SUBDURAL HEMATOMA" AND demographic.age < "83" | 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 83 years who are suffering from acute subdural hematoma primary disease? ### Input:... |
How many patients died in or before the year 2132 with a lab test neutrophils? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2131.0" AND lab.label = "Neutrophils" | 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 died in or before the year 2132 with a lab test neutrophils? ### Input: CREATE TABLE lab (
subject_id ... |
Which Rider is grid 7? | CREATE TABLE table_49648 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | SELECT "Rider" FROM table_49648 WHERE "Grid" = '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 Rider is grid 7? ### Input: CREATE TABLE table_49648 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" ... |
How many staffs have contacted with each engineer? Give me a bar chart grouping by each engineer's last name. | CREATE TABLE Assets (
asset_id INTEGER,
maintenance_contract_id INTEGER,
supplier_company_id INTEGER,
asset_details VARCHAR(255),
asset_make VARCHAR(20),
asset_model VARCHAR(20),
asset_acquired_date DATETIME,
asset_disposed_date DATETIME,
other_asset_details VARCHAR(255)
)
CREATE TA... | SELECT last_name, COUNT(last_name) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id GROUP BY last_name | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many staffs have contacted with each engineer? Give me a bar chart grouping by each engineer's last name. ### Input: CRE... |
how many patients whose language is cape and age is less than 64? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.age < "64" | 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 language is cape and age is less than 64? ### Input: CREATE TABLE prescriptions (
subject_id tex... |
Count the number of patients who were admitted to the hospital before the year 2194 with a diagnoses icd9 code 34590 | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2194" AND diagnoses.icd9_code = "34590" | 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 who were admitted to the hospital before the year 2194 with a diagnoses icd9 code 34590 ### Inp... |
What is Nationality, when Player is 'Andrew Campbell'? | CREATE TABLE table_name_41 (
nationality VARCHAR,
player VARCHAR
) | SELECT nationality FROM table_name_41 WHERE player = "andrew campbell" | 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 Nationality, when Player is 'Andrew Campbell'? ### Input: CREATE TABLE table_name_41 (
nationality VARCHAR,
... |
give the religion of paul edwards. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT demographic.religion FROM demographic WHERE demographic.name = "Paul Edwards" | 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 the religion of paul edwards. ### Input: CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code ... |
What is the Money ($) player Loren Roberts has made? | CREATE TABLE table_name_93 (
money___ INTEGER,
player VARCHAR
) | SELECT MAX(money___) AS $__ FROM table_name_93 WHERE player = "loren roberts" | 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 Money ($) player Loren Roberts has made? ### Input: CREATE TABLE table_name_93 (
money___ INTEGER,
playe... |
What were the years for Seasons in CSL when they played in the Guiyang Olympic Sports Center and had Top Division Titles (Overall) of 0? | CREATE TABLE table_77405 (
"Club" text,
"Chinese name" text,
"Home stadium" text,
"Capacity" real,
"Seasons in CSL" text,
"Best finish" text,
"Worst finish" text,
"Spell in level 1" text,
"Top Division Titles (Overall)" real,
"Top Division Titles (Professional)" real,
"Last T... | SELECT "Seasons in CSL" FROM table_77405 WHERE "Top Division Titles (Overall)" = '0' AND "Home stadium" = 'guiyang olympic sports center' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What were the years for Seasons in CSL when they played in the Guiyang Olympic Sports Center and had Top Division Titles (Ov... |
Reputation and average length of questions & answers by user. | 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 MAX(u.Reputation), AVG(LENGTH(p.Body)) FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id AND (p.PostTypeId = 1 OR p.PostTypeId = 2) 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: Reputation and average length of questions & answers by user. ### Input: CREATE TABLE Users (
Id number,
Reputation ... |
liverpool had 8 wins . who is next ? | CREATE TABLE table_204_448 (
id number,
"team" text,
"winners" number,
"runners-up" number,
"years won" text,
"years runner-up" text
) | SELECT "team" FROM table_204_448 WHERE "winners" < 8 ORDER BY "winners" 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: liverpool had 8 wins . who is next ? ### Input: CREATE TABLE table_204_448 (
id number,
"team" text,
"winners" n... |
How many Assists for the Player with 13 Games and a Rank less than 3? | CREATE TABLE table_name_29 (
assists INTEGER,
games VARCHAR,
rank VARCHAR
) | SELECT SUM(assists) FROM table_name_29 WHERE games = 13 AND rank < 3 | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many Assists for the Player with 13 Games and a Rank less than 3? ### Input: CREATE TABLE table_name_29 (
assists IN... |
what is the typhoid fever number for the year 1929 | CREATE TABLE table_1007688_1 (
typhoid_fever VARCHAR,
year VARCHAR
) | SELECT typhoid_fever FROM table_1007688_1 WHERE year = "1929" | 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 typhoid fever number for the year 1929 ### Input: CREATE TABLE table_1007688_1 (
typhoid_fever VARCHAR,
... |
show me all the flights that arrive in BALTIMORE from anywhere between 1850 and 2400 | CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE flight_stop (
flight... | 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 (((flight.arrival_time <= 2400 AND flight.arrival_time >= 1850) OR flight.arrival_time = 0) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.from_ai... | atis | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: show me all the flights that arrive in BALTIMORE from anywhere between 1850 and 2400 ### Input: CREATE TABLE code_descriptio... |
what is average age of patients whose primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? maze and admission year is greater than or equal to 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 AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" AND demographic.admityear >= "2115" | 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 average age of patients whose primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? ma... |
The Chinese Name of sh ngd belongs to what station? | CREATE TABLE table_14803 (
"Station No." real,
"Station Name" text,
"Chinese Name" text,
"Travel Time (hrs)" text,
"Distance (km)" real,
"Transfers" text,
"Location ( District )" text
) | SELECT "Station Name" FROM table_14803 WHERE "Chinese Name" = '上地 shàngdì' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: The Chinese Name of sh ngd belongs to what station? ### Input: CREATE TABLE table_14803 (
"Station No." real,
"Stati... |
Is GEOSCI 511 section 202 being offered in the Summer 2013 semester ? | CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
... | SELECT COUNT(*) > 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course_offering.section_number = 202 AND course.department = 'GEOSCI' AND course.number = 511 AND semester.semester = 'Summer' AND semes... | 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: Is GEOSCI 511 section 202 being offered in the Summer 2013 semester ? ### Input: CREATE TABLE program_requirement (
prog... |
What sum of draw had more than 22 in Jury and a Televote of 130? | CREATE TABLE table_name_91 (
draw INTEGER,
jury VARCHAR,
televote VARCHAR
) | SELECT SUM(draw) FROM table_name_91 WHERE jury > 22 AND televote = 130 | 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 sum of draw had more than 22 in Jury and a Televote of 130? ### Input: CREATE TABLE table_name_91 (
draw INTEGER,
... |
Create a bar chart showing the total number across city code | CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenit... | SELECT city_code, COUNT(*) FROM Student GROUP BY city_code | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Create a bar chart showing the total number across city code ### Input: CREATE TABLE Has_amenity (
dormid INTEGER,
a... |
Which courses in Literature and Identity meet the Core needs ? | CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Literature and Identity%' OR course.description LIKE '%Literature and Identity%' OR course.name ... | advising | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which courses in Literature and Identity meet the Core needs ? ### Input: CREATE TABLE course_offering (
offering_id int... |
What is the highest age (years) that the 1st place had a performance of 62.20m? | CREATE TABLE table_54892 (
"Year" real,
"Place" text,
"Event" text,
"Performance" text,
"Age (years)" real
) | SELECT MAX("Age (years)") FROM table_54892 WHERE "Place" = '1st' AND "Performance" = '62.20m' | 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 highest age (years) that the 1st place had a performance of 62.20m? ### Input: CREATE TABLE table_54892 (
"Y... |
what is the maximum hospital cost when it involves epilep nec w/o intr epil the last year? | CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate ti... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'epilep nec w/o intr epil')) AND DATETIME(cost.chargetime, 'star... | 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 hospital cost when it involves epilep nec w/o intr epil the last year? ### Input: CREATE TABLE patients ... |
Return a bar chart about the distribution of Sex and the average of Height , and group by attribute Sex. | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Sex, AVG(Height) FROM people GROUP BY Sex | 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 bar chart about the distribution of Sex and the average of Height , and group by attribute Sex. ### Input: CREATE T... |
If the incoming head coach is Carlos Azenha, what is the date of vacancy? | CREATE TABLE table_27133147_3 (
date_of_vacancy VARCHAR,
incoming_head_coach VARCHAR
) | SELECT date_of_vacancy FROM table_27133147_3 WHERE incoming_head_coach = "Carlos Azenha" | 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 incoming head coach is Carlos Azenha, what is the date of vacancy? ### Input: CREATE TABLE table_27133147_3 (
dat... |
List the name of all products along with the number of complaints that they have received with a bar chart, and show in descending by the x axis. | CREATE TABLE Complaints (
complaint_id INTEGER,
product_id INTEGER,
customer_id INTEGER,
complaint_outcome_code VARCHAR(20),
complaint_status_code VARCHAR(20),
complaint_type_code VARCHAR(20),
date_complaint_raised DATETIME,
date_complaint_closed DATETIME,
staff_id INTEGER
)
CREATE ... | SELECT product_name, COUNT(*) FROM Products AS t1 JOIN Complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name ORDER BY product_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: List the name of all products along with the number of complaints that they have received with a bar chart, and show in desc... |
self _ report having an hba1c measure greater than 7 % in the past 6 months | CREATE TABLE table_train_265 (
"id" int,
"systolic_blood_pressure_sbp" int,
"fasting_blood_glucose_fbg" float,
"diastolic_blood_pressure_dbp" int,
"hba1c" float,
"body_mass_index_bmi" float,
"NOUSE" float
) | SELECT * FROM table_train_265 WHERE hba1c > 7 | criteria2sql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: self _ report having an hba1c measure greater than 7 % in the past 6 months ### Input: CREATE TABLE table_train_265 (
"i... |
Find the number of clubs where 'Tracy Kim' is a member. | CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE club (
clubid number,
clubname text,
clubdesc text,
clublocation text
)
CREATE TABLE member_of_club (
stuid number,
clu... | SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Tracy" AND t3.lname = "Kim" | 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 number of clubs where 'Tracy Kim' is a member. ### Input: CREATE TABLE student (
stuid number,
lname text,
... |
provide the number of patients who are male and whose procedure title is intraop cardiac pacemak. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.short_title = "Intraop cardiac pacemak" | 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 who are male and whose procedure title is intraop cardiac pacemak. ### Input: CREATE TABLE di... |
how many nationalities are there after rank 5 ? | CREATE TABLE table_204_174 (
id number,
"rank" number,
"name" text,
"nationality" text,
"result" number,
"notes" text
) | SELECT COUNT(DISTINCT "nationality") FROM table_204_174 WHERE "rank" > 5 | 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 nationalities are there after rank 5 ? ### Input: CREATE TABLE table_204_174 (
id number,
"rank" number,
... |
Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , and I want to rank x axis in asc order. | 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, Team_ID FROM basketball_match ORDER BY ACC_Regular_Season | 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: Visualize a bar chart about the distribution of ACC_Regular_Season and Team_ID , and I want to rank x axis in asc order. ###... |
Who was the Home team when the Visitor was Florida, with a Decision of Ramo? | CREATE TABLE table_name_28 (
home VARCHAR,
decision VARCHAR,
visitor VARCHAR
) | SELECT home FROM table_name_28 WHERE decision = "ramo" AND visitor = "florida" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Who was the Home team when the Visitor was Florida, with a Decision of Ramo? ### Input: CREATE TABLE table_name_28 (
hom... |
How many picks have an Overall of 114? | CREATE TABLE table_name_75 (
pick__number VARCHAR,
overall VARCHAR
) | SELECT COUNT(pick__number) FROM table_name_75 WHERE overall = 114 | 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 picks have an Overall of 114? ### Input: CREATE TABLE table_name_75 (
pick__number VARCHAR,
overall VARCHAR... |
What is the finish associated with a 3-2 vote? | CREATE TABLE table_24122653_2 (
finish VARCHAR,
vote VARCHAR
) | SELECT finish FROM table_24122653_2 WHERE vote = "3-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 finish associated with a 3-2 vote? ### Input: CREATE TABLE table_24122653_2 (
finish VARCHAR,
vote VARCH... |
What tv season had a season finale of august 18, 2004? | CREATE TABLE table_235 (
"Season" real,
"Season premiere" text,
"Season finale" text,
"TV season" text,
"Ranking" text,
"Viewers (in millions)" text
) | SELECT "TV season" FROM table_235 WHERE "Season finale" = 'August 18, 2004' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What tv season had a season finale of august 18, 2004? ### Input: CREATE TABLE table_235 (
"Season" real,
"Season pr... |
What category was danson tang nominated? | CREATE TABLE table_name_72 (
category VARCHAR,
nomination VARCHAR
) | SELECT category FROM table_name_72 WHERE nomination = "danson tang" | 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 category was danson tang nominated? ### Input: CREATE TABLE table_name_72 (
category VARCHAR,
nomination VARCHA... |
What are the notes for the shirt that said Pavv before 2005? | CREATE TABLE table_name_57 (
notes VARCHAR,
shirt_printing VARCHAR,
year VARCHAR
) | SELECT notes FROM table_name_57 WHERE shirt_printing = "pavv" AND year < 2005 | 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 notes for the shirt that said Pavv before 2005? ### Input: CREATE TABLE table_name_57 (
notes VARCHAR,
... |
Top 50 Posts - Hibernate. | CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,... | SELECT Posts.Id AS "post_link", CreationDate, ViewCount, Score FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE LOWER(Tags) LIKE '%hibernate%' AND LOWER(Tags.TagName) = 'hibernate' ORDER BY Score DESC, ViewCount DESC, CreationDate DESC LIMIT 50 | sede | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Top 50 Posts - Hibernate. ### Input: CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
... |
Visualize a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Road, and sort from low to high by the Y. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Home, Team_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY Team_ID | nvbench | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Visualize a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Road, and sort from low to... |
how many patients who stayed in the hospital for more than 3 days had procedure icd9 code 5451? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "3" AND procedures.icd9_code = "5451" | 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 who stayed in the hospital for more than 3 days had procedure icd9 code 5451? ### Input: CREATE TABLE diag... |
In what category was character Jacqui Mcqueen nominated before 2011? | CREATE TABLE table_name_67 (
category VARCHAR,
character VARCHAR,
year VARCHAR
) | SELECT category FROM table_name_67 WHERE character = "jacqui mcqueen" AND year < 2011 | 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 category was character Jacqui Mcqueen nominated before 2011? ### Input: CREATE TABLE table_name_67 (
category VA... |
provide the number of patients whose admission year is less than 2124 and lab test category is chemistry? | 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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2124" AND lab."CATEGORY" = "Chemistry" | 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 year is less than 2124 and lab test category is chemistry? ### Input: CREATE ... |
What is the most recent year in which the winner record is Ireland 4 points? | CREATE TABLE table_28601467_1 (
year INTEGER,
winner VARCHAR
) | SELECT MAX(year) FROM table_28601467_1 WHERE winner = "Ireland 4 points" | 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 most recent year in which the winner record is Ireland 4 points? ### Input: CREATE TABLE table_28601467_1 (
... |
What is the 1981 value of the Macedonian population with a 1971 number greater than 192 and a 1991 of 1748? | CREATE TABLE table_name_54 (
number_1971 VARCHAR
) | SELECT 1981 FROM table_name_54 WHERE number_1971 > 192 AND 1991 = 1748 | 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 1981 value of the Macedonian population with a 1971 number greater than 192 and a 1991 of 1748? ### Input: CREAT... |
How many goals did coe get? | CREATE TABLE table_60337 (
"Nat." text,
"Name" text,
"Since" text,
"Goals" real,
"Ends" real,
"Transfer fee" text
) | SELECT MIN("Goals") FROM table_60337 WHERE "Name" = 'coe' | 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 goals did coe get? ### Input: CREATE TABLE table_60337 (
"Nat." text,
"Name" text,
"Since" text,
"G... |
What was the record for the October 16 game? | CREATE TABLE table_27537518_4 (
record VARCHAR,
date VARCHAR
) | SELECT record FROM table_27537518_4 WHERE date = "October 16" | 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 record for the October 16 game? ### Input: CREATE TABLE table_27537518_4 (
record VARCHAR,
date VARCHAR... |
Most popular tags all time. | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReas... | SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId GROUP BY TagName ORDER BY Rate 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: Most popular tags all time. ### Input: CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejection... |
What was Week 11 when Week 10 had Nebraska (7-1)? | CREATE TABLE table_name_99 (
week_11_nov_6 VARCHAR,
week_10_oct_30 VARCHAR
) | SELECT week_11_nov_6 FROM table_name_99 WHERE week_10_oct_30 = "nebraska (7-1)" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What was Week 11 when Week 10 had Nebraska (7-1)? ### Input: CREATE TABLE table_name_99 (
week_11_nov_6 VARCHAR,
wee... |
How many results have Jere Cooper as incumbent? | CREATE TABLE table_1342249_42 (
result VARCHAR,
incumbent VARCHAR
) | SELECT result FROM table_1342249_42 WHERE incumbent = "Jere Cooper" | 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 results have Jere Cooper as incumbent? ### Input: CREATE TABLE table_1342249_42 (
result VARCHAR,
incumbent... |
what was patient 25312 first height until 07/2105? | CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type t... | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25312)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | 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 patient 25312 first height until 07/2105? ### Input: CREATE TABLE outputevents (
row_id number,
subject_id ... |
What title did George Fury win when on the Oran Park Raceway? | CREATE TABLE table_43718 (
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text,
"Team" text
) | SELECT "Race Title" FROM table_43718 WHERE "Winner" = 'george fury' AND "Circuit" = 'oran park raceway' | 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 title did George Fury win when on the Oran Park Raceway? ### Input: CREATE TABLE table_43718 (
"Race Title" text,
... |
What is the maximum start record for player of Jeff Brehaut? | CREATE TABLE table_31174 (
"Player" text,
"Starts" real,
"Cuts made" real,
"Best finish" text,
"Money list rank" real,
"Earnings ($)" real
) | SELECT MAX("Starts") FROM table_31174 WHERE "Player" = 'Jeff Brehaut' | 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 maximum start record for player of Jeff Brehaut? ### Input: CREATE TABLE table_31174 (
"Player" text,
"S... |
What was the home team score for the game played at Western Oval? | CREATE TABLE table_10238 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_10238 WHERE "Venue" = 'western oval' | 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 home team score for the game played at Western Oval? ### Input: CREATE TABLE table_10238 (
"Home team" text... |
selected before mark mulder ? | CREATE TABLE table_203_618 (
id number,
"pick" number,
"player" text,
"team" text,
"position" text,
"school" text
) | SELECT "player" FROM table_203_618 WHERE "pick" = (SELECT "pick" FROM table_203_618 WHERE "player" = 'mark mulder') - 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: selected before mark mulder ? ### Input: CREATE TABLE table_203_618 (
id number,
"pick" number,
"player" text,
... |
What's the title of the episode with production code 10018? | CREATE TABLE table_19401346_1 (
title VARCHAR,
production_code VARCHAR
) | SELECT title FROM table_19401346_1 WHERE production_code = 10018 | 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 title of the episode with production code 10018? ### Input: CREATE TABLE table_19401346_1 (
title VARCHAR,
... |
Which components have a borough of Lennoxville and borough councilors under 4? | CREATE TABLE table_38504 (
"Borough" text,
"Components" text,
"Population" real,
"Number of Borough Councilors" real,
"Number of Municipal Councilors" real
) | SELECT "Components" FROM table_38504 WHERE "Number of Borough Councilors" < '4' AND "Borough" = 'lennoxville' | 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 components have a borough of Lennoxville and borough councilors under 4? ### Input: CREATE TABLE table_38504 (
"Bo... |
What is the road record for Vanderbilt? | CREATE TABLE table_23183195_2 (
road_record VARCHAR,
team VARCHAR
) | SELECT COUNT(road_record) FROM table_23183195_2 WHERE team = "Vanderbilt" | 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 road record for Vanderbilt? ### Input: CREATE TABLE table_23183195_2 (
road_record VARCHAR,
team VARCHAR... |
What is the 2000 kwh p y with a 2400 kwh/kw p y less than 12.5, a 3.8 1600 kwh/kw p y, and a 1800 kwh/kw p y less than 3.3? | CREATE TABLE table_41662 (
"20 years" text,
"2400 kWh/kW p y" real,
"2200 kWh/kW p y" real,
"2000 kWh/kW p y" real,
"1800 kWh/kW p y" real,
"1600 kWh/kW p y" real,
"1400 kWh/kW p y" real,
"1200 kWh/kW p y" real,
"1000 kWh/kW p y" real,
"800 kWh/kW p y" real
) | SELECT MAX("2000 kWh/kW p y") FROM table_41662 WHERE "2400 kWh/kW p y" < '12.5' AND "1600 kWh/kW p y" = '3.8' AND "1800 kWh/kW p y" < '3.3' | 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 2000 kwh p y with a 2400 kwh/kw p y less than 12.5, a 3.8 1600 kwh/kw p y, and a 1800 kwh/kw p y less than 3.3? ... |
give me the number of patients whose death status is 1 and year of birth is less than 1837? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.dob_year < "1837" | 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 death status is 1 and year of birth is less than 1837? ### Input: CREATE TABLE lab (
... |
What was Buck Pierce's highest average when there were less than 2 fumbles? | CREATE TABLE table_name_41 (
avg INTEGER,
player VARCHAR,
fumbles VARCHAR
) | SELECT MAX(avg) FROM table_name_41 WHERE player = "buck pierce" AND fumbles < 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 was Buck Pierce's highest average when there were less than 2 fumbles? ### Input: CREATE TABLE table_name_41 (
avg ... |
For those employees who did not have any job in the past, draw a line chart about the change of employee_id over hire_date , I want to display in asc by the HIRE_DATE. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE | 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, draw a line chart about the change of employee_id over hire_date ,... |
When did the ship that was commissioned July 1948 with a bow number of ps-31 launch? | CREATE TABLE table_61530 (
"Bow number" text,
"Ship name" text,
"Launched" text,
"Commissioned" text,
"Service" text
) | SELECT "Launched" FROM table_61530 WHERE "Commissioned" = 'july 1948' AND "Bow number" = 'ps-31' | 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 did the ship that was commissioned July 1948 with a bow number of ps-31 launch? ### Input: CREATE TABLE table_61530 (
... |
What was the position for 2008, where 2012 was q1, and 2010 was 1r? | CREATE TABLE table_54118 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2008" FROM table_54118 WHERE "2012" = 'q1' AND "2010" = '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 was the position for 2008, where 2012 was q1, and 2010 was 1r? ### Input: CREATE TABLE table_54118 (
"Tournament" t... |
Provide the number of patients whose primary disease is left colon cancer and were born before the year 2041. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.dob_year < "2041" | mimicsql_data | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Provide the number of patients whose primary disease is left colon cancer and were born before the year 2041. ### Input: CRE... |
I want the director for heroes of the wild | CREATE TABLE table_name_29 (
director VARCHAR,
serial_title VARCHAR
) | SELECT director FROM table_name_29 WHERE serial_title = "heroes of the wild" | 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 director for heroes of the wild ### Input: CREATE TABLE table_name_29 (
director VARCHAR,
serial_title VA... |
What average game has January 30 as the date? | CREATE TABLE table_name_45 (
game INTEGER,
date VARCHAR
) | SELECT AVG(game) FROM table_name_45 WHERE date = "january 30" | sql_create_context | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What average game has January 30 as the date? ### Input: CREATE TABLE table_name_45 (
game INTEGER,
date VARCHAR
) #... |
what were the medications patient 035-3162 was allergic to until 2 months ago? | 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 lab (
labid numbe... | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-3162')) AND DATETIME(allergy.allergytime) <= DATETIME(CURRENT_TIME(), '-... | 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 were the medications patient 035-3162 was allergic to until 2 months ago? ### Input: CREATE TABLE vitalperiodic (
v... |
heart attack, | CREATE TABLE table_train_19 (
"id" int,
"white_blood_cell_count_wbc" int,
"active_infection" bool,
"heart_disease" bool,
"temperature" float,
"skin_lesion" bool,
"heart_rate" int,
"paco2" float,
"immature_form" int,
"respiratory_rate" int,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_19 WHERE heart_disease = 1 | criteria2sql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: heart attack, ### Input: CREATE TABLE table_train_19 (
"id" int,
"white_blood_cell_count_wbc" int,
"active_infec... |
what's the party with opponent being mike oxley (r) unopposed | CREATE TABLE table_689 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Status" text,
"Opponent" text
) | SELECT "Party" FROM table_689 WHERE "Opponent" = 'Mike Oxley (R) unopposed' | 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 party with opponent being mike oxley (r) unopposed ### Input: CREATE TABLE table_689 (
"District" text,
"... |
Tell me the title of work for year more than 2009 | CREATE TABLE table_name_17 (
title_of_work VARCHAR,
year INTEGER
) | SELECT title_of_work FROM table_name_17 WHERE year > 2009 | 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 title of work for year more than 2009 ### Input: CREATE TABLE table_name_17 (
title_of_work VARCHAR,
yea... |
What was the earliest season where a team got a 29th position? | CREATE TABLE table_25369796_1 (
season INTEGER,
position VARCHAR
) | SELECT MIN(season) FROM table_25369796_1 WHERE position = "29th" | 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 earliest season where a team got a 29th position? ### Input: CREATE TABLE table_25369796_1 (
season INTEGER... |
what was the result in week 10? | CREATE TABLE table_9747 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Result" FROM table_9747 WHERE "Week" = '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: what was the result in week 10? ### Input: CREATE TABLE table_9747 (
"Week" real,
"Date" text,
"Opponent" text,
... |
What is the average attendance at a week 4 game? | CREATE TABLE table_74846 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
) | SELECT AVG("Attendance") FROM table_74846 WHERE "Week" = '4' | wikisql | Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is the average attendance at a week 4 game? ### Input: CREATE TABLE table_74846 (
"Week" real,
"Date" text,
... |
How many votes do my comments have?. | 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 COUNT(*) AS "post_link", Score FROM Comments WHERE UserId = 12952 GROUP BY Score ORDER BY Score 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: How many votes do my comments have?. ### Input: CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.