Unpivot aggregated fields and adding to an existing column in Redshift

Viewed 15

PLEASE VIEW IMAGE FIRST I have the top table with 5 columns. The yellow ones are results of a SUM operator. I would like to add them as rows to "product_line" and the appropriate values (as in the bottom image).

UNPIVOT was my first option but I'm not able to add the unpivoted values to an existing column. I would love to get help on this.

[1]: https://i.stack.imgur.com/4yIPj.png

0 Answers
Related