Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to find "bottom" of table in a group query
>But I would very much like to only see the last 10 transactions done by
>each staff_if_no.
You can do it as an anonymous PL/SQL block by creating a cusor with your
query
but order the query on timestamp decending i.e. ORDER BY timestamp DESC;
You then have a row counter to increment for each row fetched and exit out
of the
loop when the correct number of rows have been fetched.
--Rich Received on Wed Mar 03 1999 - 07:56:43 CST
![]() |
![]() |