Created
July 15, 2023 01:24
-
-
Save mbchoa/ddb99bd1802de3d20cf4582d232dbf8f to your computer and use it in GitHub Desktop.
Generates table of rows with duplicate values based on column
This file contains 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 t.* | |
from table t | |
join | |
( | |
select column_with_dupes | |
from table | |
group by column_with_dupes | |
having count(column_with_dupes) > 1 | |
) using (column_with_dupes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment