Problems / Weekly Trends / Editorial
DATE_TRUNC('week', sale_date)
LAG(weekly_revenue) OVER (ORDER BY week_start)
(current - previous) / previous * 100
Combining DATE_TRUNC for time bucketing with LAG for period-over-period comparison is one of the most common patterns in time series analytics.
DATE_TRUNC
LAG
Solve Weekly Trends yourself →