Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> All rows with a value less than max?
Hi,
Stumped on this. I'm sure the answer is simple and elegant, just can't get my mind to stretch it.
I need to retrieve all rows that have a value for time that is less than the max time. Is there a way to do this without a subquery?
select snap_id,snap_time from $stats where database_name = 'donkey' and snap_time < (select max(snap_time) from $stats) ;
Thanks,
Josh C.
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Aug 22 2006 - 15:32:41 CDT
![]() |
![]() |