Skip to content

Instantly share code, notes, and snippets.

@mbchoa
Created July 15, 2023 01:24
Show Gist options
  • Save mbchoa/ddb99bd1802de3d20cf4582d232dbf8f to your computer and use it in GitHub Desktop.
Save mbchoa/ddb99bd1802de3d20cf4582d232dbf8f to your computer and use it in GitHub Desktop.
Generates table of rows with duplicate values based on column
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