开发者

Calculating Percentile Using Cumulative Data in MySQL

What should the percentile ranks b开发者_如何学Goe for each of these records and is there a MySQL query I can run to calculate the percentile for the score?

id    score   cumulative_score     percentile
1     100     100                  ?
2     50      150                  ?
3     25      175                  ?
4     25      200                  ?
5     10      210                  ?


Generally, a percentile rank is the value of a variable below which a certain percentage of observations fall.

So, you don't specify if this is for "score" or "cumulative score," but for score, 80% of the observations fall below 100, 60% below 50, 20% below 25 and 0% below 10.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜