Pregunta de entrevista de LatentView Analytics

A difficult level SQL question on multiple joins and window functions within a single query