LAG & LEAD Analytic Function in Oracle.
LAG and LEAD Analytic Functions.
The LAG and LEAD analytic functions to give access to multiple rows within a table without the need for a self-join.
the LEAD function is used to return data from rows further down the result set. The following query returns the salary from the next row to calculate the difference between the salary of the current row and the following row.
kindly support my channel
https://www.youtube.com/c/KalyanS?sub_confirmation=1