Mauro's answer is correct, but there is an error in the sql of step 2. Thus, the full way of working, avoiding DELETE, should be as follows:
Step 1 Create a new table with the same structure / projections as the duplicates:
create table mytable_new like mytable including projections ;
Step 2 Insert the duplicated rows in this new table:
insert into mytable_new select <column list> from ( select * , row_number() over ( partition by <pk column list> ) as rownum from mytable ) a where a.rownum = 1 ;
Step 3 rename the source table (the one that contains the duplicates):
alter table mytable rename to mytable_orig ;
Step 4 rename the new table:
alter table mytable_new rename to mytable ;
source share