Barclays interview question

Something related to SQL and merging