I have this query:
select t1.1, t1.2, t2.3, t2.4
from t1 join t2 on 8=9
where 6='a' and 7='b'
I want to string_agg all the columns in the selection by grouping by t1.1 so I did:
select t1.1,
string_agg(t1.2,','),
string_agg(t2.3,','),
string_agg(t2.4,',')
from t1 join t2 on 8=9
where 6='a' and 7='b'
but I get the error:
Multiple ordered aggregate functions in the same scope have mutually incompatible orderings.