Compare Current vs Previous 7-Day Rolling Sum

SQL coding challenge · Difficulty: medium · +200 XP

The growth team tracks daily momentum. For each day, show both the 7-day rolling total AND how much that total changed from the previous day — a positive change means the trend is improving.

Return: date, rolling_sum, prev_rolling_sum, daily_change

Sort by date ascending.

Solve this challenge on PySpark.in