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
Raghav Sharma 39Raghav Sharma 39 

On account , we have contact. There is a custom object called employee having lookup on contact and custom field called salary. I want to display the sum of all employee salaries on account record . Can we write an soql query for this?

Raj VakatiRaj Vakati

Try this.. 

Select Sum (sal__c) from Employee__c groupBy Contacts.AccountID__c