Skip to content

Instantly share code, notes, and snippets.

@GuiSevero
Last active August 29, 2015 14:02
Show Gist options
  • Save GuiSevero/866d877815e72d928885 to your computer and use it in GitHub Desktop.
Save GuiSevero/866d877815e72d928885 to your computer and use it in GitHub Desktop.
SQL Duplicatas
SELECT
cod_gt, cod_pessoa, COUNT(*)
FROM
pessoa_gt
GROUP BY
cod_pessoa, cod_gt
HAVING
COUNT(*) > 1
ORDER BY cod_gt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment