[Solved] SQL Query: Remove duplicates in column that is not primary key [duplicate]


You can use a query like this:

SELECT t1.Title, t1.Url, t1.Description, t1.id
FROM mytable AS t1
JOIN (
   SELECT MIN(id) AS min_id
   FROM mytable
   GROUP BY title
) AS t2 ON t1.id = t2.min_id

This will pick the record having the minimum id for each distinct value of Title.

3

solved SQL Query: Remove duplicates in column that is not primary key [duplicate]