I have two custom objects in Salesforce: Object1 and Object2 Object2 has a lookup field that references to Object1. More than one record in Object2 could have the same Object1 record referenced. I have to build a SOQL query wich makes a join of Object1 and Object2 where the matching is one-to-one.
ie. With those values in Object1 and Object2 I want that result:
The record in Object1 with Id=2 is not in result because it has two records in Object2 that references it. I would like to know how to achieve this with a SOQL query.
Thanks in advance!