I am trying to convert rows to columns . Please look at the below sample:
colname | data1 | data2
---------|--------|------------------------------------
a | 1 |
a | 2 |
a | 3 |
b | 4 |
b | 5 |
c | | 6
c | | 7
I want the output as:
a | b | c
---------|--------|------------------------------------
1 | |
2 | |
3 | |
| 4 |
| 5 |
| | 6
| | 7
Could anyone please share your ideas on how to solve this?