I have a data set in the form.
id | attribute ----------------- 1 | a 2 | b 2 | a 2 | a 3 | c
Desired output:
I haven't tested this query, but these functions are supported in Redshift:
select id, arrary_to_string(array(select attribute from mydataset m where m.id=d.id),',') from mydataset d