I have a field in PostgreSQL of type character varying [] stored here is sector, some customers have no data, others have 1 to many sectors which ends up looking like this
**Customer** ABC
**Sector** ,Exh: Food Trade,Exh: Beverage Trade,Evt: Sporting
does any one know how I could query this out per value? to give me the unique values per customer
**Customer** ABC **sector** Exh:Food Trade,
**Customer** ABC **sector** Exh:Beverage Trade
**Customer** ABC **Sector** Evt:Sporting
psqloutput` See here for some tips on how to create nice looking tables. Or even better: create a little fiddle that sets up the table and some sample data, e.g. here: dbfiddle.uk/?rdbms=postgres_12