1
I need to list all the duplicate names in a certain table and I’m not getting it, what I have so far is this:
SELECT nome, foto, ativo, count(nome) FROM comColaborador GROUP BY nome HAVING count( nome ) > 1
But this script only shows me a record and its count indicating duplicity, I need to list the same.
I tried that too:
SELECT nome, foto, ativo FROM comColaborador WHERE nome LIKE "%ABRAAO BRANDAO MORAES%"
But it gets too expensive to have to search by stating the names I wish.
I did a test, but did not take duplicates, but thanks for the help @Wagner Soares.
– adventistapr
Strange, it was supposed to work out kkkkk
– Wagner Soares
Hi @Wagner Soares, is this "id" from my chart? Looks like this: SELECT name, photo, active FROM comColaborator WHERE idColaborator in ( SELECT idColaborator FROM comColaborator GROUP BY name HAVING Count( name ) > 1 order by name asc )
– adventistapr
This didn’t work out that way?
– Wagner Soares
Just one observation, to sort the final result order by must be after the ")" like this: SELECT name, photo, active FROM comColaborator WHERE IDCOLABORATOR in ( SELECT idColaborator FROM comColaborator GROUP BY name HAVING Count( name ) > 1 ) order by name asc
– Wagner Soares