use count on where code example Example: count with where select count(case Position when 'Manager' then 1 else null end) from ...