what is the total number of patients discharged from the hospital until 3 years ago?
select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is not null and datetime(admissions.dischtime) <= datetime(current_time,'-3 year')