delete from titles_test where id not in ( select id from( select emp_no, min(id) id from titles_test group by emp_no ) k );