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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL question: worsts and bests

Re: SQL question: worsts and bests

From: Bricklen <bricklen_at_shaw.ca>
Date: Sun, 10 Feb 2002 17:39:02 GMT
Message-ID: <3C66AFE3.ED4620B7@shaw.ca>


Top N queries, in 8.1.6+, like Rank and Dense_Rank. Check out the following if you like:

http://asktom.oracle.com/pls/ask/f?p=4950:8:489958::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1212501913138,%7Brank%7D%20and%20%7Bdense_rank%7D
http://asktom.oracle.com/pls/ask/f?p=4950:8:489958::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:750625651018,%7Brank%7D%20and%20%7Bdense_rank%7D
http://technet.oracle.com/doc/oracle8i_816/server.816/a76989/functi24.htm#82924
http://technet.oracle.com/doc/oracle8i_816/server.816/a76989/functi70.htm#85757


Marc E wrote:
>
> Greetings.
>
> Let's say I have a table that tracks the progress of journal articles from
> the time the article is edited until the time it's printed. There are about
> 5 different stages of data that are recorded (time to edit, time to create
> page proofs, time for author to review proofs, etc.).
>
> And then let's say I want to run a report on this data that shows the top
> 10 articles in terms of time per stage, like so:
>
> 10 articles that took the least time to edit.
> 10 articles that spent the least time with an author.
> and so forth....
>
> and then let's say I wnat to run a report that shows the opposite:
>
> 10 articles that took the longest to edit.
> 10 articles that spent the most time with author.
> and so forth...
>
> How would one do this in Oracle?
>
> Marc
Received on Sun Feb 10 2002 - 11:39:02 CST

Original text of this message

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