In Transact-SQL (T-SQL) 2012 LAG & LEAD are the new analytical functions. LAG access data from the previous row in the same result set without the use of self-join. LEAD access data from a subsequent row in the same result set without the use of self-join. This lab is divided into four exercises explaining LEAD and LAG functions such as compare values with in partitions using LAG & LEAD, difference within partitions using LAG & LEAD.

Subscribe to Download


Version1.0
Download4
File Size791.79 KB
Create DateSeptember 12, 2016
Last UpdatedSeptember 12, 2016
Inserting Data in SQL Server
Merging Data in SQL Server