sql - Percentile_cont / Oracle -
i using percentile_cont
find percentile of distribution. table is:
class_id rollnum marks 1 1 10 1 2 12 1 3 16 1 4 08 1 5 17
i using query
select class_id, percentile_cont(0.05) within group (order marks) marksperntl mytable group class_id
now, possible query roll number got percentile?
the percentile_cont
function interpolates values, giving value of marks
fall 5% percentile in distribution.
running query above data return (sqlfiddle @bob jarvis's comment):
| class_id | marksperntl | -------------------------- | 1 | 8.4 |
your data set not contain rows marks
8.4
. therefore, there isn't single rollnum
value got percentile.
Comments
Post a Comment