ingenioussql.com
LAG() and LEAD() Analytical Window Functions
I have been finding more and more uses for the OVER statement recently and I figured it was about time I did a blog post on it. The OVER statement captures a window of data that can be aggregated a…