Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: group by, order by and rownum
This has HOMEWORK written all over it. Post what you've tried so far, and
what other constraints there are on the problem.
"Brian Murphy" <rudie_at_wpi.edu> wrote in message
news:Pine.OSF.4.43.0208131400150.9088-100000_at_grover.WPI.EDU...
> Here's the scenario:
>
> I have a table with ids, parent_ids, and values. What I want to do is
>
> Group all tuples with the same parent id
> Order by over the ids
> return the 2nd tuple for each group (via Rownum, I think)
>
> After trying to get this to work, I've stumbled and cannot figure out how
> to go about it. Is it even possible to use rownums and groupbys in that
> fashion?
>
> thanks.
>
> brian
>
>
>
Received on Tue Aug 13 2002 - 15:10:32 CDT