ค่าใช้จ่ายโดยรวมของโรงพยาบาลรวมยาเกินขนาดเมื่อ 2 ปีที่แล้วเป็นเท่าใด?ไม่จำเป็นต้องใช้โต๊ะทั้งหมด
what is the average total cost of the hospital, which includes the narcotic overdose until 2 years ago?It is not neccessary to use all the tables.
 lab:  labid [ number]  patientunitstayid [ number]  labname [ text]  labresult [ number]  labresulttime [ time] 
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'narcotic overdose')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME(), '-2 year') GROUP BY cost.patienthealthsystemstayid) AS t1