How to convert columns and primary rows??
tbl1
| p1 | p2 | p3 | ...
g1 | 1 | 2 | 3 | ...
g2 | 4 | 5 | 6 | ...
g3 | 7 | 8 | 9 | ...
expected result
| g1 | g2 | g3 | ...
p1 | 1 | 4 | 7 | ...
p2 | 2 | 5 | 8 | ...
p3 | 3 | 6 | 9 | ...
how to make expected result table with tbl1