Hello
I have the following table:
MONTHS_PLANNING

Being M0 for the past month, M1 for current Month, M2 for the next month and so on.
I want to transform this table to this:

Making the sum for the M0 to M3 grouping by Customer is simple, but replacing the M# with a tag for the month have left me without any idea.
Wonder if anyone has some idea how to handle this without writing a separate query for each M# and making the union between them.
Thanks