I would like to retrieve the list of Opportunities which have at least one OpportunityContactRole with role equal to test
Right now, I am doing the below query but it retrieves all the rows in the opportunity table..
[SELECT Id,
(SELECT Id FROM OpportunityContactRoles WHERE Role = 'test')
FROM Opportunity
WHERE IsClosed = TRUE AND IsWon = TRUE)];TRUE];
Is there any better alternative for this??