Day-over-Day Price Change
Medium
Window Functions
For each date show the price and the change compared with the previous day. The first day has no previous day, so its change is NULL.
Table schema
Prices(price_date DATE PRIMARY KEY, price INT)Sample data
price_date | price
2026-01-01 | 100
2026-01-02 | 110
2026-01-03 | 105
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.