Hi Guys, I am on a tight deadline. I have a query that returns data similar to the following:
State City JanSum FebSum MarSum... DecSum
CA LA 1000 500 300 ... 200
CA SF 500 500 200 ... 300
TX Dallas 300 100 50 ... 150
TX Hou 120 400 0 ... 0
I need help in writing a query that returns the results as follows:
State City JanSum FebSum MarSum... DecSum
All All 1920 1500 550 650
All LA ... ... ... ...
All SF ...
All Dallas ...
All Hou ...
CA All ...
TX All ...
Is this achievable through a query? I am using SQL Server database. Please advise how to achieve this with some sample code if possible. Thanks in advance.
State City JanSum FebSum MarSum... DecSum
CA LA 1000 500 300 ... 200
CA SF 500 500 200 ... 300
TX Dallas 300 100 50 ... 150
TX Hou 120 400 0 ... 0
I need help in writing a query that returns the results as follows:
State City JanSum FebSum MarSum... DecSum
All All 1920 1500 550 650
All LA ... ... ... ...
All SF ...
All Dallas ...
All Hou ...
CA All ...
TX All ...
Is this achievable through a query? I am using SQL Server database. Please advise how to achieve this with some sample code if possible. Thanks in advance.