Barclays Interview Question

SQL question, how to merge two table