Pergunta de entrevista da empresa Borrowell

Standard sql question in the OA which was about using a window function along with a group by and order by