On Thu, Aug 28, 2014 at 10:38 AM, Gabor Grothendieck <
ggrothendi...@gmail.com> wrote:

> The wording in the cited link is that
>
> "Queries of the form: "SELECT max(x), y FROM table" returns the value
> of y on the same row that contains the maximum x value."
>
> There is some question of whether min(x) is "of the form" max(x).
>

It is.  That behavior is defined and tested for min() and max().  But it
doesn't work for any other aggregate function.  Note also that if you have
multiple min() and/or max() aggregate functions in the same query, then the
result will be from the row in which one of them is the min() or the max(),
but which one is arbitrary.  So it is only well-defined if you have a
single min() or a single max().

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to