slice Interview Question

sql questions about window functions