I have to find max and min value of sales of a company within the last 2 years.
Then, I need to find the absolute max and absolute min values.
So, my query is something like below:
select min(sales) as minsales, max(sales) maxsales,
abs(min(sales)) as absminsales, abs(max(sales)) as absmaxsales
this works fine when all the number are positive, but with the negative number,
it does not look right, could you please tell me if I am doing anything wrong.
say, the max sales I found is 10, and minimum is -100.
so if I do Absolute on this, it would become absolute of max sale is 10 and absolute min value is 100.
is it right that a min value be greater than a maximum value AFTER the absolute?