Skip to content

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.

Where the book teaches it

Related terms

Window function