convert columns to rows in sql
I have table
STOCK THINGS COUNT PRICE
STOCK1 A 20 200
STOCK1 B 10 150
STOCK2 A 15 100
STOCK3 B 12 250
STOCK4 C 11 150
..... .... .... ...
STOCKn N ... ...
and I want to convert to
THINGS STOCK1COUNT STOCK1PRICE STOCK2COUNT STOCK2COUNT .........
A 20 200 15 100
B 10 150 0 0 ..........
|