From the course: Advanced SQL for Data Science: Time Series

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Percent rank

Percent rank

- [Instructor] Now, in addition to an integer value indicating rank, another function that we can apply is called percent rank. Let's take a look at that. And when we execute this, we don't get an integer value. Instead, we get a real number, and basically this is the rank divided by the total number of rows. So if you're looking to order rows, the two ways that you can use to measure that or to mark that is by using rank, which will give you an integer value, or percent rank, which will give you a value relative to the total number of rows.

Contents