I am not getting the right results back from my join query. I want all Employee_Benefit_Summary__c records that have a Grand_Total_Premium__c value greater than 0 that do not have any related Employee_Session_Benefit__c records.
SELECT Id, Name FROM Employee_Benefit_Summary__c WHERE Id NOT IN ( SELECT Employee_Benefit_Summary__c FROM Employee_Session_Benefit__c WHERE Account_Benefit__r.Account__c = '00180000015p27UAAQ' AND Account_Benefit__r.Name LIKE 'Cigna%' ) AND Grand_Total_Premium__c != 0
Parent Object: Employee_Benefit_Summary__c Child Object: Employee_Session_Benefit__c
The child objects are all related to the parent object.
Do I maybe have the object queries flipped around. As in should the employee_Session_Benefit__c query be first with the other object as the internal query.