Hello,

Does anyone have any experience calculating the percentile / percentrank for
each row in a table?

I see that there are built in UDAFs to calculate the percentile, but that
would only return a single value for the entire table.

Essentially, I'm trying to recreate the Excel PercentRank function described
here: http://msdn.microsoft.com/en-us/library/bb239448(v=office.12).aspx

For example, the input:

Score
--------
10
20
30
40
50

would yield

PercentRank
------------------
0.0
0.25
0.5
0.75
1.0

Any ideas?

Thanks,
Sameer

Reply via email to