Skip to main content
1 of 2
raygo
  • 305
  • 1
  • 5
  • 13

GROUP BY custom field

I'm doing this query:

 SELECT
      ID, Name, Email_Domain__c
    FROM
      Contact
        GROUP BY Email_Domain__c

And I'm getting this error

MALFORMED_QUERY: GROUP BY Email_Domain__c ^ ERROR at Row:5:Column:12 field 'Email_Domain__c' can not be grouped in a query call

Is there a way form to GROUP BY a custom field?

UPDATE

When I check this field in workbench, it has these 2 properties

calculatedFormula: RIGHT(Email,((LEN(Email)-(FIND("@",Email)))))

groupable: false
raygo
  • 305
  • 1
  • 5
  • 13