Levi Strauss interview question

SQL assessment with window functions and aggregates