Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I can't though. The problem is that this is a query from a separate system that can only issue a single query to get the results it expects. I could easily do it from Salesforce/Apex, but don't think it is possible with the single query requirement.
Thank you for this great explanation. Unfortunately, in the much longer query, I do need to base it off of the orderitems. I think I'm going to have to use some automation to populate a field on the opportunity when an OpportunityPartner of the appropriate type is created.