如何在 SOQL 中將日期照著年份或月份分組 How to group by year or month in SOQL?

範例

SELECT count(id), CALENDAR_YEAR(createddate )  FROM Opportunity 
group by CALENDAR_YEAR(createddate ) 



其它你可能不知道但很好用的 SOQL 函數

留言