If there is no matching row for status 1, but I still want to show the Category Name and Total number as 0. How should I modify the below SQL? Thank you!
SELECT
CASE WHEN STATUS=1 THEN 'CATEGORY A' else 'CATEGORY B' end as [Category Name],
COUNT(*) as [Total Number in Each Category]
FROM TABLE
WHERE STATUS IN (1,2)