1. DELETE
    2. t
    3. FROM
    4. test t
    5. INNER JOIN (
    6. SELECT
    7. min(id) AS id,
    8. `name`,
    9. age
    10. FROM
    11. test
    12. GROUP BY
    13. `name`,
    14. age
    15. HAVING
    16. count(*) > 1
    17. ) AS t2
    18. ON t.`name` = t2.`name`
    19. AND t.age = t2.age AND t.id > t2.id;