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

A Comparison of 6 SQL Rank Functions

SQL rank functions can be handy things to have when analysing data. Most major RDBMSs implement a similar bunch of ranking functions, usually with the same names. These rank functions allow us to assign rankings to rows based on specific criteria.

In this article, we’ll look at six commonly used SQL ranking functions, and observe how they differ. We’ll throw them all together into a single query and see their results side by side.

The rank functions in question are: ROW_NUMBER(), RANK(), DENSE_RANK(), NTILE(), PERCENT_RANK(), and CUME_DIST().

Read more