DELETE FROM `tbl_job_title` WHERE id NOT IN (SELECT * FROM (SELECT MAX(id) FROM `tbl_job_title` GROUP BY NAME) tbl)