How would you obtain the following output using SQL?
Type: Value Type2 Value2
p_01 1 ofpk_01 1
p_02 2 ofpk_02 2
p_03 3 ofpk_03 3
Table structure
create table test(p_01 int,
p_02 int,
p_03 int,
ofpk_01 int,
ofpk_02 int,
ofpk_03 int)
Is this possible with unpivot function? here is what I've got so far: