Trying to write a query that can make the existing Postgres table that looks like first set below to give a result of the second set here:
ID | Month1 | Month2
A | 2 | 3 --(qty)
B | 4 | 5 --(qty)
Result
ID | Month | QTY
A | Month1 | 2
A | Month1 | 3
B | Month1 | 4
B | Month1 | 5
The best idea is to use multiple unions but that would be very long. Is there a more efficient way to get around this?