function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
adi salesforceadi salesforce 

How to get the no.of records related to stagename and leadsource in opportunity using map concept

Raj VakatiRaj Vakati

Use salesforce aggregate query as shonw below 
Select Count(Id),StageName , leadsource  from Opportunity Group By StageName ,leadsource

adi salesforceadi salesforce
Hi Raj,
Thank you for responding. could you give me complete apex class and  vf page to display it.