I have a table with two fields ID and Name, with possible multiple entries for the same name. Here is an example:
Code:
ID   Name
1    aaa
2    bbb
3    bbb
4    ccc
5    aaa
Now, I want to know if there is possible to get with a single SELECT all the names and how many times they appear in the table:
Code:
aaa    2
bbb    2
ccc    1
Thank you.