Q:

MySQL Delete with Group By

I am running a query successfully using in MySQL 5.5
SELECT columnA
FROM
  table
GROUP BY
  columnA
HAVING
  count(*) > 1

However, I need to run this same query using DELETE and I'm a little unsure how to delete ? i.e. the returned results should be deleted ?
Any ideas ?

A:

Place it in a subquery:
delete from table 
where columnA in (
  select columnA
  from (
      select columnA
      from YourTable
      group by columnA
      having count(*) > 1
      ) t  
)

