Skip to content
Advertisement

SQL query to unpivot and union for multiple column

I’m trying to achieve the following result…

input, table A

I would obtain this output

I’m trying to use cross apply and I can create the column “month_year” but I don’t know how to merge “values” in the last column. Thanks for help!

Advertisement

Answer

I think this is basically apply:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement