Glossary: SQL Beyond the Basics
LAG / LEAD
Also written: LAG, LEAD
Window functions that give the value from the previous row (LAG) or next row (LEAD) in the window's order. LAG is NULL on the first row; it is used for month-over-month change.
Glossary: SQL Beyond the Basics
Also written: LAG, LEAD
Window functions that give the value from the previous row (LAG) or next row (LEAD) in the window's order. LAG is NULL on the first row; it is used for month-over-month change.