Warning: session_start() expects parameter 1 to be array, string given in /home/sqlthoug/public_html/blog/wp-includes/class-wp-hook.php on line 287
Analytical Functions – SQL Thoughts

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