FavoriteRaghav Sharma (Salesforce) asked in #ApexOct 17, 2018, 10:42 AMOn 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?1 answerSortSort by DateSort by Most HelpfulSort by DateRajamohan Vakati (Amazon)Oct 17, 2018, 4:00 PMTry this.. Select Sum (sal__c) from Employee__c groupBy Contacts.AccountID__cAdd a commentWrite an answer...BoldItalicUnderlineStrikethroughBulleted ListNumbered ListAdd linkCode blockInsert imageAttach filesLink URLCancelSave0/9000Reply
Rajamohan Vakati (Amazon)Oct 17, 2018, 4:00 PMTry this.. Select Sum (sal__c) from Employee__c groupBy Contacts.AccountID__c