You need to sign in to do that
Don't have an account?
beingofhabits
Map of aggregated by 2 fields result
Hello
So, we are able to do something like this
I mean something like the following
Have a nice day!
So, we are able to do something like this
Map<String, AggregateResult> aggregations = new Map<String, AggregateResult> ([SELECT Status Id, COUNT(Id)QTY FROM Case GROUP BY Status ]);But is there any options to do the same with at least 2 aggregated and grouped fields?
I mean something like the following
Map<String, Map<String,AggregateResult>> aggregations = new Map<String, Map<String, AggregateResult>> ([SELECT Status Id, Department__c dId, COUNT(Id)QTY FROM Case GROUP BYStatus, Department__c ]);And if not, is the manually written parser the only solution?
Have a nice day!
Please check the below Code function:
Please like and mark this as best answer if you find it Positive.
Thanks,
Jolly Birdi