LOG10()

Documentation

VoltDB Home » Documentation » Using VoltDB

LOG10()

LOG10() — Returns the base-10 logarithm of a numeric value.

Synopsis

LOG10( numeric-value )

Description

The LOG10() function returns the base-10, or decimal, logarithm of the specified input value. The log is returned as a floating point (FLOAT) value.

Example

The following example uses the LOG10() function to calculate the magnitude of difference between two values.

SELECT  LOG10(YR2.profit/YR1.profit) AS Magnitude_of_growth
    FROM account AS YR1, account AS YR2
    WHERE YR1.fiscalyear=? AND YR2.fiscalyear=?;