On Tue, Jan 2, 2018 at 1:36 PM, Tony Papadimitriou <to...@acm.org> wrote: > create table t(s); > insert into t values ('A'),('A'),('B'); > > select group_concat(s,', ') from t group by null; -- OK > select group_concat(distinct s) from t group by null; -- OK > select group_concat(distinct s,', ') from t group by null; -- ERROR > > -- The moment the optional delimiter is given along with DISTINCT you get > this error: > -- Error: near line 6: DISTINCT aggregates must have exactly one argument
A limitation of the SQL syntax. I suspect this might work for your example use case: select group_concat(s, ',') from (select distinct s as s from t) group by null; Tested and confirmed here. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users