I got below result based on some query manipulation .....
CompanyNameAgentBranchTotalAmtCommision
-----------------------------------------------------------------
123A00000173B0001250000.00-400.00
123A00000355B000162613.00 -600.001111 pc 001 8475941.0011.00
1111 pc 001312480.003124.80
-------------------------------------------------------------------------------------------------------------------
My problem is that I want to get this query result in below form ......AgentBranch1231111TotalCommision (summation)
--------------------------------------------------
A00000173 B0001 250000.00 -400.00
A00000355 B0001 62613.00 -600.00
1111pc8475941.00 312480.003135.80