the last ward id of patient 56009 until 1 year ago is?
select transfers.wardid from transfers where transfers.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 56009 ) and transfers.wardid is not null and datetime(transfers.intime) <= datetime(current_time,'-1 year') order by transfers.intime desc limit 1