SQL LEAD Function

SQL LEAD Function 3

The SQL LEAD is one of the Analytic functions. This function allows you to access the data from a subsequent row without using any SELF JOIN. The basic syntax of the LEAD in SQL Server is as shown below: SELECT LEAD([Scalar Expression], [Offset], [Default]) OVER ( PARTITION_BY_Clause ORDER_BY_Clause ) FROM [Source] Scalar Expression: Column, Subquery, or expression … Read more