Barclays interview question

Complex SQL queries based on scenarios