I have these queries :
SELECT COUNT(*) FROM t_table WHERE color = \'YELLOW\';
SELECT COUNT(*) FROM t_table WHERE color = \'BLUE\';
SELECT COUNT(*) FROM t_table W
I think this can also works for you
select count(*) as anc,(select count(*) from Patient where sex='F')as
patientF,(select count(*) from Patient where sex='M') as patientM from anc
you can also even select and count related tables like this
select count(*) as anc,(select count(*) from Patient where
Patient.Id=anc.PatientId)as patientF,(select count(*) from Patient where
sex='M') as patientM from anc