I have a field called purchase price in orders table. When I query for those orders, I got 4 records. They are as follows
Here, as per the above query, when i sum purchase_price__c, i am getting 194.99. But, when I update the query to return the sum(purchase_price__c), I am getting the result as 216.
Is this issue due to sum function or if we sum the field, will it consider deleted records as well? I'm pretty confused here. Why do the numbers differ?