Recently I had to provide a script to convert a dataset of raw assessment scores into an Oracle table with the scores ordered by percentile rank. This is a common request so I figured a short, non-technical post on percentile ranking might be helpful to a lot of people.

There are three main ways to calculate percentile ranks in Oracle 9i or later:

(a) Calculate them manually with Joins and Sub-queries;
(b) Use the CUME_DIST function and format the results as a percentage;
(c) Use the PERCENT_RANK function.

In this post I’m going to focus on options (b) and (c) because the only people who would reinvent the wheel and use (a) are SQL programmers who don’t know (b) and (c) already exist.

Click here to read more »