This is a Wordpress database question so I am not including my code here so am just asking a general How To / Is It Possible question.
I have a DISTINCT query that works fine that returns all the unique surnames in a table. What I would like is a count of each of those unique surnames from that database as well. Is this easily possible?
So what I would like is something like: