Rolling Sum with Missing Dates

SQL coding challenge · Difficulty: medium · +200 XP

Your sales database has gaps — some days have no entries at all (zero sales). The finance team needs a complete date series with no missing days, where missing days show 0, and a running cumulative total.

Return: date, sales (0 if missing), running_total

Sort by date ascending.

Hint: You will need to generate all dates between the min and max date in the table.

Solve this challenge on PySpark.in