You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Syntax error when using function in GROUP BY in SOQL queries #84
So, I assume, that the following SOQL query is indeed valid syntax:
SELECT
ExternalId__c,
CALENDAR_YEAR(CustomDateField__c) year,
SUM(CustomAmountField__c) amount,
COUNT(Id) counter
FROM CustomObject__c
GROUP BY ROLLUP(
CALENDAR_YEAR(CustomDateField__c),
ExternalId__c
)
ORDER BY
ExternalId__c ASC NULLS FIRST,
CALENDAR_YEAR(CustomDateField__c) ASC NULLS LAST
LIMIT 2000
The current grammar only allows field names in a group by clause.
Activity
Allow functions in soql query grammar for GROUP_BY