ค่าใช้จ่ายรวมโดยเฉลี่ยของโรงพยาบาล รวมถึงการทดสอบในห้องปฏิบัติการ Transferrin จนถึงปี 2102 คือเท่าไร?ไม่จำเป็นต้องใช้ตารางทั้งหมด
what's the average total cost of a hospital, including transferrin lab tests until 2102?It is not neccessary to use all the tables.
 icustays:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  first_careunit [ text]  last_careunit [ text]  first_wardid [ number]  last_wardid [ number]  intime [ time]  outtime [ time] 
SELECT AVG(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 = 'transferrin')) AND STRFTIME('%y', cost.chargetime) <= '2102' GROUP BY cost.hadm_id) AS t1