Skip to content

Instantly share code, notes, and snippets.

@abenevaut
Last active April 5, 2024 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abenevaut/f913817208dada6311d3 to your computer and use it in GitHub Desktop.
Save abenevaut/f913817208dada6311d3 to your computer and use it in GitHub Desktop.
SELECT DISTINCT *
FROM table t1
WHERE EXISTS (
SELECT *
FROM table t2
WHERE t1.id <> t2.id
AND t1.siret = t2.siret
)
@abenevaut
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment