Barclays interview question

questions on self join