title: finding duplicates and removing but keeping one value
body: <p>I currently have a URL redirect table in my database that contains ~8000 rows and ~6000 of them are duplicates.</p>
  
  <p>I was wondering if there was a way I could delete these duplicates based on a certain columns value and if it matches, I am looking to use my "old_url" column to find duplicates and I have used </p>
  
  <pre><code>SELECT old_url
      ,DuplicateCount = COUNT(1)
  FROM tbl_ecom_url_redirect
  GROUP BY old_url
  HAVING COUNT(1) &gt; 1  -- more than one value
  ORDER BY COUNT(1) DESC -- sort by most duplicates
  </code></pre>
  
  <p>however I'm not sure what I can do to remove them now as I don't want to lose every single one, just the duplicates. They are almost a match completely apart from sometimes the new_url is different and the url_id (GUID) is different in each time</p>