count the number of patients that have been discharged since 3 years ago from hospital.
select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is not null and datetime(admissions.dischtime) >= datetime(current_time,'-3 year')