Non monthly regular DD TEST

PHOTO EMBED

Fri Jul 08 2022 09:24:57 GMT+0000 (Coordinated Universal Time)

Saved by @Matt_Stone #bigquery

select Transaction_Allocation__c.Close_Date__c,sum(Transaction_Allocation__c.Amount__c) amount,COUNT_DISTINCT(Opportunity__r.Id) The_Count,  Opportunity__r.CiWF_Payment_Method__c, Opportunity__r.Country_of_Ownership__c,Opportunity__r.CurrencyIsoCode 
from Transaction_Allocation__c

where 
Transaction_Allocation__c.Close_Date__c  > 2022-03-31 AND Transaction_Allocation__c.Close_Date__c  < NEXT_N_DAYS:1 

AND Transaction_Allocation__c.Stage__c IN ('Posted')

AND
Opportunity__r.RecordTypeId ='012w00000006jGy'
AND
Transaction_Allocation__c.GL_Code__c IN ('50030', '50090')
AND
Opportunity__r.Recurring_Donation_Installment_Period__c != 'Monthly'


Group by Transaction_Allocation__c.Close_Date__c,Opportunity__r.CiWF_Payment_Method__c, Opportunity__r.Country_of_Ownership__c,Opportunity__r.CurrencyIsoCode 
content_copyCOPY