LEAD(expr [, N[, default]]) [null_treatment] over_clause

Returns the value of expr from the row that leads (follows) the current
row by N rows within its partition. If there is no such row, the return
value is default. For example, if N is 3, the return value is default
for the last two rows. If N or default are missing, the defaults are 1
and NULL, respectively.

N must be a literal nonnegative integer. If N is 0, expr is evaluated
for the current row.

over_clause is as described in
https://dev.mysql.com/doc/refman/8.0/en/window-functions-usage.html.
null_treatment is as described in the section introduction.

For an example, see the LAG() function description.

URL: https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html

