Archive
LOG10() — Returns the base-10 logarithm of a numeric value.
LOG10( numeric-value )
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.
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=?;