Last active
December 15, 2015 23:59
-
-
Save isanuki/5343999 to your computer and use it in GitHub Desktop.
SOQL 日付関数サンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AggregateResult[] results = [SELECT FISCAL_YEAR(CloseDate) year, | |
SUM(Amount) summary | |
FROM Opportunity | |
WHERE IsWon = true | |
GROUP BY FISCAL_YEAR(CloseDate)]; | |
for(AggregateResult ar: results){ | |
System.debug('年度='+ ar.get('year') | |
+ ':金額='+ ar.get('summary')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment