Last 2 statements do the same thing, but where's the syntax documentation for "listaggdistinct"?
create temp table t(a int, b int);
insert into t values(1,2),(1,2),(2,2);
select listagg(a), b from t group by b;
select listagg(distinct a), b from t group by b;
select listaggdistinct(a), b from t group by b;