Created
June 23, 2016 16:34
-
-
Save isccarrasco/c932056ec3a59aa01448784e1cbb573e to your computer and use it in GitHub Desktop.
Find duplicate rows with PostgreSQL
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
select * from ( | |
SELECT id, | |
ROW_NUMBER() OVER(PARTITION BY merchant_Id, url ORDER BY id asc) AS Row | |
FROM Photos | |
) dups | |
where | |
dups.Row > 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment