context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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,
... | 从2003年4月15日到2018年9月15日,患者柳秀敏在检测指标235794上的情况 | SELECT * 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.JZLSH_MZJZJLB AND jybgb.YLJG... | css |
CREATE TABLE table_72453 (
"District" text,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text,
"2007 Result" text
) | How many times was incumbent onzlee ware elected? | SELECT COUNT("Elected") FROM table_72453 WHERE "Incumbent" = 'Onzlee Ware' | wikisql |
CREATE TABLE table_49238 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
) | What is the lowest Pick #, when College is 'Louisville', and when Round is less than 10? | SELECT MIN("Pick #") FROM table_49238 WHERE "College" = 'louisville' AND "Round" < '10' | wikisql |
CREATE TABLE table_76014 (
"Date" text,
"Name" text,
"Nationality" text,
"Tonnage (GRT)" real,
"Fate" text
) | What is the nationality of the HMS Cheshire? | SELECT "Nationality" FROM table_76014 WHERE "Name" = 'hms cheshire' | wikisql |
CREATE TABLE table_6246 (
"Windows" text,
"Mac OS X" text,
"Linux" text,
"Other Unix" text,
"AmigaOS" text,
"Android" text,
"Windows Mobile" text
) | Which Mac OS X has a Linux of no, and an AmigaOS of no, and an Android of unknown? | SELECT "Mac OS X" FROM table_6246 WHERE "Linux" = 'no' AND "AmigaOS" = 'no' AND "Android" = 'unknown' | 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_DIRE_CD text,
MED_DIRE_NM text,... | 编号02885209981的医疗就诊中,稳心颗粒开出的医疗发票,项目类别这一栏填的是什么 | SELECT t_kc22.MED_INV_ITEM_TYPE 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 = '02885209981' AND t_kc22.SOC_SRT_DIRE_NM = '稳心颗粒' | css |
CREATE TABLE table_name_53 (
municipality VARCHAR,
station VARCHAR
) | What municipality is the Benson Street station located in? | SELECT municipality FROM table_name_53 WHERE station = "benson street" | sql_create_context |
CREATE TABLE table_32346 (
"Rank" real,
"Player" text,
"Nation" text,
"Shutouts" real,
"Games" real,
"Years" text
) | How many average games did Nick Rimando have? | SELECT AVG("Games") FROM table_32346 WHERE "Player" = 'nick rimando' | 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,
... | 统筹基金支出在医疗就诊59578409484中的占医疗费总额比例是多些? | SELECT (SELECT t_kc24.OVE_PAY FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '59578409484') / (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID = '59578409484') | css |
CREATE TABLE table_53054 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
) | How many attended the game on april 14? | SELECT COUNT("Attendance") FROM table_53054 WHERE "Date" = 'april 14' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
r... | did patient 86404 have any medication since 2101? | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 86404) AND STRFTIME('%y', prescriptions.startdate) >= '2101' | mimic_iii |
CREATE TABLE table_78301 (
"Player" text,
"Position" text,
"Date of Birth (Age)" text,
"Caps" real,
"Club/province" text
) | Which player Munster from Munster is a fly-half? | SELECT "Player" FROM table_78301 WHERE "Position" = 'fly-half' AND "Club/province" = 'munster' | wikisql |
CREATE TABLE table_35241 (
"Year" real,
"Class" text,
"Team" text,
"Machine" text,
"Points" real,
"Wins" real
) | What Class has 36 Points? | SELECT "Class" FROM table_35241 WHERE "Points" = '36' | 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... | 参照医疗就诊37228773011找出与其医疗总花费相同的患者的医疗就诊记录的ID、人员ID以及他们的姓名、公民身份号码、性别和年龄的具体信息? | SELECT qtb.MED_CLINIC_ID, qtb.PERSON_ID, qtb.PERSON_NM, qtb.IDENTITY_CARD, qtb.PERSON_SEX, qtb.PERSON_AGE FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '37228773011') UNION SELECT gyb.MED_CLINIC_ID, gyb.PERSON_... | css |
CREATE TABLE table_name_97 (
place VARCHAR,
country VARCHAR
) | What place did the player from South Africa finish? | SELECT place FROM table_name_97 WHERE country = "south africa" | sql_create_context |
CREATE TABLE table_name_8 (
event VARCHAR,
name VARCHAR
) | What event did Rashid Sidek participate in? | SELECT event FROM table_name_8 WHERE name = "rashid sidek" | sql_create_context |
CREATE TABLE table_203_657 (
id number,
"call sign" text,
"frequency" text,
"city of license" text,
"licensee" text,
"format" text
) | does grand junction or montrose have more stations ? | SELECT "city of license" FROM table_203_657 WHERE "city of license" IN ('grand junction', 'montrose') GROUP BY "city of license" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_13372 (
"Event" text,
"Record" text,
"Nationality" text,
"Date" text,
"Games" text
) | What is the Date of the athlete in the shot put Event? | SELECT "Date" FROM table_13372 WHERE "Event" = 'shot put' | wikisql |
CREATE TABLE table_204_693 (
id number,
"place" text,
"total" number,
"men" number,
"women" number,
"children" number,
"elderly" number,
"serbs" number,
"jews" number,
"romani" number,
"rusyns" number,
"hungarians" number,
"russians" number
) | how many victims in becej were children and the elderly ? | SELECT "children" + "elderly" FROM table_204_693 WHERE "place" = 'becej' | squall |
CREATE TABLE table_2338 (
"School" text,
"Main location" text,
"Control" text,
"Type" text,
"Enrollment (2005)" real,
"Founded" real
) | Name the type for mcminnville | SELECT "Type" FROM table_2338 WHERE "Main location" = 'McMinnville' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | let me know the age and procedure icd9 code for estrella carroll. | SELECT demographic.age, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Estrella Carroll" | mimicsql_data |
CREATE TABLE table_1389 (
"Frequency" text,
"Station" text,
"Operator" text,
"Language" text,
"Genre" text,
"Coverage Area" text
) | Who operates the xfm station? | SELECT "Operator" FROM table_1389 WHERE "Station" = 'XFM' | 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,... | what is the average total cost for the hospital involving a procedure called implantation of rvad since 2100? | SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'implantation of rvad')) AND STRFTIME('%y', c... | eicu |
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 COUNT(gwyjzb.IN_DIAG_DIS_CD) FROM gwyjzb WHERE gwyjzb.PERSON_NM = '郑梦露' AND gwyjzb.IN_HOSP_DATE BETWEEN '2017-07-26' AND '2018-07-24' UNION SELECT COUNT(fgwyjzb.IN_DIAG_DIS_CD) FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '郑梦露' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2017-07-26' AND '2018-07-24' | css |
CREATE TABLE table_55402 (
"Ship's name" text,
"Date entered service" text,
"Date withdrawn" text,
"Tonnage" real,
"Type of Ship" text
) | what is the name of the ship that was withdrawn from service on 25 march 1986? | SELECT "Ship's name" FROM table_55402 WHERE "Date withdrawn" = '25 march 1986' | wikisql |
CREATE TABLE table_50002 (
"Year" real,
"Championship" text,
"Winning score" text,
"Margin" text,
"Runner(s)-up" text
) | What was the winning score in the u.s. women's open that was won by 5 strokes? | SELECT "Winning score" FROM table_50002 WHERE "Championship" = 'u.s. women''s open' AND "Margin" = '5 strokes' | wikisql |
CREATE TABLE table_30613 (
"IME Exchange (Including spot, credit and forward transactions)" text,
"2007/08" text,
"2008/09" text,
"2009/10" text,
"2010/11" text
) | What is the 2007/08number when the 2010/11 is 1,633.6? | SELECT "2007/08" FROM table_30613 WHERE "2010/11" = '1,633.6' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | give the admission type and primary disease of subject id 18372. | SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "18372" | mimicsql_data |
CREATE TABLE table_49366 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
) | What is the average Laps, when Grid is 15? | SELECT AVG("Laps") FROM table_49366 WHERE "Grid" = '15' | wikisql |
CREATE TABLE table_name_49 (
score VARCHAR,
player VARCHAR
) | What did Sam Torrance score? | SELECT score FROM table_name_49 WHERE player = "sam torrance" | sql_create_context |
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,
... | 以患者看病期间去过的科室名称和出院是查出的病名的区别为前提,列出他们在9073767号医院就诊的所有医疗就诊记录里的平均年龄? | SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9073767' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '90... | css |
CREATE TABLE table_name_67 (
school VARCHAR,
height VARCHAR
) | The person with a Height of 6-8 went to which School? | SELECT school FROM table_name_67 WHERE height = "6-8" | 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... | 查查编码为20724976的病人被开出过金额不低于7866.88元的医疗记录,看看这些医疗就诊的编号 | SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '20724976' AND t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 7866.88) | css |
CREATE TABLE table_name_11 (
game INTEGER,
high_rebounds VARCHAR,
high_assists VARCHAR
) | Which game has a high rebound of Evans (7) and a high assist of Evans, Ollie (3)? | SELECT MAX(game) FROM table_name_11 WHERE high_rebounds = "evans (7)" AND high_assists = "evans, ollie (3)" | sql_create_context |
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... | 能列举出患者编号87435774在2013年5月27日到2018年10月29日内所有检验报告单中的标本搜集部位吗? | SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info 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 person_info_hz_info.KH = hz_info.KH AND pe... | css |
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,... | 查一下38345577816这个医疗就诊中,开出的所有名称中包含消炎的药品及其金额 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT 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 = '38345577816' AND t_kc22.SOC_SRT_DIRE_NM LIKE '%消炎%' | css |
CREATE TABLE railway (
Railway_ID int,
Railway text,
Builder text,
Built text,
Wheels text,
Location text,
ObjectNumber text
)
CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text... | Give me a bar chart for how many name of each name, and could you show x-axis from high to low order? | SELECT Name, COUNT(Name) FROM train GROUP BY Name ORDER BY Name DESC | nvbench |
CREATE TABLE table_203_146 (
id number,
"year" number,
"association" text,
"category" text,
"nominated work" text,
"result" text
) | jones won best actress in a play in 2005 . which other award did she win that year ? | SELECT "category" FROM table_203_146 WHERE "category" <> 'best actress in a play' AND "year" = 2005 | squall |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE icustays (
row_id number,
s... | did patient 60219 receive a inject/inf thrombo agent process until 2104? | SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject/inf thrombo agent') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60219) AND STRFTIME('%... | mimic_iii |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TAB... | Get all Users who have posted answers for a certain tag. | SELECT DISTINCT OwnerUserId FROM Posts WHERE ParentId IN (SELECT PostId FROM PostTags WHERE TagId = '5990') | sede |
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... | 询问一下患者98644163往常有过什么异常情况吗? | SELECT * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,... | what are the five most common laboratory tests patients had within 2 months after receiving a cont inv mec ven 96+ hrs treatment procedure in 2104? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, 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_i... | mimic_iii |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_fl... | i would like to know what type of aircraft will be used on the morning of 7 7 from ATLANTA to BOSTON | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, equipment_sequence, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 7 ... | atis |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) | Show the total number from each flag, and sort by the y axis in ascending. | SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY COUNT(*) | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | give me the number of patients whose insurance is medicare and procedure icd9 code is 3782? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicare" AND procedures.icd9_code = "3782" | mimicsql_data |
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,
... | 从03年6月20日直到13年8月6日这段时间内患者褚奇正被开出盐酸舍曲林片(薄膜衣)这个药品的次数共有几次? | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '褚奇正' AND t_kc22.STA_DATE BETWEEN '2003-06-20' AND '2013-08-06' AND t_kc22.SOC_SRT_DIRE_NM = '盐酸舍曲林片(薄膜衣)' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE ... | css |
CREATE TABLE table_3529 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" text
) | What is every year for joined with the Ravens nickname? | SELECT "Joined" FROM table_3529 WHERE "Nickname" = 'Ravens' | wikisql |
CREATE TABLE ftxmzjzjlb (
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDSM = '矽肺(硅肺)Ⅲ期' AND jyjgzbb.JCZBMC = ... | 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,
... | specify the drug code of patient jerry deberry | SELECT prescriptions.formulary_drug_cd FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Jerry Deberry" | mimicsql_data |
CREATE TABLE Order_Items (
item_id INTEGER,
order_item_status_code VARCHAR(15),
order_id INTEGER,
product_id INTEGER,
item_status_code VARCHAR(15),
item_delivered_datetime DATETIME,
item_order_quantity VARCHAR(80)
)
CREATE TABLE Premises (
premise_id INTEGER,
premises_type VARCHAR(1... | Show each premise type and the number of premises in that type. Visualize by bar chart. | SELECT premises_type, COUNT(*) FROM Premises GROUP BY premises_type | nvbench |
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Payments (
Payment_ID INTEGER,
S... | Tell me the trend about the claim dates using a trend line, and sort by the Date_Claim_Settled in desc. | SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements GROUP BY Date_Claim_Settled ORDER BY Date_Claim_Settled DESC | nvbench |
CREATE TABLE table_1949994_7 (
premiere_air_dates VARCHAR,
format VARCHAR
) | When did the season with 1 team format premiere? | SELECT premiere_air_dates FROM table_1949994_7 WHERE format = "1 Team" | sql_create_context |
CREATE TABLE table_24613895_1 (
number_of_believers INTEGER,
name_in_syriac VARCHAR
) | Name the most number of believers for | SELECT MAX(number_of_believers) FROM table_24613895_1 WHERE name_in_syriac = "ܓܘܝܠܢ" | sql_create_context |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
... | i need a flight leaving KANSAS CITY to CHICAGO leaving next wednesday and returning the following day | SELECT DISTINCT flight_id FROM flight WHERE (((flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 23 AND DATE_DAYalias0.month_number = 4 AND DATE_DAYalias0.year = 1991)) AND to... | atis |
CREATE TABLE files (
f_id number(10),
artist_name varchar2(50),
file_size varchar2(20),
duration varchar2(20),
formats varchar2(20)
)
CREATE TABLE song (
song_name varchar2(50),
artist_name varchar2(50),
country varchar2(20),
f_id number(10),
genre_is varchar2(20),
rating nu... | Show me a bar chart for what is the average rating of songs for each language?, order by the mean rating in ascending please. | SELECT languages, AVG(rating) FROM song GROUP BY languages ORDER BY AVG(rating) | 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... | 根据不同的科室编码和入院诊断疾病名称,列出所有医疗就诊记录在医院0314561中患者的平均年龄是多大? | SELECT MED_ORG_DEPT_CD, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '0314561' GROUP BY MED_ORG_DEPT_CD, IN_DIAG_DIS_NM | css |
CREATE TABLE table_32960 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | Which IATA is associated with China and an ICAO of ZSPD? | SELECT "IATA" FROM table_32960 WHERE "Country" = 'china' AND "ICAO" = 'zspd' | wikisql |
CREATE TABLE table_22705586_1 (
number INTEGER
) | Name the least number | SELECT MIN(number) FROM table_22705586_1 | sql_create_context |
CREATE TABLE table_name_59 (
theme VARCHAR,
week VARCHAR
) | What was the theme for the Top 11 week? | SELECT theme FROM table_name_59 WHERE week = "top 11" | sql_create_context |
CREATE TABLE table_8996 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | What is Tommy Bolt's place? | SELECT "Place" FROM table_8996 WHERE "Player" = 'tommy bolt' | wikisql |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStat... | Users with many upvoted posts, but low average score. | SELECT Id AS "post_link", Body, Score FROM Posts WHERE LENGTH(Body) < 8 | sede |
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... | 患者出院进行66169377142医疗就诊时,诊断出的疾病编号及名称是什么 | SELECT OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE MED_CLINIC_ID = '66169377142' | css |
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... | 从2004-08-29到2020-01-27,统计0855489医院的骨外科科室的医疗费总额 | SELECT SUM(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '0855489' AND MED_ORG_DEPT_NM = '骨科') AND CLINIC_SLT_DATE BETWEEN '2004-08-29' AND '2020-01-27' | css |
CREATE TABLE table_name_89 (
year INTEGER,
avg_start VARCHAR,
wins VARCHAR
) | What is the average year with an average start smaller than 6.3 and fewer than 0 wins? | SELECT AVG(year) FROM table_name_89 WHERE avg_start < 6.3 AND wins < 0 | sql_create_context |
CREATE TABLE table_50094 (
"Country" text,
"Unit p koe/$05" text,
"2006" real,
"2007" real,
"2008" real,
"2009" real
) | What is the 2009 average when the 2007 average is more than 0,18? | SELECT AVG("2009") FROM table_50094 WHERE "2007" > '0,18' | wikisql |
CREATE TABLE table_name_56 (
venue VARCHAR,
home_team VARCHAR
) | What venue did Richmond play at as the home team? | SELECT venue FROM table_name_56 WHERE home_team = "richmond" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | how many patients were prescribed vancomycin 1 gm in ns 250 ml ivpb within the same month until 2 years ago after the diagnosis with hypoglycemia? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypoglycemia' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-2 year')) AS t1 JOIN (SELE... | eicu |
CREATE TABLE table_57888 (
"Name" text,
"League" real,
"FA Cup" real,
"League Cup" real,
"Europe" real,
"Total" real
) | How many league cup goals on average for players with over 0 FA cup and 5 league goals? | SELECT AVG("League Cup") FROM table_57888 WHERE "FA Cup" > '0' AND "League" = '5' | 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,
... | 患者85713593有哪些医疗就诊编号的医疗记录显示其在医院开了均不低于9743.77块的药品? | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '85713593' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 9743.77) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '85713593' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLI... | css |
CREATE TABLE table_50623 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in Final" text,
"Score in Final" text
) | At what tournament was the Score 5 7, 7 5, 6 4? | SELECT "Tournament" FROM table_50623 WHERE "Score in Final" = '5–7, 7–5, 6–4' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
Revision... | (fout, reputation is nu, niet in het verleden) Average reputation users that post answers. | SELECT answers.year, Average_reputation_answers = answers.SUM_REPUTATION FROM (SELECT year, SUM(SUM_REPUTATION / CAST(posts AS FLOAT)) OVER (ORDER BY year rows BETWEEN unbounded preceding AND CURRENT ROW) AS SUM_REPUTATION FROM (SELECT Year = DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0), SUM_REPUTATION = SUM(CAS... | sede |
CREATE TABLE table_20758 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text
) | When the away team was Carlton, who was the home team? | SELECT "Home team" FROM table_20758 WHERE "Away team" = 'Carlton' | wikisql |
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
... | acm dev 2016 conference | SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2016 AND venue.venueid = paper.venueid AND venue.venuename = 'acm dev' | scholar |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | Give me a bar chart to show the names and revenue of the company that earns the highest revenue in each headquarter city, could you display from low to high by the X please? | SELECT Name, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY Name | nvbench |
CREATE TABLE table_40768 (
"Club" text,
"Wins" real,
"Losses" real,
"Points For" real,
"Points Against" real,
"Percentage" real,
"Points" real
) | What is the average Points For when there are Points Against more than 780, and Points smaller than 0? | SELECT AVG("Points For") FROM table_40768 WHERE "Points Against" > '780' AND "Points" < '0' | wikisql |
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... | Draw a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Road. | SELECT All_Home, Team_ID FROM basketball_match GROUP BY ACC_Road, All_Home | nvbench |
CREATE TABLE table_name_7 (
season VARCHAR,
races INTEGER
) | What is Season, when Races is less than 16? | SELECT season FROM table_name_7 WHERE races < 16 | sql_create_context |
CREATE TABLE table_63632 (
"Vessel" text,
"Origin" text,
"Type" text,
"In service" real,
"Unit" text
) | What is the unit for a submarine type ship from Norway? | SELECT "Unit" FROM table_63632 WHERE "Type" = 'submarine' AND "Origin" = 'norway' | wikisql |
CREATE TABLE table_18752 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | what's the record with date being january 13 | SELECT "Record" FROM table_18752 WHERE "Date" = 'January 13' | wikisql |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25... | For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of job_id and manager_id , list by the Y from high to low. | SELECT JOB_ID, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY MANAGER_ID DESC | nvbench |
CREATE TABLE table_11695 (
"Round" text,
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text
) | Which venue has 13,634 people in attendance? | SELECT "Venue" FROM table_11695 WHERE "Attendance" = '13,634' | wikisql |
CREATE TABLE table_20389 (
"N\u00b0" real,
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"DAR" text,
"HDTV" text,
"PPV" text,
"Package/Option" text
) | What packages offer the Cartello Promozionale Sky HD service? | SELECT "Package/Option" FROM table_20389 WHERE "Television service" = 'Cartello promozionale Sky HD' | wikisql |
CREATE TABLE table_383 (
"District" real,
"County(s) Represented" text,
"Member Senator" text,
"Party" text,
"First Elected" real,
"Committee" text
) | Who is the senator for district 24? | SELECT "Member Senator" FROM table_383 WHERE "District" = '24' | wikisql |
CREATE TABLE table_79929 (
"Election" text,
"Votes" real,
"Vote %" real,
"Seats" real,
"Place" text
) | Name the sum of votes % more than 19.5 | SELECT SUM("Votes") FROM table_79929 WHERE "Vote %" > '19.5' | wikisql |
CREATE TABLE table_56834 (
"Name" text,
"COSPAR ID SATCAT \u2116" text,
"Launch date (UTC)" text,
"Launch vehicle" text,
"Launch site" text,
"Launch designation" text,
"Longitude" text
) | What is the launch date of the satellite with a COSPAR ID of 1995-022a? | SELECT "Launch date (UTC)" FROM table_56834 WHERE "COSPAR ID SATCAT \u2116" = '1995-022a' | wikisql |
CREATE TABLE table_name_50 (
goals_scored INTEGER,
goals_conceded VARCHAR,
played VARCHAR
) | What is the lowest amount of goals scored that has more than 19 goal conceded and played less than 18? | SELECT MIN(goals_scored) FROM table_name_50 WHERE goals_conceded > 19 AND played < 18 | sql_create_context |
CREATE TABLE table_204_227 (
id number,
"week" number,
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
) | how many total points did the bombers score against the bc lions ? | SELECT SUM("score") FROM table_204_227 WHERE "opponent" = 'bc lions' | squall |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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 ... | 把2010年12月28日到2020年3月10日期间患者任鹏云一共看过多少种疾病查看一下 | SELECT COUNT(t_kc21.IN_DIAG_DIS_CD) FROM t_kc21 WHERE t_kc21.PERSON_NM = '任鹏云' AND t_kc21.IN_HOSP_DATE BETWEEN '2010-12-28' AND '2020-03-10' | css |
CREATE TABLE table_name_27 (
attendance VARCHAR,
game_site VARCHAR,
week VARCHAR
) | What was the Attendance after Week 7 at Tiger Stadium? | SELECT COUNT(attendance) FROM table_name_27 WHERE game_site = "tiger stadium" AND week > 7 | sql_create_context |
CREATE TABLE table_name_59 (
away_team VARCHAR
) | What is Away team Carlton's score? | SELECT away_team AS score FROM table_name_59 WHERE away_team = "carlton" | sql_create_context |
CREATE TABLE table_name_74 (
number_of_votes VARCHAR,
share_of_votes VARCHAR,
candidate VARCHAR,
election VARCHAR
) | What is the number of the votes of the election before 2004 with edward mahama as the candidate with 3.0% share of votes? | SELECT number_of_votes FROM table_name_74 WHERE candidate = "edward mahama" AND election < 2004 AND share_of_votes = "3.0%" | sql_create_context |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
... | what are fare codes QW and QX | SELECT DISTINCT fare_airline, fare_basis_code, fare_id, from_airport, one_direction_cost, restriction_code, round_trip_cost, round_trip_required, to_airport FROM fare WHERE fare_basis_code = 'QW' OR fare_basis_code = 'QX' | atis |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | HIghest voted VBA answers in the last 10 days (that aren't mine). | SELECT DATEDIFF(d, a.CreationDate, GETDATE()) AS "answer_age_(days)", a.Id AS "post_link", q.Tags, a.Score AS aScore, q.Score AS qScore FROM Posts AS q LEFT OUTER JOIN Posts AS a ON q.Id = a.ParentId WHERE q.Tags LIKE '%vba>%' AND a.CreationDate >= DATEADD(d, -10, GETDATE()) AND NOT a.OwnerUserId LIKE '##UserID##' AND ... | sede |
CREATE TABLE table_53692 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who was the home team that played against Collingwood? | SELECT "Home team" FROM table_53692 WHERE "Away team" = 'collingwood' | wikisql |
CREATE TABLE table_50151 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | In Tie #19, what was the name of the away team? | SELECT "Away team" FROM table_50151 WHERE "Tie no" = '19' | wikisql |
CREATE TABLE table_4461 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | What date was gabriela paz-franco the opponent? | SELECT "Date" FROM table_4461 WHERE "Opponent" = 'gabriela paz-franco' | wikisql |
CREATE TABLE table_name_74 (
socialist_ticket VARCHAR,
law_preservation_ticket VARCHAR,
socialist_labor_ticket VARCHAR
) | Who's the Socialist ticket with a Law Preservation ticket of (none), and a Socialist Labor ticket of belle j. rosen? | SELECT socialist_ticket FROM table_name_74 WHERE law_preservation_ticket = "(none)" AND socialist_labor_ticket = "belle j. rosen" | sql_create_context |
CREATE TABLE table_79623 (
"Race" text,
"Dist (f)" real,
"Course" text,
"Class" text,
"Prize (\u00a3K)" real,
"Odds" text,
"Runners" real,
"Placing" real,
"Margin" text,
"Time" text,
"Jockey" text,
"Trainer" text
) | Which Race has a Runners of 7 and Odds of 1/3? | SELECT "Race" FROM table_79623 WHERE "Runners" = '7' AND "Odds" = '1/3' | wikisql |
CREATE TABLE table_13336122_3 (
no_in_season INTEGER,
no_in_series VARCHAR
) | What's the smallest episode number of an episode whose number in the series is 22? | SELECT MIN(no_in_season) FROM table_13336122_3 WHERE no_in_series = 22 | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
va... | how many days have it been since patient 2518 was admitted into the hospital? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 2518 AND admissions.dischtime IS NULL | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.