Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Select Count(Id),StageName from Opportunity Group By StageName
List<AggregateResult> aggregateList = new List<AggregateResult>(); aggregateList = [SELECT Count(Id),StageName From Opportunity Group By StageName]; System.debug('No. Of records per StageName--> '+aggregateList);
Use This code for better understanding
Please mark the best Answer if it helps you
Thanks
Akshay
Thank you for responding I have to get this requirement by using map concept so could you try once and tell me the solution.