I have a table with 2 columns:
ID Status
-- -------
1 OK
2 OK
3 NOTOK
4 NOTOK
5 OK
I want to do a count and group by status and also have the sum of the count on each row. The count works but I do not know how to do the sum to appear on each row like this:
Status Count TotalCount
------- ----- ------
OK 3 5
NOTOK 2 5