count the number of drugs until 3 years ago patient 62983 was prescribed.
select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 62983 ) and datetime(prescriptions.startdate) <= datetime(current_time,'-3 year')