SIGN
Returns the signum function of the given input, that is:
0 if the argument is 0
1 if the argument is greater than 0
-1 if the argument is less than 0
Syntax
Arguments
X
X
Type: numeric
A numeric value.
Returns
Type: same as input
A value 1, 0, or -1 indicating the sign of X
.
Examples
X
Output
1
1
-1
-1
0
0
1.1
1.0
-1.35
-1.0
3
1
Transformation job example
SQL
Query result
sign_example
-1.0
Last updated