Pergunta de entrevista da empresa Apexon

SQL - 1 window function and 1 aggregate functions question