I would like to delete the entire row for ALL of the duplicates this query finds. I do not wish to leave a single record. How do I add the delete row syntax to this complicated query?
SELECT u.id, u.School, u.Mascot, u.City, u.State
FROM TABLE u
INNER JOIN
(
SELECT Mascot, City, State, COUNT(*)
FROM tablename
GROUP BY Mascot, City, State
HAVING COUNT(*) > 1
) temp
ON temp.Mascot = u.Mascot AND
temp.City = u.City AND
temp.State = u.State
ORDER BY
Mascot, City, State;