Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Help with this SQL statement please...
I have a table called milestone containing this data -
mile_id actual_date ------- ----------- 3 12/02/2003 1 10/10/2002 2 31/01/2003
I want a SQL statement to return ONLY the row with the highest mile_id AND with an actual_date. This works -
SELECT MAX(mi.mile_id), MAX(mi.actual_date) FROM milestone mi WHERE AND mi.actual_date IS NOT NULL
returning
3 12/02/2003
which is correct but is this the best way? - the bit I'm really querying is the "MAX(mi.actual_date)"
many thanks
harry Received on Mon May 16 2005 - 04:27:47 CDT
![]() |
![]() |