I want to transpose columns into rows (without using UNION):
|Dimension1 | Measure1 | Measure2 |
-----------------------------------
| 1 | x1 | y1 |
| 0 | x2 | y2 |
Into:
| Dimension1 | Measures | Values |
-----------------------------------
| 1 | Measure1 | x1 |
| 1 | Measure2 | y1 |
| 0 | Measure1 | x2 |
| 0 | Measure2 | y2 |
The number of the measure is fixed.
I'm using Amazon Redshift.