count the number of patients who have received a microbiology test for mini-bal until 2 years ago.
select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select microbiologyevents.hadm_id from microbiologyevents where microbiologyevents.spec_type_desc = 'mini-bal' and datetime(microbiologyevents.charttime) <= datetime(current_time,'-2 year') )