instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_14903355_2 (
men_doubles VARCHAR,
womens_doubles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the men doubles for caroline persyn smids
| SELECT men_doubles FROM table_14903355_2 WHERE womens_doubles = "Caroline Persyn Smids" | sql_create_context |
CREATE TABLE table_35641 (
"Date" text,
"Site" text,
"Sport" text,
"Winning team" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Winning team on january 28, 2006?
| SELECT "Winning team" FROM table_35641 WHERE "Date" = 'january 28, 2006' | wikisql |
CREATE TABLE table_80341 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the region of the release from May 27, 2009?
| SELECT "Region" FROM table_80341 WHERE "Date" = 'may 27, 2009' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Retain plastic fragments" | mimicsql_data |
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 prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND demographic.age < "54" | mimicsql_data |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... | SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 77676 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'diff c... | mimic_iii |
CREATE TABLE table_29898 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what i... | SELECT "Date" FROM table_29898 WHERE "High assists" = 'Andre Miller (7)' | wikisql |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_name_22 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what 1989 has 2002 of 4r and 2005 of 4r?
| SELECT 1989 FROM table_name_22 WHERE 2002 = "4r" AND 2005 = "4r" | sql_create_context |
CREATE TABLE table_32617 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did St Kilda play as the away team?
| SELECT "Venue" FROM table_32617 WHERE "Away team" = 'st kilda' | wikisql |
CREATE TABLE table_77555 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date that the decision was Niittymaki, the attendance... | SELECT "Date" FROM table_77555 WHERE "Decision" = 'niittymaki' AND "Attendance" > '19,207' AND "Record" = '28–17–5' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDSM = '牙本质过敏症' AND hz_info.RYBH... | css |
CREATE TABLE table_15871 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years in Toronto" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which player is from georgia
| SELECT "Player" FROM table_15871 WHERE "School/Club Team" = 'Georgia' | wikisql |
CREATE TABLE table_19001175_1 (
country VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the country for hideki noda category:articles with hcards
| SELECT country FROM table_19001175_1 WHERE name = "Hideki Noda Category:Articles with hCards" | sql_create_context |
CREATE TABLE table_27409 (
"Book series" text,
"Author" text,
"Original language" text,
"No. of installments" text,
"First published" text,
"Approximate sales" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all approximate sales for the... | SELECT "Approximate sales" FROM table_27409 WHERE "Author" = 'Laura Ingalls Wilder' | wikisql |
CREATE TABLE table_62839 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result when the score was 5-1?
| SELECT "Result" FROM table_62839 WHERE "Score" = '5-1' | wikisql |
CREATE TABLE table_name_27 (
südbayern VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the S dbayern in 1928?
| SELECT südbayern FROM table_name_27 WHERE year = 1928 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2058" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
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 prescriptions... | SELECT demographic.marital_status FROM demographic WHERE demographic.name = "Paul Edwards" | mimicsql_data |
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 MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.days_stay = "29" | mimicsql_data |
CREATE TABLE table_23285805_8 (
high_points VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has the high points for the 69 game?
| SELECT high_points FROM table_23285805_8 WHERE game = 69 | sql_create_context |
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 d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions... | mimic_iii |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientuni... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE table_23282 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When mark critz (d) 50.8% tim burns (r) 49.2% are the candidates what is... | SELECT "Party" FROM table_23282 WHERE "Candidates" = 'Mark Critz (D) 50.8% Tim Burns (R) 49.2%' | wikisql |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester i... | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Bioinformatics Seminar%' OR name LIKE '%Bioinformatics Seminar%') AND credits = 2 | advising |
CREATE TABLE table_59493 (
"Name" text,
"Residence" text,
"Party" text,
"Years in Assembly" text,
"Years in Senate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the political party of Jackie Goldberg?
| SELECT "Party" FROM table_59493 WHERE "Name" = 'jackie goldberg' | wikisql |
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | SELECT Name, SUM(T1.Show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.Cinema_ID = T2.Cinema_ID GROUP BY T1.Cinema_ID ORDER BY Name | nvbench |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9cod... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-25705')) AND intakeoutput.celllabel = 'volum... | eicu |
CREATE TABLE table_name_76 (
failures VARCHAR,
partial_failures VARCHAR,
country VARCHAR,
family VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of failure for the country of Russia, and a Family of r14 r-14, and a Partial failures ... | SELECT COUNT(failures) FROM table_name_76 WHERE country = "russia" AND family = "r14 r-14" AND partial_failures < 0 | sql_create_context |
CREATE TABLE qtb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT SUM(t_kc22.AMOUNT) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '5821579' AND t_kc22.STA_DATE BETWEEN '2008-05-06' AND '2018-12-14' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT SUM(t_kc22.AMOUNT) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID ... | css |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT FIRST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME | nvbench |
CREATE TABLE Invoices (
invoice_number INTEGER,
order_id INTEGER,
invoice_date DATETIME
)
CREATE TABLE Orders (
order_id INTEGER,
customer_id INTEGER,
date_order_placed DATETIME,
order_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_... | SELECT customer_first_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_67323 (
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points for the navy team that lost over 11?
| SELECT SUM("Points") FROM table_67323 WHERE "Team" = 'navy' AND "Lost" > '11' | wikisql |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT COUNT(wdmzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '戚俊晤' AND wdmzjzjlb.JZKSRQ BETWEEN '2006-06-17' AND '2011-04-28' UNION SELECT COUNT(bd... | css |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | (SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb... | css |
CREATE TABLE table_73584 (
"Tournament" text,
"Games played" real,
"Points per game" text,
"Rebounds per game" text,
"Assists per game" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games played have 4.7 as points per game?
| SELECT "Games played" FROM table_73584 WHERE "Points per game" = '4.7' | wikisql |
CREATE TABLE table_name_82 (
top_5 INTEGER,
events INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the least Top-5 finish when the events are greater than 18?
| SELECT MIN(top_5) FROM table_name_82 WHERE events > 18 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Percutaneous aspiration of liver" | mimicsql_data |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average age for... | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY AVG(age) DESC | nvbench |
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Stores (
S... | SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description ORDER BY COUNT(Service_Type_Description) | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Endoscopic insertion of stent (tube) into bile duct" | mimicsql_data |
CREATE TABLE table_11806 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What circuit was for the ge... | SELECT "Circuit" FROM table_11806 WHERE "Race" = 'german grand prix' | wikisql |
CREATE TABLE table_56244 (
"Name" text,
"Father" text,
"Birth" text,
"Marriage" text,
"Became Queen" text,
"Ceased to be Queen" text,
"Death" text,
"Spouse" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the spouse of the queen wh... | SELECT "Spouse" FROM table_56244 WHERE "Father" = 'ferdinand i of the two sicilies' | wikisql |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE STUDENT (
STU_NUM... | SELECT CRS_DESCRIPTION, COUNT(CRS_DESCRIPTION) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY CRS_DESCRIPTION | nvbench |
CREATE TABLE table_name_27 (
rating INTEGER,
episode VARCHAR,
rank__night_ VARCHAR,
rank__timeslot_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest rating with nightly rank smaller than 7, timeslot rank smaller than 5 and eposide ... | SELECT MIN(rating) FROM table_name_27 WHERE rank__night_ < 7 AND rank__timeslot_ < 5 AND episode > 6 | sql_create_context |
CREATE TABLE table_203_145 (
id number,
"position" number,
"club" text,
"played" number,
"points" text,
"wins" number,
"draws" number,
"losses" number,
"goals for" number,
"goals against" number,
"goal difference" number
)
-- Using valid SQLite, answer the following questio... | SELECT "club" FROM table_203_145 ORDER BY "losses" DESC LIMIT 1 | squall |
CREATE TABLE table_name_91 (
group VARCHAR,
official_history VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which group has David D'Angers as the official history?
| SELECT group FROM table_name_91 WHERE official_history = "david d'angers" | sql_create_context |
CREATE TABLE Playlist (
PlaylistId integer,
Name varchar(120)
)
CREATE TABLE Genre (
GenreId integer,
Name varchar(120)
)
CREATE TABLE Album (
AlbumId integer,
Title varchar(160),
ArtistId integer
)
CREATE TABLE Invoice (
InvoiceId integer,
CustomerId integer,
InvoiceDate date... | SELECT Phone, COUNT(Phone) FROM Employee GROUP BY Phone ORDER BY Phone DESC | nvbench |
CREATE TABLE table_name_23 (
date VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Date has a Rank of 2?
| SELECT date FROM table_name_23 WHERE rank = 2 | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu |
CREATE TABLE Product (
product_id INTEGER,
product_name VARCHAR(80),
product_details VARCHAR(255)
)
CREATE TABLE Problem_Log (
problem_log_id INTEGER,
assigned_to_staff_id INTEGER,
problem_id INTEGER,
problem_category_code VARCHAR(20),
problem_status_code VARCHAR(20),
log_entry_date... | SELECT problem_id, problem_log_id FROM Staff AS T1 JOIN Problem_Log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "Rylan" AND T1.staff_last_name = "Homenick" | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | SELECT wdmzjzjlb.JZZDBM, wdmzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '水清懿' UNION SELECT bdmzjzjlb.JZZDBM, bdmzjzjlb.JZZDSM FROM person_info JOIN... | css |
CREATE TABLE table_name_81 (
cuts_made VARCHAR,
events VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of cuts made of tournaments with 2 Events?
| SELECT COUNT(cuts_made) FROM table_name_81 WHERE events = 2 | sql_create_context |
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 a... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-96048') AND NOT patient.unitdischargetime IS NULL... | eicu |
CREATE TABLE table_10081 (
"Institution" text,
"Location" text,
"Team Nickname" text,
"Joined TSCHL" real,
"Home Arena" text,
"Capacity" real,
"Team Website" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the team nickname when joine... | SELECT "Team Nickname" FROM table_10081 WHERE "Joined TSCHL" = '2010' AND "Home Arena" = 'kettering rec center' AND "Team Website" = 'dayton hockey' | wikisql |
CREATE TABLE table_name_49 (
report VARCHAR,
score VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What report has a score of 0-0 with Sydney FC?
| SELECT report FROM table_name_49 WHERE score = "0-0" AND away_team = "sydney fc" | sql_create_context |
CREATE TABLE table_36099 (
"Tournament" text,
"1998" text,
"1999" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Career SR" text,
"Caree... | SELECT "2007" FROM table_36099 WHERE "2003" = '2r' AND "2004" = '1r' | wikisql |
CREATE TABLE table_17174 (
"#" real,
"Episode" text,
"Air Date" text,
"Timeslot" text,
"Rating" text,
"Share" real,
"18-49" text,
"Viewers" text,
"Weekly Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the viewers for th... | SELECT "Viewers" FROM table_17174 WHERE "Episode" = 'Woman Marries Heart' | wikisql |
CREATE TABLE table_41294 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the To par, when the Score is 68-71-69=208?
| SELECT "To par" FROM table_41294 WHERE "Score" = '68-71-69=208' | wikisql |
CREATE TABLE table_1341604_26 (
district VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What district is incumbent ike skelton from?
| SELECT district FROM table_1341604_26 WHERE incumbent = "Ike Skelton" | sql_create_context |
CREATE TABLE table_name_52 (
laps INTEGER,
grid VARCHAR,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the highest laps when the grid was larger than 19 and the time/retired was fuel?
| SELECT MAX(laps) FROM table_name_52 WHERE grid > 19 AND time_retired = "fuel" | sql_create_context |
CREATE TABLE table_61071 (
"Issue Date" real,
"Album Title" text,
"Artist" text,
"Sales" real,
"Highest Position" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest issue date for an album that reached position of 3?
| SELECT MAX("Issue Date") FROM table_61071 WHERE "Highest Position" = '3' | wikisql |
CREATE TABLE player (
Gender VARCHAR,
Occupation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the gender and occupation of players?
| SELECT Gender, Occupation FROM player | sql_create_context |
CREATE TABLE table_51321 (
"Draw" real,
"Song" text,
"Artist" text,
"Jury (Points)" text,
"Televotes (Points)" text,
"Total Points" real,
"Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest total points Karine Tr cy has... | SELECT MIN("Total Points") FROM table_51321 WHERE "Artist" = 'karine trécy' AND "Place" < '12' | wikisql |
CREATE TABLE table_60991 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the ... | SELECT MIN("Position") FROM table_60991 WHERE "Points 1" = '39' AND "Goals Against" > '49' | wikisql |
CREATE TABLE table_21579 (
"County" text,
"Kerry%" text,
"Kerry#" real,
"Bush%" text,
"Bush#" real,
"Others%" text,
"Others#" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the maximum kerry # for where others is 47
| SELECT MAX("Kerry#") FROM table_21579 WHERE "Others#" = '47' | wikisql |
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID ... | SELECT SALARY, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment ... | 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... | atis |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) DESC | nvbench |
CREATE TABLE party (
party_id number,
year number,
party text,
governor text,
lieutenant_governor text,
comptroller text,
attorney_general text,
us_senate text
)
CREATE TABLE county (
county_id number,
county_name text,
population number,
zip_code text
)
CREATE TABLE el... | SELECT T2.party FROM election AS T1 JOIN party AS T2 ON T1.party = T2.party_id GROUP BY T1.party ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_name_2 (
frequency_mhz INTEGER,
call_sign VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Frequency MHz for the station with a call sign of w224bn?
| SELECT AVG(frequency_mhz) FROM table_name_2 WHERE call_sign = "w224bn" | sql_create_context |
CREATE TABLE patient (
ssn number,
name text,
address text,
phone text,
insuranceid number,
pcp number
)
CREATE TABLE nurse (
employeeid number,
name text,
position text,
registered boolean,
ssn number
)
CREATE TABLE procedures (
code number,
name text,
cost num... | SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.employeeid GROUP BY departmentid ORDER BY COUNT(departmentid) LIMIT 1 | spider |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Users (
Id number,
Reputation number,... | SELECT a.* FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id INNER JOIN Users AS u ON a.OwnerUserId = u.Id WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 AND DATEDIFF(month, q.CreationDate, creationDate) > 6 AND DATEDIFF(day, u.CreationDate, creationDate) < 7 AND u.CreationDate > q.CreationDate AND a.Score > 10 | sede |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '姜淑华' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 2959.88) UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '姜淑华' AND gyb.MED_CLINIC_ID IN (SELECT t_kc24.MED... | css |
CREATE TABLE table_name_25 (
elevator VARCHAR,
elector VARCHAR,
elevated VARCHAR,
order VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the Elevator that has Elevated: 1378, September 18, an Order of Cardinal-Priest, and an Elector of Poncello ... | SELECT elevator FROM table_name_25 WHERE elevated = "1378, september 18" AND order = "cardinal-priest" AND elector = "poncello orsini" | sql_create_context |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Modular Forms%' OR name LIKE '%Modular Forms%') AND credits = 13 | advising |
CREATE TABLE table_name_77 (
portfolio VARCHAR,
minister VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the portfolio of minister of carlo giovanardi
| SELECT portfolio FROM table_name_77 WHERE minister = "carlo giovanardi" | sql_create_context |
CREATE TABLE table_46339 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With the pick of 1 Cecil Martin has what number as the overall?
| SELECT COUNT("Overall") FROM table_46339 WHERE "Pick" = '1' AND "Name" = 'cecil martin' | wikisql |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuest... | SELECT q.Id AS "post_link", a.CreationDate FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE a.OwnerUserId = '##UserId##' AND q.AcceptedAnswerId IS NULL | sede |
CREATE TABLE table_name_25 (
high_points VARCHAR,
game VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On April 29, with a game larger than 2, what is the high points?
| SELECT high_points FROM table_name_25 WHERE game > 2 AND date = "april 29" | sql_create_context |
CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage number,
accession_number text,
sequence_length number,
sequence_identity_to_human_protein text,
institution_id text
)
CREATE TABLE institution (
institution_id text,
institution text,
locat... | SELECT T2.protein_name, T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id | spider |
CREATE TABLE table_6079 (
"Image" text,
"Father" text,
"Birth" text,
"Ceased to be Duchess" text,
"Death" text,
"Husband" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which duchess was born on 9 october 1574?
| SELECT "Ceased to be Duchess" FROM table_6079 WHERE "Birth" = '9 october 1574' | wikisql |
CREATE TABLE table_name_50 (
engine VARCHAR,
entrant VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What engine does Garvey Team Lotus use?
| SELECT engine FROM table_name_50 WHERE entrant = "garvey team lotus" | sql_create_context |
CREATE TABLE table_79661 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in final" text,
"Score" text,
"Prize Money" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the match on September 24, 2006?
| SELECT "Score" FROM table_79661 WHERE "Date" = 'september 24, 2006' | wikisql |
CREATE TABLE table_name_63 (
chassis_code VARCHAR,
power VARCHAR,
model VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Chassis code has a 200d model and a Power of ps (kw; hp) @ 4200?
| SELECT chassis_code FROM table_name_63 WHERE power = "ps (kw; hp) @ 4200" AND model = "200d" | sql_create_context |
CREATE TABLE Students_in_Detention (
student_id INTEGER,
detention_id INTEGER,
incident_id INTEGER
)
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number VARC... | SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_1232 (
"Station" text,
"Year opened" text,
"Metropolitan borough [c ]" text,
"Zone" real,
"Servedby Route maps:- [ dead link ] [ dead link ]" text,
"Station users 2006\u201307" real,
"Station users 2007\u201308" real
)
-- Using valid SQLite, answer the following question... | SELECT "Station" FROM table_1232 WHERE "Station users 2006\u201307" = '183000' | wikisql |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number... | SELECT TagName, COUNT(CASE WHEN VoteTypeId = 2 THEN 1 END) AS UpVotes, COUNT(CASE WHEN VoteTypeId = 3 THEN 1 END) AS DownVotes, SUM(CASE WHEN VoteTypeId = 2 THEN 1 WHEN VoteTypeId = 3 THEN -1 END) AS NetVotes, COUNT(*) AS TotalVotes FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Par... | sede |
CREATE TABLE performers_in_bookings (
order_id number,
performer_id number
)
CREATE TABLE bookings_services (
order_id number,
product_id number
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number,
order_quantity text,
other_item_details text
)
CR... | SELECT T1.service_type_description FROM ref_service_types AS T1 JOIN services AS T2 ON T1.service_type_code = T2.service_type_code WHERE T2.product_price > 100 | spider |
CREATE TABLE table_51931 (
"Team" text,
"Seasons" text,
"Regular season" text,
"Tournament" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total on average for teams with 3 tournaments?
| SELECT AVG("Total") FROM table_51931 WHERE "Tournament" = '3' | wikisql |
CREATE TABLE table_name_8 (
ties VARCHAR,
division VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the ties for division of bafl division two south?
| SELECT ties FROM table_name_8 WHERE division = "bafl division two south" | sql_create_context |
CREATE TABLE table_224840_3 (
date_of_successors_formal_installation VARCHAR,
successor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times has Aaron Ogden (f), been a successor and has had a formal installation?
| SELECT COUNT(date_of_successors_formal_installation) FROM table_224840_3 WHERE successor = "Aaron Ogden (F)" | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4718) AND microbiologyevents.spec_type_desc = 'aspirate' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIM... | mimic_iii |
CREATE TABLE table_11517 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In the game where the crowd was 11,327 and the h... | SELECT "Away team" FROM table_11517 WHERE "Crowd" > '11,327' AND "Home team score" = '13.17 (95)' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT gwyjzb.MED_SER_ORG_NO FROM gwyjzb WHERE gwyjzb.PERSON_NM = '袁秀艾' AND gwyjzb.IN_HOSP_DATE BETWEEN '2011-08-04' AND '2014-09-24' GROUP BY gwyjzb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.MED_SER_ORG_NO FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '袁秀艾' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2011-08-0... | css |
CREATE TABLE table_17103729_8 (
high_rebounds VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the high rebounds for score of 64-74
| SELECT COUNT(high_rebounds) FROM table_17103729_8 WHERE score = "64-74" | sql_create_context |
CREATE TABLE table_203_523 (
id number,
"state" text,
"swimsuit" number,
"interview" number,
"evening gown" number,
"average" number,
"finalists" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total points were scored in the inter... | SELECT SUM("interview") FROM table_203_523 | squall |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_co... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Hip joint replacement" | mimicsql_data |
CREATE TABLE table_name_18 (
loses INTEGER,
wins VARCHAR,
draws VARCHAR,
year VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What sum of Losses has Year greater than 1972, and Competition of nswrfl, and Draws 0, and Wins 16?
| SELECT SUM(loses) FROM table_name_18 WHERE year > 1972 AND competition = "nswrfl" AND draws = 0 AND wins = 16 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.