( fhuse | 2022. 05. 18., sze – 17:04 )

 

delete from table
where concat(group,prefix,value) not in
      (select gpv
       from ( select concat(group,prefix,value) gpv
                     , row_number() over (partition by group,value  order by len(prefix )) rn
              from table
              ) x
       where rn = 1
       )

Nullokkal vigyazni!