DELETE FROM city_info WHERE 1=1 AND admin_id IN ( SELECT * from ( SELECT admin_id FROM city_info GROUP BY admin_id HAVING COUNT(admin_id)>1 ) as A) AND id NOT IN ( SELECT * from ( SELECT MIN(id) FROM city_info GROUP BY admin_id HAVING COUNT(admin_id)>1 ) as B)