I have a table and I need to get the number of rows using different criteria. Currently I use 3 queries one after another:
- SELECT COUNT(status) FROM projects WHERE project='1'
- SELECT COUNT(status) FROM projects WHERE project='1' AND status>'10'
- SELECT COUNT(status) FROM projects WHERE project='1' AND status>'20'
How do I merge these queries into a single query?
P.S. There are 30 different statuses, so GROUP BY status isn't much of an option.