Created
November 27, 2013 00:50
-
-
Save cdeutsch/7668962 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| SELECT [Year], [Month], [Description], SUM(RenewalPrice) | |
| FROM ( | |
| SELECT YEAR(CONVERT(datetime, Subscription__r_Renewal_Date__c)) AS [Year], MONTH(CONVERT(datetime, Subscription__r_Renewal_Date__c)) AS [Month], CONVERT(nvarchar(500), [Description]) AS [Description], Subscription__r_Renewal_Price__c AS [RenewalPrice] | |
| FROM OPENQUERY(DBAMP, ' | |
| SELECT Id, Description, Subscription__r.Renewal_Date__c, Subscription__r.Renewal_Price__c | |
| FROM Asset | |
| ')) AS tmp | |
| GROUP BY [Year], [Month], [Description] | |
| ORDER BY [Year], [Month], [Description] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment