ขั้นตอนอะไรให้กับผู้ป่วย 25965 สองครั้งจนถึง 40 เดือนที่แล้ว?ไม่จำเป็นต้องใช้ตารางทั้งหมด
what procedure is provided to patient 25965 two times until 40 months ago?It is not neccessary to use all the tables.
 cost:  row_id [ number]  subject_id [ number]  hadm_id [ number]  event_type [ text]  event_id [ number]  chargetime [ time]  cost [ number] 
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25965) AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TIME(), '-40 month') GROUP BY procedures_icd.icd9_code) AS t1 WHERE t1.c1 = 2)