I have a lot of duplicate rows in Leads and some business rules for merge these fields.
I suppose that I need to get leads data through API, then to add logic of my business rules. But I don't know which sql query uses for to get Leads duplicate, how to delete cascade unnecessary rows and update an unique row.
Does anyone know how to make it??