Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: TOP N in Oracle

Re: TOP N in Oracle

From: GreyBeard <Fuzzy.GreyBeard_at_gmail.com>
Date: Sat, 05 Feb 2005 02:28:01 GMT
Message-Id: <pan.2005.02.05.02.25.42.67592@gmail.com>


On Thu, 03 Feb 2005 12:43:25 +0100, Fantastiène glasovne moguæenosti wrote:

> Greetings !
>
> Does anyone know, when will Oracle finally implement that ?
>

Have you checked out Oracle's RANK and DENSE RANK capabilities? They help accomodate some traditional TOP N issues (and bottom N) issues, such as resolving ties. These have been around since at least 9i and are described in

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/analysis.htm#22773

(watch for URL wrapping)

They are, of course, documented in the SQL Reference manual. However, I'd recommend looking at the OReilly 'Mastering Oracle SQL' for quite a bit of decent detail (as well as additional advice about using SQL in an Oracle environment). Check http://oracle.oreilly.com/

You might also want to check out some of the other related stuff as well, such as 'lead', 'lag' (useful for moving windows), cume distributions, percent ranks, rollup and cube grouping, and (with 10g) projections using the MODEL claause.

/FGB Received on Fri Feb 04 2005 - 20:28:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US