Monthly Archives: April 2014

An Example of Using LEAD and LAG Functions from SQL Server 2012

I recently encountered a technical interview question and it was something like this: A company has its door access logging system and the company policy dictates that every employee’s card-in/card-out records shall reflect his/her true presence in or absence from … Continue reading

Posted in Common Table Expression, T-SQL Script | Tagged , , | Leave a comment