I am trying to pull a list of all contacts in accounts with certain opportunities. My initial query looks like this:
Select Id, Name , Account.id
From Opportunity
WHERE RecordType.Name IN ('1A,'1B')
This identifies a few hundred opportunities, now what I can't figure out is how to relate this back to the associated Account to list all of the contacts in those Accounts. There should be a relation that would allow me to do this.