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
sai kumar 49sai kumar 49 

What is aggregareResult? and What are aggregare function?

ManojjenaManojjena
Hi Sai ,

Try to down load the pdf and go through the aggregate section I hope all your doubt will clear .

http://www.salesforce.com/us/developer/docs/soql_sosl/salesforce_soql_sosl.pdf  

Any issue let me know I will help .

Thanks 
Manoj
Amit Chaudhary 8Amit Chaudhary 8
Aggregate functions in SOQL, such as SUM() and MAX(), allow you to roll up and summarize your data in a query

Aggregate functions become a more powerful tool to generate reports when you use them with a GROUP BY clause. For example, you could find the average Amount for all your opportunities by campaign
AggregateResult[] groupedResults
  = [SELECT CampaignId, AVG(Amount)
      FROM Opportunity
      GROUP BY CampaignId];
for (AggregateResult ar : groupedResults)  {
    System.debug('Campaign ID' + ar.get('CampaignId'));
    System.debug('Average amount' + ar.get('expr0'));
}

List of all fucntion
http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_agg_functions.htm
https://www.salesforce.com/developer/docs/api/Content/sforce_api_calls_query_aggregateresult.htm

Please mark this as solution if this will help you