github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_aggr_group_concat.test (about)

     1  drop table if exists t1;
     2  create table t1(a int,b text,c text);
     3  insert into t1 values(1,"a","bc"),(2,"ab","c"),(3,"aa","bb"),(3,"aa","bb");
     4  select group_concat(distinct a,b,c separator '|') from t1;
     5  select group_concat(distinct b,c separator '|') from t1 group by a;
     6  select group_concat(distinct b,c separator '|') from t1;
     7  set @@sql_mode = "STRICT_TRANS_TABLES";
     8  select group_concat(distinct b,c separator '|'),a from t1;
     9  select a,group_concat(distinct b,c separator '|') from t1;
    10  select group_concat(distinct b,c separator '|'),avg(a) from t1;
    11  select avg(a),group_concat(distinct b,c separator '|') from t1;
    12  select group_concat(distinct b,c separator '|'),sum(a) from t1;
    13  select sum(a),group_concat(distinct b,c separator '|') from t1;
    14  select group_concat(distinct b,c separator '|'),a from t1 group by a;
    15  select a,group_concat(distinct b,c separator '|') from t1 group by a;
    16  select group_concat(distinct b,c separator '|'),avg(a) from t1 group by a;
    17  select avg(a),group_concat(distinct b,c separator '|') from t1 group by a;
    18  select group_concat(distinct b,c separator '|'),sum(a) from t1 group by a;
    19  select sum(a),group_concat(distinct b,c separator '|') from t1 group by a;
    20  drop table if exists t1;
    21  create table t1(a int, b char(1));
    22  insert into t1 values (1, 'a');
    23  select group_concat(a) as bb, case b when 1 then '是' else '否' end aa from t1;
    24  select group_concat(b) as bb, case a when 1 then '是' else '否' end aa from t1;
    25  set @@sql_mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";