LOG

functionsupportedCore SQL functions

docs.snowflake.com ↗

Numeric functions

Returns the logarithm of a numeric expression.

Syntax

LOG(<base>, <expr>)

Parameters

NameRequiredDescription
baserequiredThe “base” to use (e.g. 10 for base 10 arithmetic). This can be of any numeric data type (INTEGER, fixed-point, or floating point). base should be greater than 0. base should not be exactly 1.0.
exprrequiredThe value for which you want to know the log. This can be of any numeric data type (INTEGER, fixed-point, or floating point). expr should be greater than 0.

Returns

If the input expression is of type DECFLOAT, the returned type is DECFLOAT. Otherwise, the returned type is FLOAT.

Usage notes

See also