Skip to content
Advertisement

How to query SQL by month & id to get SUM

I have the table data like:

enter image description here

And I want to display asp.net table like: enter image description here

Here is the code to get data by group month and shop code

But i don’t know exactly how to display data like image 2 in asp.net html table.
Can anyone advise on how to do that in asp.net?
Thanks in advance.

Advertisement

Answer

Create a pivot table :

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