In 'Settings/Users/Access Management', enable the right 'Delete or merge customers'.
Then go to 'Customers/Customer settings' in the 'Merge customers' section.
Select the duplicate customer ('From') whose sale history will be be transferred to the primary customer ('To') then apply.
The primary customer will also receive the loyalty points of the duplicate customer.
The duplicate customer profile (email, tax number, date of birth, tags...) are not transferred. The primary customer information will be unchanged.
Once completed, the duplicate customer is deleted.
You cannot merge a duplicate customer with a store credit or prepaid purchases history.
Applications using your customer database (like after-sale, gift cards or Track customer) are not updated after a merging action.