I am using SAP Business Objects Web Intelligence, they have a nice feature call LAST, which simply returns "the last value in a data set". I tested this out and at first it looked good, but then I found a case where it wasn't returning the logical "Last". It DOES return the LAST record of the data set, as returned by Oracle.
When you write a query in Web Intelligence, Order by is not specified, it just returns everything in whatever order Oracle does, then you sort it in Web Intelligence.
Here's the data set returned by Oracle. It's not sorted by the date of the records entry, so then what is the logic? It doesn't look I can use the Web Intelligence function LAST.