sql - How to Pivot multiple columns into rows -


i having sample query data table:

sample data

i want output table like:

output sample data

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

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -