In this video, we demonstrate LEAD() and LAG(), two window functions in SQL that allow you to access the next or previous row's value within a dataset.
Query (requires sign-in):
https://data.world/medianpulse/sql-sp-500-2024-prices/workspace/query?queryid=fc781c23-7c1f-4ac9-a44b-1ee014efccde