calculate the number of patients who had been admitted to hospital until 1 year ago.
select count( distinct admissions.subject_id ) from admissions where datetime(admissions.admittime) <= datetime(current_time,'-1 year')