I tried below:
select [candidateref],
[candidatepostcode],
Count([candidatepostcode]),sum(case when [candidatepostcode] IS NULL THEN 1 else 0 END) ,
sum(case when [candidatepostcode] IS NOT NULL THEN 1 else 0 END)
from [CandidateGeoLocation]
but received the below error
Msg 8120,...