apex – SOQL Query – List of opportunities with at least one sibling
Does anyone know if it’s possible to return a list of opportunities that have at least one sibling opportunity? I’m having a hard time finding anything on this, aside from this post on the trailblazer community: trailhead.salesforce.com/trailblazer-community/feed/0D54V000077C5SeSAK
I was also suggested the question here. But this question is in regards to querying the parent records in a relationship, where I’m looking to return the child records.
I know I can query Accounts that have at least two opportunities, and then use that list to get the opportunities. But I was curious if anyone knows how to do this in a single query or if it’s even possible.
Read more here: Source link