I'm trying to use an aggregate query, but one of the fields I want to group by is not groupable (saw it in the soql error and then verified groupable=false in the metadata).
It's just a number field that holds an integer (number 2,0 in salesforce field spec-speak).
Is there a trick to make it groupable? Any way around this problem? I don't want to write hundreds of lines of code just to average a list by this field.
Best Answer
I'm not 100% sure what makes it "groupable". The Considerations When Using GROUP BY does mention it:
Although not exactly elegant, you could try to copy the not groupable field to a groupable field via a workflow rule and then group by that one instead.