• Re: Alternative method for those without LEAD() and LAG()

    The original code WITH LEAD() and LAG() seems easier to read for me.

    The alternative method would apply in a version of SSQL which does not support LEAD or LAG. Otherwise, time to look at using the new features.

    Maybe someone who is an old hand at this could compare the actual execution plans to see which method scales better ?