Synechron Interview Question

Window function in SQL for first round