Skip to content

Instantly share code, notes, and snippets.

@csaba-farkas
Created September 13, 2018 08:55
Show Gist options
  • Save csaba-farkas/b91fb07b7ab4d0a93e386b80d92d477d to your computer and use it in GitHub Desktop.
Save csaba-farkas/b91fb07b7ab4d0a93e386b80d92d477d to your computer and use it in GitHub Desktop.
[Finding duplicate records in database] #SQL
SELECT
name, email, COUNT(*)
FROM
users
GROUP BY
name, email
HAVING
COUNT(*) > 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment