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: max occurences

Re: max occurences

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Wed, 11 Dec 2002 16:04:59 GMT
Message-ID: <LmJJ9.317498$QZ.47356@sccrnsc02>


what about using max?
select number from myTable where dummycol=max(dummycol) order by number; (in case of ties)
Jim
"--B" <akshard_at_vsnl.com> wrote in message news:v5DJ9.5151$Vf3.55100_at_vixen.cso.uiuc.edu...
> e.g.
>
> number dummycol
>
> 1 10
>
> 2 5
>
> 1 7
>
> 1 6
>
> 3 3
>
> The result should give me 1.
>
> "--B" <akshard_at_vsnl.com> wrote in message
> news:MQCJ9.5149$Vf3.55294_at_vixen.cso.uiuc.edu...
> > how to return a row with max occurences of some value in one column?
> >
> >
> >
> >
>
>
Received on Wed Dec 11 2002 - 10:04:59 CST

Original text of this message

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