Subtract the previous day's value.
Section: Time-series patterns
Day-over-day absolute change
sql
sql
SELECT day,
revenue,
revenue - LAG(revenue) OVER (ORDER BY day) AS revenue_change
FROM daily_revenue;Explanation
A simple difference often matters more than the raw value.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Time-series patterns