I have 2 queries and I cannot figure out how I can nest them.
I have 3 objects that look to each other in this order:
test_result__c looks up to
test_process__c which looks up to
Here are my queries:
List<Test_Result__c> activeParticipantsIds = [ SELECT Test_Process__r.Candidate__c FROM Test_Result__c WHERE Status__c = 'New' ]; List<Contact> activeCandidates = [ SELECT Name FROM Contact WHERE Id = :activeCandidatesIds.Interview_Process__r.Candidate__c ];
Do you have any idea how I can merge both queries into one? Thank you.