Created
January 11, 2012 10:29
-
-
Save stefanbirkner/1594072 to your computer and use it in GitHub Desktop.
list duplicate rows with the number of duplicates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- replace myfield1, myfield2 and mytable with appropriate names | |
| select COUNT(*) AS num, myfield1, myfield2 from mytable group by myfield1, myfield2 HAVING COUNT(*) > 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment