I want to fetch duplicate records based on phone number. I have written soql query on devconsole like
List<Account>Ac=[Select Id, CSS_CustomerID__c, Customer_ID__c,
Customer_ID_ReadOnly__c,AFrontier_Prospect_Code__c,CSS_Prospect_Code__c,
IOG_Customer_ID__c, RecordType.Name, CleanPhone__c, CleanPhoneText__c,
CSS_ListingTel__c, Phone, CreatedDate
from Account group by CleanPhone__c having count(CleanPhone__c) > 1];
but its not working. Anyone have idea?