with WorkView as
(select 1 as Val from dual union select 2 from dual
union select 3 from dual union select 4 from dual
union select 5 from dual union select 6 from dual)
select a.Val as Val1,b.Val as Val2,c.Val as Val3,d.Val as Val4,e.Val as Val5,f.Val as Val6 from
WorkView a,WorkView b,WorkView c,WorkView d,WorkView e,WorkView f
where a.Val not in(b.Val,c.Val,d.Val,e.Val,f.Val)
and b.Val not in(c.Val,d.Val,e.Val,f.Val)
and c.Val not in(d.Val,e.Val,f.Val)
and d.Val not in(e.Val,f.Val)
and e.Val !=f.Val
and abs(a.Val-b.Val) = d.Val
and abs(b.Val-c.Val) = e.Val
and abs(d.Val-e.Val) = f.Val
and a.Val < c.Val;