Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: max occurences
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
![]() |
![]() |