Parent Records With Only One Child Record In SOQL In Salesforce Leave a Comment / General Knowledge / By Ntsh SELECT AccountId, count(Id) FROM Contact GROUP BY AccountId HAVING count(Id) = 1