instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE Teachers (
first_name VARCHAR,
email_address VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the first names of teachers whose email address contains the word 'man'.
| SELECT first_name FROM Teachers WHERE email_address LIKE '%man%' | sql_create_context |
CREATE TABLE endowment (
donator_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show all donor names.
| SELECT DISTINCT donator_name FROM endowment | sql_create_context |
CREATE TABLE table_22082 (
"#" real,
"Date" text,
"Opponent" text,
"Score" text,
"Site/Stadium" text,
"Win" text,
"Loss" text,
"Save" text,
"Attendance" real,
"Overall Record" text,
"NCAAT Record" text
)
-- Using valid SQLite, answer the following questions for the tables p... | SELECT "NCAAT Record" FROM table_22082 WHERE "Date" = 'June 21' | wikisql |
CREATE TABLE table_name_97 (
gold VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the gold when Kim Hyang-Mi won the bronze?
| SELECT gold FROM table_name_97 WHERE bronze = "kim hyang-mi" | sql_create_context |
CREATE TABLE table_64132 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of bronze when silver is larger than 0, rank is larger than 3?
| SELECT MAX("Bronze") FROM table_64132 WHERE "Silver" > '0' AND "Rank" > '3' | wikisql |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TI... | SELECT FIRST_NAME, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%m' GROUP BY FIRST_NAME ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE Products (
product_id INTEGER,
product_name VARCHAR(80),
product_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_name VARCHAR(80),
customer_details VARCHAR(255)
)
CREATE TABLE Shipments (
shipment_id INTEGER,
order_id INTEGER,
invoice_numb... | SELECT T3.product_name, SUM(COUNT(*)) FROM Orders AS T1 JOIN Order_Items AS T2 JOIN Products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_name | nvbench |
CREATE TABLE table_64284 (
"Rank" real,
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality of the swimmer with a rank over 2 with a time of 55.77?
| SELECT "Nationality" FROM table_64284 WHERE "Rank" > '2' AND "Time" = '55.77' | wikisql |
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.admityear < "2112" AND diagnoses.long_title = "Retained plastic fragments" | mimicsql_data |
CREATE TABLE table_19587 (
"Number of episode" real,
"Number of season" real,
"Title (original)" text,
"Title (English)" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the original air date for episode number 6?
| SELECT "Original air date" FROM table_19587 WHERE "Number of episode" = '6' | wikisql |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '喻星海' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
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,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDBM = 'A73.395' GROUP BY person_info.JGDM | css |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Descrip... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code | nvbench |
CREATE TABLE table_name_42 (
loss VARCHAR,
score VARCHAR,
arena VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Loss of the game at Nationwide Arena with a Score of 4 3?
| SELECT loss FROM table_name_42 WHERE score = "4–3" AND arena = "nationwide arena" | sql_create_context |
CREATE TABLE table_test_4 (
"id" int,
"ejection_fraction_ef" int,
"systolic_blood_pressure_sbp" int,
"active_infection" bool,
"heart_disease" bool,
"renal_disease" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"cardiogenic_shock" bool,
"diastolic_blood_pressure_dbp" int,
... | SELECT * FROM table_test_4 WHERE heart_disease = 1 | criteria2sql |
CREATE TABLE table_name_85 (
goal_difference INTEGER,
position INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lowest goal difference when the position is higher than 16?
| SELECT MIN(goal_difference) FROM table_name_85 WHERE position > 16 | sql_create_context |
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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0655431' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) < 3 | css |
CREATE TABLE table_name_78 (
italian VARCHAR,
andalusian VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How would an Italian say the Andalusian word coche?
| SELECT italian FROM table_name_78 WHERE andalusian = "coche" | sql_create_context |
CREATE TABLE table_train_272 (
"id" int,
"fasting_plasma_glucose_fpg" float,
"creatinine_clearance_cl" float,
"baseline_hemoglobin_hgb" float,
"sensitization_on_pra" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT * FROM table_train_272 WHERE sensitization_on_pra = 1 | criteria2sql |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9320875' AND IN_HOSP_DATE BETWEEN '2006-03-27' AND '2018-07-19' AND CLINIC_TYPE = '购药' | css |
CREATE TABLE table_2493 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the position... | SELECT "Series" FROM table_2493 WHERE "Position" = '12th' | wikisql |
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.JCZBJGDL, jyjgzbb.JCZBJGDW 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 = jy... | css |
CREATE TABLE table_64577 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" real,
"Water (sqmi)" real,
"Latitude" real,
"Longitude" real,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT MIN("Land ( sqmi )") FROM table_64577 WHERE "GEO ID" < '3800587900' | wikisql |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE 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,
... | SELECT t_kc21.MAIN_COND_DES FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '76565041487' | css |
CREATE TABLE hosting_city (
year number,
match_id number,
host_city text
)
CREATE TABLE match (
match_id number,
date text,
venue text,
score text,
result text,
competition text
)
CREATE TABLE city (
city_id number,
city text,
hanzi text,
hanyu_pinyin text,
regi... | SELECT city FROM city WHERE regional_population > 10000000 | spider |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNotices (
Id number... | SELECT DISTINCT u.Id, DisplayName, Location, AboutMe, EmailHash, AccountId FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE p.PostTypeId = 2 AND u.Location LIKE '%London%' | sede |
CREATE TABLE table_name_6 (
music VARCHAR,
style VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE MUSIC WITH SAMBA?
| SELECT music FROM table_name_6 WHERE style = "samba" | sql_create_context |
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 patient (
uniquep... | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardiomyopathy' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 's... | eicu |
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 demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "48" AND prescriptions.drug = "Psyllium" | mimicsql_data |
CREATE TABLE table_78386 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many grids for peter collins?
| SELECT COUNT("Grid") FROM table_78386 WHERE "Driver" = 'peter collins' | wikisql |
CREATE TABLE qualifying (
qualifyid number,
raceid number,
driverid number,
constructorid number,
number number,
position number,
q1 text,
q2 text,
q3 text
)
CREATE TABLE races (
raceid number,
year number,
round number,
circuitid number,
name text,
date text... | SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = ... | spider |
CREATE TABLE team (
team_id number,
name text
)
CREATE TABLE country (
country_id number,
country_name text,
capital text,
official_native_language text
)
CREATE TABLE player (
player_id number,
player text,
years_played text,
total_wl text,
singles_wl text,
doubles_wl ... | SELECT position, COUNT(*) FROM match_season GROUP BY position | spider |
CREATE TABLE zyb (
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 qtb.IN_HOSP_DAYS FROM qtb WHERE qtb.MED_CLINIC_ID = '59835005196' UNION SELECT gyb.IN_HOSP_DAYS FROM gyb WHERE gyb.MED_CLINIC_ID = '59835005196' UNION SELECT zyb.IN_HOSP_DAYS FROM zyb WHERE zyb.MED_CLINIC_ID = '59835005196' UNION SELECT mzb.IN_HOSP_DAYS FROM mzb WHERE mzb.MED_CLINIC_ID = '59835005196' | css |
CREATE TABLE table_34253 (
"interval name" text,
"size (steps)" real,
"size (cents)" real,
"just ratio" text,
"just (cents)" real,
"error" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ratio of 15:14, and a just (cents) larger than 119.44 is wh... | SELECT AVG("size (cents)") FROM table_34253 WHERE "just ratio" = '15:14' AND "just (cents)" > '119.44' | wikisql |
CREATE TABLE train_station (
train_id number,
station_id number
)
CREATE TABLE station (
station_id number,
name text,
annual_entry_exit number,
annual_interchanges number,
total_passengers number,
location text,
main_services text,
number_of_platforms number
)
CREATE TABLE tra... | SELECT name, location FROM station ORDER BY annual_entry_exit, annual_interchanges | spider |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND diagnoses.short_title = "Enthesopathy of hip" | mimicsql_data |
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of the n... | SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY COUNT(T2.Name) | nvbench |
CREATE TABLE table_5218 (
"Variant id" text,
"5\u2019UTR splice" text,
"Coding" text,
"3\u2019UTR sequence" text,
"GenBank id" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Coding has a 3 UTR sequence of 6a 4 with a GenBank id of hq021439?
| SELECT "Coding" FROM table_5218 WHERE "3\u2019UTR sequence" = '6a 4' AND "GenBank id" = 'hq021439' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Road, COUNT(ACC_Road) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC | nvbench |
CREATE TABLE table_44886 (
"Round" real,
"Pick" real,
"Position" text,
"Nationality" text,
"College/Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is College/Team, when Round is less than 2, and when Nationality is 'United States'?
| SELECT "College/Team" FROM table_44886 WHERE "Round" < '2' AND "Nationality" = 'united states' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number... | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-10951') AND NOT patient.admissionheight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', ... | eicu |
CREATE TABLE table_name_47 (
class__old__to_1868 VARCHAR,
quantity INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Class (old) to 1868 that has the Quantity larger than 8?
| SELECT class__old__to_1868 FROM table_name_47 WHERE quantity > 8 | sql_create_context |
CREATE TABLE table_79520 (
"Title" text,
"Series" text,
"Director" text,
"Production Number" real,
"Release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was Wet Hare, directed by Robert McKimson, released?
| SELECT "Release date" FROM table_79520 WHERE "Director" = 'robert mckimson' AND "Title" = 'wet hare' | wikisql |
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '21438648' AND t_kc22.STA_DATE BETWEEN '2011-11-13' AND '2012-06-11' AND t_kc21.MED_SER_ORG_NO = '7566807' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType ORDER BY bedType DESC | nvbench |
CREATE TABLE table_26201 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's Doug Borden's position?
| SELECT "Position" FROM table_26201 WHERE "Player" = 'Doug Borden' | wikisql |
CREATE TABLE table_name_59 (
against VARCHAR,
venue VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Against that were played in the H Venue on 26 february 1949?
| SELECT COUNT(against) FROM table_name_59 WHERE venue = "h" AND date = "26 february 1949" | sql_create_context |
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 JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '3701997' AND BGRQ BETWEEN '2001-05-22' AND '2007-11-06' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) DESC | css |
CREATE TABLE table_57284 (
"Rank" real,
"Name" text,
"Nationality" text,
"Team" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Cumulative point total for all teams playing on the Discovery Channel?
| SELECT COUNT("Points") FROM table_57284 WHERE "Team" = 'discovery channel' | wikisql |
CREATE TABLE table_train_112 (
"id" int,
"systolic_blood_pressure_sbp" int,
"modified_geriatric_depression_scale_gds" int,
"diastolic_blood_pressure_dbp" int,
"rosen_modified_hachinski_ischemic_score" int,
"body_mass_index_bmi" float,
"hypertension" bool,
"NOUSE" float
)
-- Using valid... | SELECT * FROM table_train_112 WHERE rosen_modified_hachinski_ischemic_score >= 5 | criteria2sql |
CREATE TABLE table_1558 (
"Team" text,
"Average" text,
"Points" real,
"Played" real,
"1991-92" text,
"1992-93" text,
"1993-94" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the average is 1991-92 is 39
| SELECT "Average" FROM table_1558 WHERE "1991-92" = '39' | wikisql |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'C83.461' AND jyjgzbb.JCZBMC = '氨基末端B型利钠... | css |
CREATE TABLE addresses (
address_id number,
line_1_number_building text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE customer_payments (
customer_id number,
datetime_payment time,
payment_method_code text,
amount_payment number
)
CREATE... | SELECT SUM(lesson_time) FROM lessons AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" | spider |
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 treatment (
treat... | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '008-10139' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | eicu |
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 admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,... | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'urea nitrogen') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60136 AND admissions.dischtime IS NULL) | mimic_iii |
CREATE TABLE table_train_108 (
"id" int,
"mini_mental_state_examination_mmse" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"deficiency_to_iga" bool,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"NOUSE" float
)
-- Using valid SQLite, answer t... | SELECT * FROM table_train_108 WHERE systolic_blood_pressure_sbp >= 180 OR diastolic_blood_pressure_dbp >= 105 | criteria2sql |
CREATE TABLE table_26335424_86 (
event VARCHAR,
round_of_32 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If round of 32 is sawatvilay phimmasone ( lao ) w pts 9-7, what was the event?
| SELECT event FROM table_26335424_86 WHERE round_of_32 = "Sawatvilay Phimmasone ( LAO ) W PTS 9-7" | sql_create_context |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDis... | SELECT Id AS "user_link", Reputation, Age, CreationDate, LastAccessDate FROM Users WHERE Age = @age ORDER BY Reputation DESC LIMIT 100 | sede |
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 semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'SPANISH' AND course.number = 113 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1 | advising |
CREATE TABLE authorship (
authid number,
instid number,
paperid number,
authorder number
)
CREATE TABLE authors (
authid number,
lname text,
fname text
)
CREATE TABLE papers (
paperid number,
title text
)
CREATE TABLE inst (
instid number,
name text,
country text
)
-... | SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "Indiana University" | spider |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopi... | SELECT q.Id AS "post_link", q.Score, q.ViewCount, q.AnswerCount FROM Posts AS q WHERE q.PostTypeId = 1 AND q.ClosedDate IS NULL ORDER BY q.AnswerCount, q.ViewCount DESC | sede |
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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "81" AND prescriptions.formulary_drug_cd = "PRISMAB32K25000" | mimicsql_data |
CREATE TABLE city (
City_ID int,
City text,
Hanzi text,
Hanyu_Pinyin text,
Regional_Population int,
GDP real
)
CREATE TABLE match (
Match_ID int,
Date text,
Venue text,
Score text,
Result text,
Competition text
)
CREATE TABLE temperature (
City_ID int,
Jan real,... | SELECT Competition, COUNT(*) FROM match GROUP BY Competition | nvbench |
CREATE TABLE table_54748 (
"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.
-- When did the person who died on 6 Dec 1240 get mar... | SELECT "Marriage" FROM table_54748 WHERE "Death" = '6 dec 1240' | wikisql |
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID... | SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID | nvbench |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2195" AND lab.label = "Urobilinogen" | mimicsql_data |
CREATE TABLE table_34158 (
"Barangay" text,
"Population (2010)" real,
"Economic Class" text,
"Land Area (In sqm.)" real,
"Punong Barangay (Term 2010-2013)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Economic Class has a Barangay of imelda ... | SELECT "Economic Class" FROM table_34158 WHERE "Barangay" = 'imelda bliss village' | wikisql |
CREATE TABLE table_name_6 (
score VARCHAR,
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Australia's score when Peter Lonard played?
| SELECT score FROM table_name_6 WHERE country = "australia" AND player = "peter lonard" | sql_create_context |
CREATE TABLE table_name_5 (
country VARCHAR,
client VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country did the client Agiba-agip work in?
| SELECT country FROM table_name_5 WHERE client = "agiba-agip" | sql_create_context |
CREATE TABLE table_61413 (
"Letter" text,
"American" text,
"British" text,
"Australian" text,
"Examples" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Australian letter with a British of and a letter of /i/??
| SELECT "Australian" FROM table_61413 WHERE "British" = 'ɪ' AND "Letter" = 'æ /i/' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT MAX(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 68280)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'fol... | mimic_iii |
CREATE TABLE table_name_27 (
runner_up VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the runner-up from Milwaukee?
| SELECT runner_up FROM table_name_27 WHERE city = "milwaukee" | sql_create_context |
CREATE TABLE table_name_40 (
rank INTEGER,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In 1950 what is the average rank?
| SELECT AVG(rank) FROM table_name_40 WHERE year = 1950 | sql_create_context |
CREATE TABLE table_name_34 (
nationality VARCHAR,
position VARCHAR,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality of the guard for the chool/Club Team in Virginia?
| SELECT nationality FROM table_name_34 WHERE position = "guard" AND school_club_team = "virginia" | sql_create_context |
CREATE TABLE table_name_66 (
rank VARCHAR,
total VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank of the country with total more than 3 and more than 6 silver?
| SELECT rank FROM table_name_66 WHERE total > 3 AND silver > 6 | sql_create_context |
CREATE TABLE table_name_49 (
method VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the method used when the time was 4:52?
| SELECT method FROM table_name_49 WHERE time = "4:52" | sql_create_context |
CREATE TABLE table_2955 (
"Vehicle" text,
"Operating mode" text,
"EPA rated All-electric range" text,
"EPA rated combined fuel economy" text,
"Clean electric grid California (San Francisco)" text,
"U.S. national average electric mix" text,
"Dirty electric grid Rocky Mountains (Denver)" text
... | SELECT "EPA rated combined fuel economy" FROM table_2955 WHERE "Vehicle" = 'Nissan Leaf' | wikisql |
CREATE TABLE table_name_2 (
proto_germanic_origin VARCHAR,
sound__phoneme_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Proto-Germanic origin of the phoneme /[[|j]]/?
| SELECT proto_germanic_origin FROM table_name_2 WHERE sound__phoneme_ = "/[[|j]]/" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND demographic.age < "85" | mimicsql_data |
CREATE TABLE table_5847 (
"Year Ended" text,
"Passengers Flown" real,
"Passenger Load Factor (%)" real,
"Revenue (\u20acm)" real,
"Profit / (Loss) Before Tax (\u20acm)" text,
"Net Profit / (Loss) (\u20acm)" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "Year Ended" FROM table_5847 WHERE "Passenger Load Factor (%)" > '72.8' AND "Revenue (\u20acm)" < '906.8' | wikisql |
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 t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =... | eicu |
CREATE TABLE table_24087 (
"County" text,
"Won by" text,
"Walker %" real,
"Walker votes" real,
"Barrett %" real,
"Barrett votes" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many total figures are given for Milwaukee county?
| SELECT COUNT("Won by") FROM table_24087 WHERE "County" = 'Milwaukee' | wikisql |
CREATE TABLE table_name_10 (
others VARCHAR,
szdsz VARCHAR,
fidesz VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of others have an SZDSZ of 4% and a Fidesz of 60%?
| SELECT others FROM table_name_10 WHERE szdsz = "4%" AND fidesz = "60%" | sql_create_context |
CREATE TABLE table_23831 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (in millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many millions of peop... | SELECT "U.S. viewers (in millions)" FROM table_23831 WHERE "Title" = 'The Reunion Job' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND 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.JZL... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
... | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '11219115' | css |
CREATE TABLE table_name_10 (
supercopa_1994 VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Supercopa 1994 has a Team of estudiantes?
| SELECT supercopa_1994 FROM table_name_10 WHERE team = "estudiantes" | sql_create_context |
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor | nvbench |
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For e... | SELECT rID, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY rID | nvbench |
CREATE TABLE table_69190 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the record 2 1?
| SELECT "Date" FROM table_69190 WHERE "Record" = '2–1' | wikisql |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | SELECT patients.gender FROM patients WHERE patients.subject_id = 97734 | mimic_iii |
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 Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
... | SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType ORDER BY COUNT(*) | nvbench |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZ... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND 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 ... | css |
CREATE TABLE table_24490 (
"Week of" text,
"Tournament" text,
"Champion" text,
"Runner-up" text,
"Semifinalists" text,
"Quarterfinalists" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the quarterfinalists for the runner-ups of mike de ... | SELECT "Quarterfinalists" FROM table_24490 WHERE "Runner-up" = 'Mike De Palmer Gary Donnelly' | wikisql |
CREATE TABLE table_name_38 (
theme VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the theme for week 3?
| SELECT theme FROM table_name_38 WHERE week = "week 3" | sql_create_context |
CREATE TABLE table_name_59 (
year VARCHAR,
artist VARCHAR,
weeks_at_number_one VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the sum of years when the Artist of the queen were less than 1?
| SELECT COUNT(year) FROM table_name_59 WHERE artist = "queen" AND weeks_at_number_one < 1 | sql_create_context |
CREATE TABLE Affiliated_With (
Physician INTEGER,
Department INTEGER,
PrimaryAffiliation BOOLEAN
)
CREATE TABLE Appointment (
AppointmentID INTEGER,
Patient INTEGER,
PrepNurse INTEGER,
Physician INTEGER,
Start DATETIME,
End DATETIME,
ExaminationRoom TEXT
)
CREATE TABLE Patient ... | SELECT T1.Name, COUNT(*) FROM Physician AS T1 JOIN Patient AS T2 ON T1.EmployeeID = T2.PCP GROUP BY T1.EmployeeID ORDER BY T1.Name | nvbench |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.long_title = "Laryngoscopy and other tracheoscopy" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.