Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Highest values of a table
If you are using 8.1.6, look at the
'analytic functions' - in your case
I suggest the NTILE() function, with
the value 5 (quintiles ?). Range it across
the entire data set and take the top quintile.
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Mark van Dijk wrote in message ...Received on Thu Jun 15 2000 - 00:00:00 CDT
>Hi,
>
>I hope someone can help me out. I have the following question:
>How can I select the say 20% highest (or lowest) values from a table by SQL
>or PL/SQL?
>
>Thanks,
>
>Mark
>
>