I want to write a data migration that read the records in the right order and delete the older records when the newer record was found
I write the sql for this one. B