Re: Highest values of a table

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: 2000/06/15
Message-ID: <961075841.12923.0.nnrp-11.9e984b29_at_news.demon.co.uk>#1/1


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 ...

>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
>
>
Received on Thu Jun 15 2000 - 00:00:00 CEST

Original text of this message