There is no SUM operator in Salesforce. In order to sum child records in salesforce you need to use Rollup summary field for Master-Detail relationship Objects. If you want to sum up child records related through Lookup relationship, then the easiest way would be to use Lookup Rollup Summary 3rd party App: https://github.com/afawcett/declarative-lookup-rollup-summariesHere is direct install link if you are interested: https://ramsey.my.salesforce.com/packaging/installPackage.apexp?p0=04tb0000000MXkF

FYI this app will not work if using Professional Edition. Another option for rollup summary app if using PE is “Rollup Helper”: https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009i3UpEAI.