Barclays Interview Question

Few question on SQL window functions