All pastes #453931 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-23 09:21 UTC
rendered paste body
i m having an table "x"
it consists of

region product month1  month2 month3 month4 month5 month6    <--- columns
1        p1     100     90      60     50      48   46
2        p2     100     90      60     50      48   46
3        p3     100     90      60     50      48   46
4        p4     100     90      60     50      48   46
5        p5     100     90      60     50      48   46

i want to display this as

name values month
1     100   month1
p1    100   month1
1      90   month2

etc
ie i want to Cross tab it like this way

what is the query to do it