I have the following query which is not working for my requirement. I need the count zero also returned in the results. I am looking for DocIDs with count zero for the condition specified but those DocIDs are not even showing up in the result.
SELECT DocID, Count(*) AS ArchivedCount FROM Doc WHERE Status <> 'Archived' GROUP BY DocID ORDER BY DocID
COUNT(COALESCE(DocID, 0))