Cume_dist

SQL

SQL - PERCENT_RANK() and CUME_DIST()

PERCENT_RANK() calculates the relative rank of each row within a result set as a percentage. The formula is: (rank - 1) / (total rows - 1). This means the first row always gets 0, the last row gets…

Read more →