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: Yanick Hudon <yannik_at_sympatico.ca>
Date: Sun, 14 Jul 2002 21:04:20 -0700
Message-ID: <NqpY8.370$1t.174039@news20.bellglobal.com>


Hi again,

    For sure before i asked the question, i've tried a lot of thing...

    Here's some of the thing i've tried:

    function rank() with partition on the subscribed level, partition with all possible level for one person.

    gouping function like grouping, grouping sets, groupid... and so on..

    I've even tried a solution with a union query with a condition to check if it meet the first rank...

    I'm stucked, i've looked also in the SQL Reference Book which is making 9 MGS in adobe format..

    However, i didn't look at the website you gave but i'll take a look.

    Thanks in advance.
Daniel Morgan <dmorgan_at_exesolutions.com> wrote in message news:3D31A493.85B0B91F_at_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 - 23:04:20 CDT

Original text of this message

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