I have a requirement to query for master objects that have no corresponding detail objects. This would be similar to querying for Accounts with no Opportunities.
In SQL I might do this:
SELECT Id FROM Account A LEFT JOIN Opportunity O ON O.AccountID = A.Id WHERE O.AccountId IS NULL.
What is the SOQL way of doing this?
Best Answer
I would do the following query :
Updated:
Debug Log :