New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Finance wants to see today's number next to the total for the month so far, in one table.
What you'll have at the end
One query with the daily figure and a running total beside it, matching a hand check for one day
You need
A table of individual sales, each row showing a date and an amount.
Not covered
Filling in a report row for a calendar day that had no sales at all.
Track month over month growth with LAG
go there when the ask is comparing this month's pace against last month's, not accumulating the current month alone
Smooth a noisy daily count into a 7-day rolling average
go there when the report needs a smoothed daily trend instead of a total that keeps climbing all month
Checked 26 Aug 2026
Part of the SQL for Data Analysis cookbook