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.
Exercise 1: compare values within partitions using LAG & LEAD
Exercise 2: Difference within partitions using LAG & LEAD
Exercise 3: Self-Assessment
Exercise 4: T-SQL Challenge
Reviews
There are no reviews yet.