I have a list with records from Policy__c which is a custom object.
List<Policy__c> PolList = New List<Policy>(); PolList = [Select ID, Code__c from Policy__c];
Now from the above query, for suppose, I have 5 records with same values in Code__c (ex: Code__c = 009) field and 3 records having same values (ex: Code__c = 110) and 10 with similar values (ex: Code__c = 876) in that field.
The values in that field might vary and new values might get added for that field.
Is there any way to differentiate the records with similar values from that list.