duplicate record finder that itemizes results (vs. count summary)


/ Published in: MySQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #The Problem:
  2.  
  3. #You want an itemized listing like:
  4. #JIM JONES 100 MAIN ST
  5. #JOHN SMITH 100 MAIN ST
  6.  
  7. #Instead of the usual count summary like:
  8. #100 MAIN ST 2
  9.  
  10. #The Solution:
  11. SELECT firstname, lastname, list.address FROM list
  12. INNER JOIN (SELECT address FROM list
  13. GROUP BY address HAVING count(id) > 1) dup ON list.address = dup.address

URL: http://stackoverflow.com/questions/854128/find-duplicate-records-in-mysql

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.