Tech Mahindra interview question

Window functions in sql and cte