Skip to content

Instantly share code, notes, and snippets.

@Shaddyjr
Created July 17, 2019 03:21
Show Gist options
  • Save Shaddyjr/bcfed1ddf267bc5fe51d0630dd82cc15 to your computer and use it in GitHub Desktop.
Save Shaddyjr/bcfed1ddf267bc5fe51d0630dd82cc15 to your computer and use it in GitHub Desktop.
-- https://stackoverflow.com/questions/11056235/finding-rows-with-same-values-in-multiple-columns
SELECT A.*
FROM YourTable A
INNER JOIN (SELECT Address, State
FROM YourTable
GROUP BY Address, State
HAVING COUNT(*) > 1) B
ON A.Address = B.Address AND A.State = B.State
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment