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


Is there a Sum function is SOQL?


I read in some other boards that it is not available, but those were posts of last year...Just was wondering if anything changed....


I know group by doesnt work, but im just asking about a straight sum of 1 column, like :


Select Sum(col1) from Invoices__c


(Im making the call from APEX...if that changes anything....)



Greg HGreg H

Sorry but there is still no sum function in SOQL.

According to the pre-release notes for the Spring '10 release, this is coming, and of course group by would be as well.