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). On Thu, Aug 28, 2014 at 10:28 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Adam Devita wrote: >>>> select id, category_id, name, min(price) as minprice >>>> from cat_pictures >>>> group by category_id; >>>> >> >> I'd be reluctant to write that query because it is non standard SQL and I >> can't easily (5 minutes of searching) point at a document that tells me the >> expected behavior. > > The SQL standard does not allow it. > > SQLite allows it for bug compatibility with MySQL. > (The returned values are from some random row.) > > In SQLite 3.7.11 or later, the behaviour is defined: > <http://www.sqlite.org/releaselog/3_7_11.html> > but IIRC this was the wish of a paying customer, and is > not documented anywhere else. > > > Regards, > Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users