I have a table with Name, Address, City, Sate, Zip, Phone, and email address, that has duplicate rows caused by differences in the data, for example Bob Smith has 3 rows because the address is (in row 1) 123 My St (in row 2) 123 My St.
(Note the period) and (in Row 3) 123 My Street I used a CTE to find the duplicates but I need a way to determine the differences in the rows. another example is the the name column had Bill and the other had Bill Smith but the address and email is the same. I have attached the CTE I use to find the DUPs. any help would be appreciated.
SELECT *, ROW_NUMBER() OVER (PARTITION BY buyer_email ORDER BY buyer_email DESC) as RowNumber
FROM (SELECT buyer_name, buyer_street, buyer_city, buyer_state, buyer_zip, buyer_phone, buyer_email
SELECT buyer_name, buyer_street, buyer_city, buyer_state, buyer_zip, buyer_phone, buyer_email, RowNumber
WHERE RowNumber >1
ORDER BY buyer_name