instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_34301 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the school/club team of the player with a pick larger than 83?
| SELECT "School/Club Team" FROM table_34301 WHERE "Pick" > '83' | wikisql |
CREATE TABLE table_name_86 (
res VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The match against Mark Hunt had what result?
| SELECT res FROM table_name_86 WHERE opponent = "mark hunt" | sql_create_context |
CREATE TABLE table_33273 (
"Rank by average" real,
"Place" real,
"Couple" text,
"Total points" real,
"Number of dances" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many dances placed below 1 with a point total of 40?
| SELECT "Number of dances" FROM table_33273 WHERE "Place" > '1' AND "Total points" = '40' | wikisql |
CREATE TABLE table_name_59 (
year_named VARCHAR,
diameter__km_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the year when the diameter was 729 km?
| SELECT year_named FROM table_name_59 WHERE diameter__km_ = 729 | sql_create_context |
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 COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '姜新蕾' AND t_kc22.STA_DATE BETWEEN '2015-04-19' AND '2016-11-01' AND t_kc22.t_kc21_MED_SER_ORG_NO = '5035211' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE table_17510803_2 (
points_against VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points against have a lose of 13?
| SELECT points_against FROM table_17510803_2 WHERE lost = "13" | sql_create_context |
CREATE TABLE table_77368 (
"Movie Title" text,
"Year" real,
"Role" text,
"Director" text,
"Producer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was Sam Kazman a producer?
| SELECT "Year" FROM table_77368 WHERE "Producer" = 'sam kazman' | wikisql |
CREATE TABLE Departments (
department_id INTEGER,
dept_store_id INTEGER,
department_name VARCHAR(80)
)
CREATE TABLE Supplier_Addresses (
supplier_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_gender VARCHAR(1),
... | SELECT payment_method_code, COUNT(*) FROM Customers GROUP BY payment_method_code ORDER BY COUNT(*) | nvbench |
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 MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '朱修德' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT <= 2100.78) | css |
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 * FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23061) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-44 month') GROUP BY prescriptions.dru... | mimic_iii |
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 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.IN_DIAG_DIS_CD = 'Y43.350' | css |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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
)
CR... | 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, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii |
CREATE TABLE table_name_63 (
high_assists VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the most assists in the game that led to a 3-7 record?
| SELECT high_assists FROM table_name_63 WHERE record = "3-7" | sql_create_context |
CREATE TABLE table_name_29 (
associate_professors INTEGER,
assistant_professors VARCHAR,
professors VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of associate professors when there are more than 5 assistant professors and fewe... | SELECT MAX(associate_professors) FROM table_name_29 WHERE assistant_professors > 5 AND professors < 14 | sql_create_context |
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(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_43029 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Silver when Bronze was smaller than 1 with a total smaller than ... | SELECT COUNT("Silver") FROM table_43029 WHERE "Bronze" < '1' AND "Total" < '2' AND "Nation" = 'bulgaria' | wikisql |
CREATE TABLE table_30233 (
"Week #" real,
"Dance/song" text,
"Horwood" text,
"Goodman" text,
"Dixon" text,
"Tonioli" text,
"Total" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On week 11 when Dixon scored an 8, what was ... | SELECT "Tonioli" FROM table_30233 WHERE "Week #" = '11' AND "Dixon" = '8' | wikisql |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
... | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 GROUP BY date ORDER BY date | 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 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 person_info.XM = '郎灵韵' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2020-11-21') | css |
CREATE TABLE table_68598 (
"Outcome" text,
"Year" real,
"Tournament" text,
"Partner" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What score has an opponent gan teik chai lin woon fui?
| SELECT "Score" FROM table_68598 WHERE "Opponent" = 'gan teik chai lin woon fui' | wikisql |
CREATE TABLE table_name_70 (
place__posición_ INTEGER,
points__pts_ VARCHAR,
goals_scored__gf_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the places of the team with more than 49 points and less than 54 goals scored?
| SELECT SUM(place__posición_) FROM table_name_70 WHERE points__pts_ > 49 AND goals_scored__gf_ < 54 | sql_create_context |
CREATE TABLE table_33178 (
"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.
-- What is the away team score when the away team i... | SELECT "Away team score" FROM table_33178 WHERE "Away team" = 'essendon' | wikisql |
CREATE TABLE table_1013129_3 (
nationality VARCHAR,
nhl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality of the player from Vancouver Canucks?
| SELECT nationality FROM table_1013129_3 WHERE nhl_team = "Vancouver Canucks" | sql_create_context |
CREATE TABLE table_13498 (
"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 MAX("Longitude") FROM table_13498 WHERE "County" = 'mountrail' AND "Water (sqmi)" < '0.075' | wikisql |
CREATE TABLE table_24896 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT "Directed by" FROM table_24896 WHERE "Written by" = 'Cherry Chevapravatdumrong' | wikisql |
CREATE TABLE table_name_76 (
points VARCHAR,
record VARCHAR,
march VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Points have a Record of 40 21 12 3, and a March larger than 28?
| SELECT COUNT(points) FROM table_name_76 WHERE record = "40–21–12–3" AND march > 28 | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE hz_info (
KH text,
KLX number... | (SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN 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.JZLSH_MZJZJLB AND jybgb.YLJGDM =... | css |
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 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 = "Angio oth non-coronary" | mimicsql_data |
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 STATE_PROVINCE, COUNT(STATE_PROVINCE) FROM locations GROUP BY STATE_PROVINCE ORDER BY STATE_PROVINCE | nvbench |
CREATE TABLE table_name_20 (
event VARCHAR,
method VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event name when the method is submission (brabo choke)?
| SELECT event FROM table_name_20 WHERE method = "submission (brabo choke)" | sql_create_context |
CREATE TABLE table_name_53 (
round VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Round, when Record is '4-1'?
| SELECT round FROM table_name_53 WHERE record = "4-1" | sql_create_context |
CREATE TABLE table_26831 (
"Series" real,
"Season" text,
"Original air date" text,
"Production code" text,
"Episode title" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What original air date was for the episode with production code of 108?
| SELECT "Original air date" FROM table_26831 WHERE "Production code" = '108' | wikisql |
CREATE TABLE table_name_80 (
remixed_by VARCHAR,
version VARCHAR,
album VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Remixed by has a Version of album version, and an Album of les mots?
| SELECT remixed_by FROM table_name_80 WHERE version = "album version" AND album = "les mots" | sql_create_context |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE table_4499 (
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Report of Winning Team Penske Racing, and what was R... | SELECT "Report" FROM table_4499 WHERE "Winning team" = 'penske racing' AND "Pole Position" = 'rick mears' | wikisql |
CREATE TABLE table_49458 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Original airdate of the episode after Season 6 Direct... | SELECT "Original airdate" FROM table_49458 WHERE "Directed by" = 'erik wiese' AND "Season #" > '6' | wikisql |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT zyjzjlb.JZLSH 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 = '08218858' AND NOT zyjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ <= '2020-10-17') | css |
CREATE TABLE table_69645 (
"Tournament" text,
"Date" text,
"Surface" text,
"Round" text,
"Opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for grass surface for quarterfinal at the nsw building society open tournament
| SELECT "Date" FROM table_69645 WHERE "Surface" = 'grass' AND "Round" = 'quarterfinal' AND "Tournament" = 'nsw building society open' | wikisql |
CREATE TABLE table_name_99 (
hs_principal VARCHAR,
wr_principal VARCHAR,
ms_principal VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the h.s. principal with Dave Lovering as w.r. principal and Marty Pizur as m.s. principal?
| SELECT hs_principal FROM table_name_99 WHERE wr_principal = "dave lovering" AND ms_principal = "marty pizur" | sql_create_context |
CREATE TABLE player_award_vote (
award_id text,
year number,
league_id text,
player_id text,
points_won number,
points_max number,
votes_first text
)
CREATE TABLE player (
player_id text,
birth_year text,
birth_month text,
birth_day text,
birth_country text,
birth_st... | SELECT AVG(T2.salary) FROM salary AS T2 JOIN hall_of_fame AS T1 ON T1.player_id = T2.player_id WHERE T1.inducted = "N" | thehistoryofbaseball |
CREATE TABLE table_28211988_4 (
mens_doubles VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the winners of the mens doubles in the season of 1963/64.
| SELECT mens_doubles FROM table_28211988_4 WHERE season = "1963/64" | sql_create_context |
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 AVG(demographic.days_stay) FROM demographic WHERE demographic.dod_year < "2174.0" | mimicsql_data |
CREATE TABLE table_37234 (
"Storm name" text,
"Dates active" text,
"Max 1-min wind mph (km/h)" text,
"Min. press. ( mbar )" text,
"Damage (millions USD )" text,
"Deaths" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the damage of storm ... | SELECT "Damage (millions USD )" FROM table_37234 WHERE "Storm name" = 'three' | wikisql |
CREATE TABLE fgwyjzb (
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 gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_CD, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5766627' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_CD UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.IN_DIAG_DIS_CD, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '57666... | css |
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TABLE people (
People_ID int,
Age int,
Name text,
Nationality text,
Grad... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'vomiting' AND DATETIME(diagnosis.diagnosisti... | eicu |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.B... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.label = "Triglycer" | mimicsql_data |
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 MED_INV_ITEM_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '66824026743' AND SOC_SRT_DIRE_CD = '6637' | css |
CREATE TABLE table_name_38 (
agg VARCHAR,
team_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Agg., when Team 1 was VSADC?
| SELECT agg FROM table_name_38 WHERE team_1 = "vsadc" | sql_create_context |
CREATE TABLE table_15582870_1 (
college VARCHAR,
weight VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which college did the player weighing 207 pounds attend?
| SELECT college FROM table_15582870_1 WHERE weight = 207 | sql_create_context |
CREATE TABLE table_18852984_2 (
all_bills_sponsored INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the greatest number of bills sponsored in any year?
| SELECT MAX(all_bills_sponsored) FROM table_18852984_2 | sql_create_context |
CREATE TABLE table_name_81 (
attendance VARCHAR,
date VARCHAR,
week VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance on November 3, 1968, that was a week smaller than 8?
| SELECT COUNT(attendance) FROM table_name_81 WHERE date = "november 3, 1968" AND week < 8 | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Enterovesico fist repair" | mimicsql_data |
CREATE TABLE table_24729_2 (
torque VARCHAR,
co2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- whe, co2 is 206g/km, what is the torque?
| SELECT torque FROM table_24729_2 WHERE co2 = "206g/km" | sql_create_context |
CREATE TABLE table_22043925_1 (
school VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every school for the Adelaide location?
| SELECT school FROM table_22043925_1 WHERE location = "Adelaide" | sql_create_context |
CREATE TABLE table_name_80 (
year VARCHAR,
best_film VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year has a Best Film of mystery?
| SELECT year FROM table_name_80 WHERE best_film = "mystery" | sql_create_context |
CREATE TABLE table_47069 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the highest Gold that has the Bronze smaller than 1, and the Total larger th... | SELECT MAX("Gold") FROM table_47069 WHERE "Bronze" < '1' AND "Total" > '4' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_i... | css |
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 * FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '15178768259' AND NOT t_kc22.MED_ORG_DEPT_NM LIKE '%运动%' | css |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Sebaceous cyst" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC te... | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH ... | css |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND lab.itemid = "51419" | mimicsql_data |
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_Percent, All_Games_Percent FROM basketball_match GROUP BY ACC_Road | nvbench |
CREATE TABLE table_7306 (
"Place" real,
"Team" text,
"Played" real,
"Draw" real,
"Lost" real,
"Goals Scored" real,
"Goals Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average for games Lost where th... | SELECT AVG("Lost") FROM table_7306 WHERE "Points" = '25' AND "Played" > '18' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-52605')) AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(... | eicu |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDa... | SELECT v.PostId AS "post_link", p.CreationDate AS "Date", p.ViewCount AS "Views", COUNT(v.PostId) AS "Vote count" FROM Votes AS v INNER JOIN Posts AS p ON p.Id = v.PostId WHERE PostTypeId = 1 AND v.VoteTypeId IN (2, 3) AND p.CreationDate >= '2010-01-01' GROUP BY v.PostId, p.ViewCount, p.CreationDate ORDER BY Date DESC | sede |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... | SELECT Year, AVG(Price) FROM wine GROUP BY Year ORDER BY Year DESC | nvbench |
CREATE TABLE table_name_12 (
date VARCHAR,
visitor VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the visitor chicago black hawks, and a Record of 1-1?
| SELECT date FROM table_name_12 WHERE visitor = "chicago black hawks" AND record = "1-1" | sql_create_context |
CREATE TABLE shop (
address VARCHAR,
open_year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the shop addresses ordered by their opening year.
| SELECT address FROM shop ORDER BY open_year | sql_create_context |
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 AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.age >= "30" | mimicsql_data |
CREATE TABLE table_28837 (
"Place" real,
"Nation" text,
"played" real,
"won" real,
"drawn" real,
"lost" real,
"for" real,
"against" real,
"difference" real,
"Table points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHat is th... | SELECT MAX("difference") FROM table_28837 | wikisql |
CREATE TABLE table_204_634 (
id number,
"tour" number,
"official title" text,
"venue" text,
"city" text,
"date\nstart" text,
"date\nfinish" text,
"prize money\nusd" number,
"report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what... | SELECT SUM("prize money\nusd") FROM table_204_634 | squall |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND procedures.icd9_code = "3723" | mimicsql_data |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,... | SELECT Tags.TagName, COUNT(Posts.Id) AS "Count" FROM Posts INNER JOIN PostTags AS PT ON Posts.Id = PT.PostId INNER JOIN Tags ON Tags.Id = PT.TagId WHERE Posts.Id IN (SELECT PT.PostId FROM PostTags AS PT WHERE PT.TagId = @tagId) AND Tags.Id != @tagId GROUP BY Tags.TagName ORDER BY 'Count' DESC | sede |
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '邹正初' AND t_kc22.STA_DATE BETWEEN '2015-03-28' AND '2019-07-23' AND t_kc21.MED_SER_ORG_NO = '0625386' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Mal neo descend colon" AND prescriptions.drug_type = "MAIN" | mimicsql_data |
CREATE TABLE table_name_94 (
country VARCHAR,
total VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country has a total greater than 270, with sandy lyle as the player?
| SELECT country FROM table_name_94 WHERE total > 270 AND player = "sandy lyle" | sql_create_context |
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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS va... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(SALARY) | nvbench |
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 Team_ID, School_ID FROM basketball_match GROUP BY All_Neutral | nvbench |
CREATE TABLE table_name_45 (
country VARCHAR,
moving_from VARCHAR,
transfer_window VARCHAR,
ends VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the country that has a transfer window of winter with an end after 2009 and moving fro... | SELECT country FROM table_name_45 WHERE transfer_window = "winter" AND ends > 2009 AND moving_from = "bolton wanderers" | sql_create_context |
CREATE TABLE table_name_14 (
rowers VARCHAR,
notes VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which rowers represented portugal and had notes of r?
| SELECT rowers FROM table_name_14 WHERE notes = "r" AND country = "portugal" | sql_create_context |
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.diagnosis, demographic.dischtime FROM demographic WHERE demographic.subject_id = "7273" | mimicsql_data |
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN 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.JZLSH_MZJZJLB ... | css |
CREATE TABLE table_10128 (
"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.
-- How many people were in the crowd for a game tha... | SELECT "Crowd" FROM table_10128 WHERE "Away team" = 'carlton' | wikisql |
CREATE TABLE table_name_12 (
year INTEGER,
runner_s__up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the most recent year that Kathy Ahern was a runner-up?
| SELECT MAX(year) FROM table_name_12 WHERE runner_s__up = "kathy ahern" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CRE... | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-47098')) AND diagnosis.diagnosisname = 'valve replacement >= ... | eicu |
CREATE TABLE table_22972 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT MIN("No. in series") FROM table_22972 WHERE "U.S. viewers (millions)" = '9.35' | wikisql |
CREATE TABLE table_name_6 (
partner VARCHAR,
championship VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the partner at the Australian Open, Melbourne when the score was 2 6, 7 5, 6 2, 4 6, 3 6?
| SELECT partner FROM table_name_6 WHERE championship = "australian open, melbourne" AND score = "2–6, 7–5, 6–2, 4–6, 3–6" | sql_create_context |
CREATE TABLE table_49532 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the score when the partner is florencia labat, the su... | SELECT "Score" FROM table_49532 WHERE "Partner" = 'florencia labat' AND "Surface" = 'clay' AND "Opponents" = 'laura golarsa ann grossman' | wikisql |
CREATE TABLE table_name_92 (
season VARCHAR,
division_two VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Season was the Division Two Fownhope Reserves champions?
| SELECT season FROM table_name_92 WHERE division_two = "fownhope reserves" | 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_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '何戈雅' AND t_kc22.STA_DATE BETWEEN '2017-10-15' AND '2021-06-04' AND t_kc22.SELF_PAY_AMO > 6729.65 | css |
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 SUM(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.PERSON_NM = '张昊焱' AND t_kc21.CLINIC_TYPE = '门诊' | css |
CREATE TABLE building (
name VARCHAR,
height_feet VARCHAR,
floors VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of buildings with at least 200 feet of height and with at least 20 floors.
| SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20 | sql_create_context |
CREATE TABLE table_40998 (
"Name" text,
"Number" real,
"Position" text,
"Year" text,
"Hometown" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the position of the person whose hometown is Queens, NY?
| SELECT "Position" FROM table_40998 WHERE "Hometown" = 'queens, ny' | wikisql |
CREATE TABLE table_15315276_1 (
tournament_location VARCHAR,
champion VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the tournament located when Misun Cho won the championship?
| SELECT tournament_location FROM table_15315276_1 WHERE champion = "Misun Cho" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" AND procedures.short_title = "Ven cath renal dialysis" | 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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE admissions (
... | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'oth transureth prostatec')) GROUP BY cost.hadm_id) AS t1 | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.