Pregunta de entrevista de Apple

A SQL Question that requires a window function