I am trying to merge the rows x1..x3 in a single column based on the unique identification of postal code.
Current table:
postalcode | x1 | x2 | x3 |
---|---|---|---|
T2Z4Y6 | -113.97203 | -113.972029 | -113.972027 |
T2Z0H4 | -113.972411 | -113.972783 | -113.97294 |
And, I want to transpose the same in rows as below:
postalcode | x |
---|---|
T2Z4Y6 | -113.97203 |
T2Z4Y6 | -113.972029 |
T2Z4Y6 | -113.972027 |
T2Z0H4 | -113.972411 |
T2Z0H4 | -113.972783 |
T2Z0H4 | -113.97294 |
How can I do the same in SQL?