In my table I have task, every task have state.
1 - planned
2 - executing
3 - finished
I want get count of all planned, executing and finished task.
I can write three queries like this:
SELECT COUNT(*) FROM `task` WHERE state = 1
SELECT COUNT(*) FROM `task` WHERE state = 2
SELECT COUNT(*) FROM `task` WHERE state = 3
So, my question is: It is possible (and how?) get this data in one query?
Thank you for any help.