Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT Id,
- (SELECT Business_Unit__c, Department__c, Role__c FROM Account_Roles__r WHERE Role__c IN :roles AND Business_Unit__c IN :businessUnits ORDER BY CreatedDate DESC NULLS FIRST )
- FROM Account
- WHERE Id IN :accIds
- AND Id IN (SELECT Account__c FROM SKY_Account_Role__c)
- ORDER BY Name ASC NULLS FIRST
- SELECT Id,
- (SELECT Business_Unit__c, Department__c, Role__c FROM Account_Roles__r WHERE Role__c IN :roles AND Business_Unit__c IN :businessUnits ORDER BY CreatedDate DESC NULLS FIRST )
- FROM Account
- WHERE Id IN :accIds
- AND Id IN (SELECT Account__c FROM SKY_Account_Role__c WHERE Id IN :accIds)
- ORDER BY Name ASC NULLS FIRST
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement