Rolling 30-Day Revenue (RANGE Frames)

hard
Unit 23 · Window Functions 110/0 to milestone

For each order, compute the shop's total revenue over the 30 days ending on that order's date, inclusive: from 29 days before through the same day, counting every order in that period, including other orders on the same day.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
query.sql · SQLite
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Rolling 30-Day Revenue (RANGE Frames) · TechGradify