what is the average total cost for a hospital that includes a drug called dextrose 50% until 3 years ago?
select avg(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select prescriptions.hadm_id from prescriptions where prescriptions.drug = 'dextrose 50%' ) and datetime(cost.chargetime) <= datetime(current_time,'-3 year') group by cost.hadm_id ) as t1