sql - How to Pivot multiple columns into rows -
i having sample query data table:
i want output table like:
i tried using pivot operator not possible sum them all.
select * ( select * woddb.citystock_unpivot ) tblcity unpivot ( outputvalue [outputfieldname] in (sales, stock, [target]) ) unpvt pivot ( sum(outputvalue) category in (panel,ac,ref) ) pvt
Comments
Post a Comment