Hello ! I want to achieve this:
select 1 as num union select 3 as num union select -2 as num order by abs(num) -- result [1, -2, 3] But it doesn't work this works but doesn't show what I want: select abs(num) from ( select 1 as num union select 3 as num union select -2 as num ) order by abs(num) -- result [1,2,3] ? I know I can duplicate the column value but there is a way to do it without duplicating ? ? Cheers !