• I recently used LAG for calculating the difference in values between two rows in an ordered set. It was for a manufacturing application in which product weights are recorded in a cumulative fashion and we needed the weight differentials for performing certain calculations.

    Cheers,

    Adolfo Socorro