I have to identify payments that are not always transferred with the same combination of NAME - IBAN.
Let's say I have a table called "payments" that looks like this:
IBAN NAME
ABCD James Dito
ABCD James D.
ABCD J Dito
ABCD Peter Oliver
EDFG Ana Pirez
EDFG ANA P.
What I would like to identify is that the iban "ABCD" corresponds normally to James Dito (or its fuzzy match) but one payment was transfer to the iban "ABCD" with a complete different name: Peter Oliver.
My idea is to do a group_by
with fuzzy matching within each IBAN group, but I don't know how to do that.
Thus, the ideal output should look like this:
IBAN NAME
ABCD James Dito
ABCD Peter Oliver
EDFG Ana Pirez
Any help would be greatly appreciated.