Pergunta de entrevista da empresa LatentView Analytics

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