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
Jonathan Lewis schrieb:
>
> For details on the last possible timestamp
> per staff_id_no, the following should work:
>
> select *
> from region_log r1
> where (r1.staff_id_no, r1.timestamp) in
> (Select r2.staff_id_no, max(r2.timestamp)
> from region_log r2
> where r2.timestamp > sysdate-1
> group by r2.staff_id_no
> )
>
> As others have pointed out,though, there is no
> 'nice' solution to general 'bottom 10'/'top 10' problem.
>
I disagree:
check out dejanews archive for Jurij Modics TOP X solution posted here
last year!
HTH
Matthias
--
grema_at_t-online.de
Es gibt nichts Neues mehr.
Alles, was man erfinden kann, ist schon erfunden worden.
Charles H. Duell, Leiter des US Patentamtes bei seinem Rücktritt 1899
Received on Thu Mar 04 1999 - 01:09:52 CST
![]() |
![]() |