Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> select nth row ?
Hello,
I am treating the results of an ordered query as a data set. As such, I am interested in determining the mean and interquartile range. This means I need to be able to select the nth row of the *ordered* data set. Now, I thought I might use ROWNUM, but my manual says "ROWNUM is assigned before the rows are ordered [by the ORDER BY clause]."
Any ideas on how I can do this? If I can't get Oracle to do this I'll have to slurp the whole data set into my program and do the calcs there.
Thanks!
--
Phil R Lawrence phone: 610-758-3051 Programmer / Analyst e-mail: prl2_at_lehigh.edu194 Lehigh University Computing Center