count the number of patients that have had a sputum microbiology test.
select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select microbiologyevents.hadm_id from microbiologyevents where microbiologyevents.spec_type_desc = 'sputum' )