LEAD

Equivalents for analytic functions

MySQL. Usage of query variables

LAG and LEAD functions

Window functions