My data has a column classification that has about 10 different relevant classes:
('CO', 'CO01','CR', 'CR01', 'CR06', 'CR07', 'CR08', 'CO01GV', 'CO01LG') and like 'CI%'
How do I create a new column containing all these classes whenever it is applid?
My query looks like this:
select parent_uprn, count(*) address_count, st_centroid(ST_Union(geom)) geom
from pedro_test.mbus_raw where parent_uprn is not null
group by parent_uprn
I need the classification column containing all of the classifications in each group, so that I can later query and sort groups accordingly
edit: Okay tried string_agg as suggested and it worked, however the rows are for example CO CO CO CO CO CO01, instead of just being CO CO01