Is it possible to group by non-existent(sorry if this is not the right term).
For instance, if I have a table such as:
post_id - status
1 - active
2 - suspended
3 - hold
And the possible values for the status table are: active, suspended, hold, deleted
But the status column may or may not have all of those status types at any given time but I would still like to have a status returned with a 0 count even if it is not in there.
Is it possible to do something such as(pseudo-query):
SELECT COUNT(post_id), status(active, suspended, hold, deleted) FROM users GROUP BY status
P.s. Before anyone suggests to not do the table this way, I have no option as this is how the properties table is structured for this CMS.