CREATE TABLE "APPTEST" (
"ID" INTEGER primary key NOT NULL,
"MOBILE" nvarchar2(50) NOT NULL
);
delete from APPTEST a where rowid not in (select max(rowid) from APPTEST b where a.mobile=b.mobile);
delete APPTEST where rowid in (
select rid from
(select rowid rid,row_number() over(partition by mobile order by id desc) rn from APPTEST )
where rn > 1) ;