| abs(x) | same as input | absolute value of a number | SELECT abs(-17.4); | 17.4 |
| cbrt(x) | double | cube root | SELECT cbrt(2.0); | 1.2599210498948734 |
| ceil(x) | double | nearest integer greater than or equal to argument (same as ceiling(x)) | SELECT ceil(-42.8); | -42 |
| ceiling(x) | double | nearest integer greater than or equal to argument (same as ceil(x)) | SELECT ceiling(-95.3); | -95 |
| exp(x) | double | exponential | SELECT exp(1); | 2.718281828459045 |
| floor(x) | real or double | nearest integer less than or equal to argument | SELECT floor(-42.8); | -43 |
| get_value_for(schema_nm, seq_nm) | bigint | get current value of a sequence | SELECT get_value_for('dwh2', 'seq_9201'); | 1234 |
| greatest(x, y, ...) | same as input | greatest (highest) value of all the numeric arguments excluding null | SELECT greatest(4, 555.5, 7e2, null); | 700 |
| least(x, y, ...) | same as input | least (lowest) value of all the numeric arguments excluding null | SELECT least(4, 555.5, 7e2, null); | 4 |
| ln(x) | double | natural logarithm | SELECT ln(2.0); | 0.6931471805599453 |
| log(x) | double | natural logarithm, same as ln(x) | SELECT log(2.0); | 0.6931471805599453 |
| log(b, x) | double | logarithm to base b. | SELECT log(2, 64.0); | 6.0 |
| log10(x) | double | base 10 logarithm | SELECT log10(100.0); | 2.0 |
| log2(x) | double | base 2 logarithm | SELECT log2(64.0); | 6.0 |
| mod(x, y) | same as input | modulo (remainder) | SELECT mod(5.0, 2.1); | 0.8 |
| next_value_for(schema_nm, seq_nm) | bigint | get current value of a sequence and increment it | SELECT next_value_for('dwh2', 'seq_9201'); | 1234 |
| nextafter(x, y) | same as input | returns the next representable floating-point value of x in the direction of y. | SELECT nextafter(5.99999999999999, 12.1); | 6.0 |
| power(x, y) | double | x raised to the power of y | SELECT power(2, 5); | 32 |
| rand() | int | random integer value between 0 and 2147483648 | SELECT rand(); | 917632440 |
| rand(seed) | int | random integer value with seed set | SELECT rand(-5); | 1345532277 |
| round(x, d) | same as first arg | round x to d decimal places | SELECT round(42.4382, 2); | 42.4400 |
| sign(x) | tinyint | sign of the argument: -1 when x is negative, 0 when x is zero, 1 when x is positive | SELECT sign(-8.4); | -1 |
| sqrt(x) | double | square root | SELECT sqrt(2.0); | 1.4142135623730951 |
| sys.alpha(pdec double, pradius double) | double | compute alpha 'expansion' of theta for a given declination (used by SkyServer) | SELECT sys.alpha(5.0, 1.2); | 1.2045844792437546 |
| sys.ms_round(x double, prc int, trunc int) | double | round to prc decimal places and ?? truncate to trunc decimal places | SELECT sys.ms_round(1.2359, 2, 0); | 1.24 |
| sys.ms_trunc(num double, prc int) | double | truncate to prc decimal places | SELECT sys.ms_trunc(1.2359, 2); | 1.23 |