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: Query Problem

Re: Query Problem

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Sun, 14 Jul 2002 16:20:24 GMT
Message-ID: <3D31A493.85B0B91F@exesolutions.com>


Yanick Hudon wrote:

> Hi to all,
>
> I need a little help to perform a ranking query, (The sample comes from
> the internet with a little modifying
> by addind the field Level.
>
> My first table look like this one, the persons are subsribing in differents
> level:
> fname lname age IQ Level
> jane doe 17 123 A
> mary smith 24 109 B
> fred brown 28 132 B
> tom white 31 125 C
> bill adams 32 111 C
>
> The second table look like this one, The persons whose are level A or B are
> considerated in the same level.
> (I called this level 'Opened')
> fname lname age IQ Level
> jane doe 17 123 A
> mary smith 24 109 A
> fred brown 28 132 B
> tom white 31 125 C
> bill adams 32 111 C
> mary smith 24 109 B
>
> Now let's say i want a ranking according to IQ Ascending. If i take the
> level subscribed, there's no problem to
> perform the ranking. But if the lowest IQ in level B beat the lowest IQ in
> level A, i want the person list first on the
> level A.
>
> The desired result look like this:
>
> fname lname age IQ 'Opened'
> mary smith 24 109 B
> jane doe 17 123 A
>
> fname lname age IQ Level A
> jane doe 17 123 A
>
> fname lname age IQ Level B
> mary smith 24 109 B
> jane doe 17 123 B
> fred brown 28 132 B
>
> fname lname age IQ Level C
> bill adams 32 111 C
> tom white 31 125 C
>
> How could i perform this query??
>
> Any helps would be appreciated
> Thanks in advance!

Have you made any attempts to do this yourself and failed? Have you looked up the analytic functions at http://tahiti.oracle.com and tried any of the examples? Have you tried anything based on examples from a book?

I ask because from your posting it appears you have not and want someone else to do your work for you. And it really gives the appearance of being homework, at least to me.

If you have tried then post what you have done and I will be glad to offer some pointers. If you have not ... oh well.

Daniel Morgan Received on Sun Jul 14 2002 - 11:20:24 CDT

Original text of this message

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