Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: group by, order by and rownum
>ops$clbeck_at_ORA8I.WORLD> select value
> 2 from ( select value,
> 3 row_number() over ( partition by pid order by id ) r
> 4 from foo )
> 5 where r = 2
> 6 /
>
>VALUE
>----------
>B
>D
That's exactly what I was looking for. Partition by. I never would have thought of that one. I don't know enough about oracle.
brian
ps. I wish this was a homework assignment. Received on Tue Aug 13 2002 - 21:09:58 CDT