On Wed, Mar 01, 2006 at 13:31:28 -0500,
Scott Ford <Scott.Ford@bullfrogpower.com> wrote:
> Actually, I think I just figured it out. I'm not sure that I totally
> understand it - I've been passed the problem of converting it from
> someone else. But according to the documentation:
>
> -------------
> The LAST function returns the value of the last record in the specified
> field.
>
> Syntax:
> SELECT LAST(column) AS [expression]
> FROM table
>
> Example:
> SELECT LAST(Age) AS highest_age
> FROM Persons
> ORDER BY Age
> --------------
>
> So I think that I should just be able to use MAX(). Right?
You could more closely mimic this with a custom aggregate that returns the
value it was last input. However, depending on the context, you can probably
rewrite the queries to use max, min, or limit 1 with an an appropiate ordering
to do the same thing.