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 -> Ranking with partition

Ranking with partition

From: Yanick Hudon <yannik_at_sympatico.ca>
Date: Fri, 19 Jul 2002 23:04:32 -0700
Message-ID: <3G4_8.9984$QY4.1829967@news20.bellglobal.com>


Hi to all,

    One question:

    Is it possible to make the ranking continously if a certain criteria match after subpartitioning??

    Example: I want to have the first ten players in order asc according to their score with the first two

                    levels mixed up and after the tenth position, i want
only the first level and a continously
                   ranking.

    Here the fragment of results with the query i made. Look out the comments to see what i mean.

  1. My Query
    -- Part 1: Heading
    break on ClassesMembres.ClasseID skip 2 column Prenom format A20 column Nom format A20 column NomClasse format A10 column ScoreBrut format 999 column Rang format 99 column cmc format 99 column amc format 99
    -- Part 2: Global Select with rejecting the record whose i don't need after
    the tenth position SELECT * FROM
    -- Part 3: SubQuery where the ranking is done by mixing up the levels of
    players according to
    -- the levels they can play during tournaments
    (SELECT Prenom, nom, nomclasse, ScoreBrut, ClassesMembres.classeid cmc, Classes.ClasseID amc,
    -- Each record of ClassesMembres give a member with the levels they can play
    RANK() OVER (Partition By Classesmembres.classeid order by ScoreBrut asc) as Rang FROM inscriptionstournois, golfeurs, Adherants, classesmembres, Classes, ResultatsTournois WHERE (Inscriptionstournois.golfeurid = golfeurs.golfeurid AND Adherants.golfeurID = golfeurs.golfeurID AND Adherants.MembreID = classesmembres.MembreID AND Classes.ClasseID = Adherants.ClasseID AND Resultatstournois.golfeurID = Adherants.golfeurID AND ResultatsTournois.EvenementID = InscriptionsTournois.EvenementID AND InscriptionsTournois.Evenementid = 31)) WHERE NOT (Rang > 10 AND cmc <> amc)

Thanks in advance for your responses. Received on Sat Jul 20 2002 - 01:04:32 CDT

Original text of this message

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