You can use the Case Stmt with SUM like this:
SUM
(
CASE
WHEN fieldname = 'Yes' THEN 1
WHEN fieldname = 'No' THEN 0
ELSE 0
END
) AS YesCount
If you COUNT, you'll get the count of all records.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.