ค่ารักษาพยาบาลขั้นต่ำที่รวมการใส่เฝือกแบบละเอียดจนถึง 1 ปีที่แล้วคือเท่าไร?ไม่จำเป็นต้องใช้ทุกโต๊ะ
what is the minimum amount of hospital cost that includes granular casts until 1 year ago?It is not neccessary to use all the tables.
 procedures_icd:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icd9_code [ text]  charttime [ time] 
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'granular casts')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY cost.hadm_id) AS t1