KPMG Interview Question

What do you mean by stacks? Write a query