Skip to content

Instantly share code, notes, and snippets.

@birchestx
Created August 25, 2014 05:26
Show Gist options
  • Save birchestx/331667e9e3c1c301a87b to your computer and use it in GitHub Desktop.
Save birchestx/331667e9e3c1c301a87b to your computer and use it in GitHub Desktop.
Show duplicates sql
SELECT id, COUNT( * ) , MAX( ID ) AS dupes
FROM method_codes
GROUP BY code
HAVING (
COUNT( * ) >1
)
LIMIT 0 , 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment