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