SQL Reference
...
SQL Functions
Aggregation Functions
ABS
7min
The ABS() function returns the absolute value of a number.
The input and return types we support can be seen in the table below.
ο»Ώ
β The ABS() function returns a value that is the same as the input types.
The following example will calculate the absolute value of a negative floating number:
Select abs

ο»Ώ
It will return the floating number without the negative value:
Output

ο»Ώ
The following example calculates the absolute value of an expression i.e., the subtraction operation:
Select abs

ο»Ώ
We know that the result of (150  250) is 100, but in this case, weβre using an ABS() function to get an absolute number so that the result will ignore the negative value.
Output

ο»Ώ
ο»Ώ