My MySql db table structure is:
id | status
1 | Open
2 | Open
3 | Closed
4 | Open
5 | Closed
and i want to count total number of Open and Closed rows.
Status | Total
Open | 3
Closed | 2
I used
SELECT count(distinct status) as Total FROM my_tbl
but it returns
Total
2