As you might know, SQLite3 does not define the order in which
aggregate functions are applied to the values to be aggregated.  For
traditional aggregation functions (min(), max(), ...) this makes
perfect sense.  For group_concat(), however, this undefined order is
obnoxious.

Apparently MySQL has syntax for specifying the order in which
group_concat() is applied: group_concat(... ORDER BY ...).  I'm not
sure I like it.  In fact, I think I'd rather have an ORDER BY that
specifies the ORDER in which all aggregate functions in a group will
be applied, rather than doing so on a per-aggregate expression -- it'd
be a lot easier for the query optimizer to concern itself with a
single order for aggregation within a grouped set of rows than with N
distinct orderings.  Either way, however, I'd very much like to have
some such syntax.

Are there any plans to add such syntax to SQLite3?  Can the SQLite3 VM
as it is handle such a feature, or would it need extending?  Would
such a feature be accepted?  What should the syntax be, if the feature
were acceptable?

Thanks,

Nico
--
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to