Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get first record of each item only ?
Sorry, I misunderstood the question.
It would be something like:
select itemid, qty from
(select itemid, qty, rank() over (partition by itemid order by THE_ORDER_YOU_WANT) v_rank ) where v_rank = 1;
Cheers. Received on Fri Apr 22 2005 - 04:47:41 CDT