I am trying to include an additional currency field in the below Group By query, but receive SOQL error.
"Field must be grouped or aggregated".
Is it possible to add a Currency Field to a Group By Query and still display the same result set w/ same # of rows?
Select Deal_Transaction__c, Investing_Entity__c,
Original_Amount_of_Investment__c, SUM(Current_Investment_Amount__c)
From Investment__c
Where Investor_Account__c = '001E000001All68IAB' and
Current_Investment_Amount__c!=0
Group By Deal_Transaction__c, Investing_Entity__c
AggregateResult
represents a collection of records. The collection doesn't have anOriginal_Amount_of_Investment__c
value. What are you trying to accomplish? You can sum it, average, min, max, etc, but no you cannot display the value of that field because it doesn't even make sense what that would represent.