Barclays interview question

SQL business case to pull the data