Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Query Problem
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!
Received on Sun Jul 14 2002 - 10:16:02 CDT