• + 0 comments

    with seq as (select level l1 from dual where level>1 connect by level<=1000) select listagg(s1.l1,'&')within group(order by s1.l1) from seq s1 where not exists (select 1 from seq s2 where s2.l1<=sqrt(s1.l1) and mod(s1.l1,s2.l1)=0);