Skip to content
Advertisement

SQL SERVER PIVOT like PEPSI comes under year then by months etc.. (refer attached image for a clear idea)

I am new to PIVOT… so i dont know whether is it possible or not with pivot.

Here is the table and the sample data i used

— PRIVOT Query

enter image description here

using the above query i got an output like in the attached

[please look the attachment for the required output that i was trying and the output i got using the above query ]

Advertisement

Answer

This is For SSRS

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement