The LAG() function retrieves a value from a previous row, while LEAD() retrieves a value from a subsequent row, both based on a specified ordering within a result set.
Share this post
SQL: LAG() - Finding maximum concecutive…
Share this post
The LAG() function retrieves a value from a previous row, while LEAD() retrieves a value from a subsequent row, both based on a specified ordering within a result set.