Get parent records with 0 children in SOQL

Sample Query:

SELECT Id, Name FROM Account WHERE Id NOT IN (SELECT AccountId FROM Contact)

Cheers!!!

No comments:

Post a Comment