I'm currently trying to write a SOQL Query to pull all Accounts that have < 5 related Contact objects AND No related
ts2__Placement__c objects (custom object).
I have successfully been able to pull all Accounts that have < 5 related Contact objects using below:
Select AccountId, Count(Id) from Contact group by AccountId having count(Id) > 5
However, I'm having trouble with how the custom object relates into that query. I assume it'll have to nest as a sub-query.