I have 3 (A,B,C) objects they are A-master B-Junction object and C master of B object, B object has the Master detail relationship with A and B objects. When the records created for B due to some reason duplicate records inserted into B object the duplicate records contains the reference of both A, B same combination repeated twice.
My Question is how to identify the records in B which are duplicates for the Master records A,B. Require a SOQL query to identify them. Any help is Appreciated.