delete from titles_test where id not in (select * from (select min(id) from titles_test group by emp_no) as a)

delete from titles_test where id not in

(select min(id) from (select id from

titles_test group by emp_no) as a)

delete from titles_test

where id not in(select *

from

(select min(id)from titles_test

group by emp_no)as a);