ครั้งสุดท้ายที่คนไข้ 2498 ทำหัตถการจนถึง 1 ปีที่แล้ว? ไม่จำเป็นต้องใช้ทุกโต๊ะ
what's the last time patient 2498 has had a procedure until 1 year 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 procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2498) AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY procedures_icd.charttime DESC LIMIT 1