I am doing subquery Of Opportunities on Contact as follows:-
Select id,(select id from Opportunities) from Contact where id in (select ContactId from OpportunityContactRole)
I know this will return those Contacts which have at least one related opportunity. But what I can see, Those Opportunities which are Closed are not coming in the result but ContactId is coming.
Later, I found this is happening for those Opportunities whose contact roles have not checked for primary=true.
Can You make me understand this behaviour?