To get all the clients without repeating the names is very easy.
SELECT distinct firstname FROM client
And to get all the clients whose name is repeated more than once is not very complicated either.
SELECT count(*), firstname FROM client
GROUP BY firstname
HAVING COUNT(*) > 1;
What I can't get is a list of all the clients whose name is repeated, in such a way that if there are two "Juan" it shows me the record of each one.
I can think of two ways
Or else: