On Apr 25, 2011, at 7:57 AM, Nico Williams wrote:

> For group_concat(), however, this undefined order is
> obnoxious.

Seconded. As it stands, group_concat nondeterministic nature renders it useless 
for most practical purposes.

For what's worth, here is the syntax adopted by Oracle for its LISTAGG function 
[1]:

LISTAGG( expression,  delimiter ) WITHIN GROUP ( ORDER BY clause ) 

As group_concat already supports 'distinct', perhaps tagging 'order by' at the 
end of the expression would not be that bad:

GROUP_CONCAT( DISTINCT expression ORDER BY clause, delimiter )

EIther way, irrespectively of syntax, group_concat would greatly benefit from a 
deterministic ordering :))


[1] 
http://download.oracle.com/docs/cd/E14072_01/server.112/e10592/functions087.htm

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

Reply via email to