First of all, I don't believe, that you will find any solution for your idea: the database is the instance, that sends all data records, that match the original SQL statement, to the TQuery/TDataset component. A TDBgrid is the visualisation tool only. If a database provides 100 records, the TDBGrid will always show 100 datasets. I don't believe, that there could any frontend logic, that compresses 100 records into 40 datasets for example.
And -if I understand you correctly- you don't know the merging criteria exactly. I believe your task is to clean up an inconsistent customer database, and it may be that in one case the name is correct and the email incorrect, but in the next the email is correct and the name incorrect.
One can only proceed systematically in such a case; define the fields that must always be identical, count the records that have a match with these criteria and correct the other fields:
select ID,
NAME,
count(*) as number
from customers
group by id, name
having count(*) > 1;
You could write a software, who creates this SQL-statement at runtime, changes the query and reopens it again. So you can try a stepwise approach to condense your customer database.