How would I get a list of distinct records, with a count of how many occurances of each there are?
I want it to look like this:
NAME COUNT
John 5
Tom 10
Nancy 25
I think it would use DISTINCT and COUNT, but I can't seem to get it. this doesn't work:
SELECT DISTINCT name, count([name]) as expr1
thanx for any help
I want it to look like this:
NAME COUNT
John 5
Tom 10
Nancy 25
I think it would use DISTINCT and COUNT, but I can't seem to get it. this doesn't work:
SELECT DISTINCT name, count([name]) as expr1
thanx for any help