Tech Mahindra Interview Question

Window functions in sql and cte