นับจำนวนผู้ป่วยที่เคยทำภาวะอุณหภูมิร่างกายต่ำกว่าปกติตั้งแต่ 2 ครั้งขึ้นไป จนถึงเมื่อ 4 ปีที่แล้ว ไม่จำเป็นต้องใช้ทุกตาราง
count the number of patients who had undergone hypothermia two or more times until 4 years ago.It is not neccessary to use all the tables.
 chartevents:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  itemid [ number]  charttime [ time]  valuenum [ number]  valueuom [ text] 
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'hypothermia') AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY admissions.subject_id) AS t1 WHERE t1.c1 >= 2