create table MyTable2(A,B,C,D,E) as
select 15,20,10,18,99 from dual union
select 16,17,13,20,11 from dual union
select 18,23,40,29,33 from dual union
select 30,31,32,33,34 from dual union
select 44,43,42,41,40 from dual union
select 54,51,52,53,50 from dual union
select 63,64,62,61,60 from dual union
select 74,73,72,70,71 from dual;
select a,b,c,d,e
from (select least(a,b) as a,greatest(a,b) as b,least(c,d) as c,greatest(c,d) as d,e
from (select a,least(b,c) as b,greatest(b,c) as c,least(d,e) as d,greatest(d,e) as e
from (select least(a,b) as a,greatest(a,b) as b,least(c,d) as c,greatest(c,d) as d,e
from (select a,least(b,c) as b,greatest(b,c) as c,least(d,e) as d,greatest(d,e) as e
from (select least(a,b) as a,greatest(a,b) as b,least(c,d) as c,greatest(c,d) as d,e
from (select a,least(b,c) as b,greatest(b,c) as c,least(d,e) as d,greatest(d,e) as e
from MyTable2))))));