I need to amend my previous so please run with this one. I am importing data from bitquery, that data is being appended to my main table. I need to compare the currency values for duplicate records, replace and delete the records without ruining the links made with other tables. Let me know if you have any additional questions.