Many relational database management systems (RDBMSs) have a LEAD()
function that allows us to retrieve a value from a following row.
The SQL LEAD()
function returns the value of a given expression from the row that leads (follows) the current row by a given number of rows within its partition.