I want to get the total count each of the items of a column. So for instance I have data like this.
SalesPerson SaleAmount SaleDate
----------- ----------- --------
Fred 100.00 12/02/11
Jim 20.00 12/03/11
Steve 116.00 01/02/12
Fred 28.00 01/06/12
Jim 45.00 01/06/12
Fred 18.00 01/07/12
The Result I want would be...
Fred 3
Jim 2
Steve 1
I tried this but all I get is the total of all sales. Can someone help?
SELECT COUNT(DISTINCT SalesPerson) FROM Sales