ค่ารักษาพยาบาลโดยเฉลี่ยสำหรับคนไข้ที่เป็นโรคไส้เลื่อนจนถึงปี 2104 คือเท่าไร?ไม่จำเป็นต้องใช้ทุกโต๊ะ
what is the average hospital cost for a patient suffering from hernia nec until 2104?It is not neccessary to use all the tables.
 prescriptions:  row_id [ number]  subject_id [ number]  hadm_id [ number]  startdate [ time]  enddate [ time]  drug [ text]  dose_val_rx [ text]  dose_unit_rx [ text]  route [ text] 
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hernia nec')) AND STRFTIME('%y', cost.chargetime) <= '2104' GROUP BY cost.hadm_id) AS t1