I need to generate a report with list of duplicate contacts and their duplicate count. I’m trying to run below query through Data Loader and Workbench & Export the results.
select count(id), firstname, lastname, birthdate from contact GROUP BY firstname, lastname, birthdate HAVING count(Id) > 1
But I am getting below error:
Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch.
Trying to use LIMIT 2000 per batch does not help as BULK API does not support Aggregate functions in the query and also I cannot Limit the records to 200 per each batch as there are 1 million records.
Can anyone please suggest me a solution on how to export duplicate contact's into a csv file. Is there any other way other than Data Loader/Workbench?