LEAD and LAG functions in SQL 2012

SQL 2012 introduced two new analytical functions LEAD and LAG that would help accessing a preceding and subsequent rows in a query. Consider the subsequent example, we have to find the employees who were absent for two consecutive days   EmployeeID        SigninDate   1 2014-01-03 1 2014-01-04 1… Continue Reading LEAD and LAG functions in SQL 2012