A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/functions/log below:

Website Navigation


LOG | Snowflake Documentation

LOG

Returns the logarithm of a numeric expression.

See also:

natural log (ln)

Syntax Arguments
base

The “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.

expr

The 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

Always returns a floating point number, even if one or more of the input expressions are of type integer or fixed-point.

Usage notes Examples
SELECT x, y, log(x, y) FROM tab;

--------+--------+-------------+
   X    |   Y    |  LOG(X, Y)  |
--------+--------+-------------+
 2      | 0.5    | -1          |
 2      | 1      | 0           |
 2      | 8      | 3           |
 2      | 16     | 4           |
 10     | 10     | 1           |
 10     | 20     | 1.301029996 |
 10     | [NULL] | [NULL]      |
 [NULL] | 10     | [NULL]      |
 [NULL] | [NULL] | [NULL]      |
--------+--------+-------------+

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4