Rising Temperature
Comparing a row to its predecessor (yesterday vs today, previous price vs current price) is a common time-series pattern in analytics. Both the self-join with DATEDIFF and the LAG window function approaches are frequently asked.
Enable JavaScript for the full StreamPrep guide.