SyntaxFix
Write A Post
Hire A Developer
Questions
You can try group by on name and count the ids in that group.
SELECT name, count(id) as COUNT FROM table group by name