Overview of LOG() in SQLite

The LOG() function in SQLite calculates the logarithm of a given number to a specified base, with 10 being the default base.

This is helpful for logarithmic transformations or calculations requiring a specific base (e.g., base 10 for common logarithms or base 2 for binary logarithms).

Read more

Understanding the Difference Between SCALE(), MIN_SCALE() and TRIM_SCALE() in PostgreSQL

Anyone who looks at PostgreSQL’s list of mathematical functions will notice that there are some functions that have “scale” in their name. In particular, scale(), min_scale(), and trim_scale().

While these functions all have a similar name, they each have a different purpose. That said, they’re all related to the scale of the given number. The scale is the number of digits to the right of the decimal point in a number. For example, the number 1.95 has a scale of 2, and 1.958 has a scale of 3.

Read more