Table Name: table1
Fields: id, firstname, surname
How can I count the number of times each surname appears?
SELECT surname, count(surname) As "count" FROM table1 GROUP BY surname
example results would be