OVER Clause

I think that the OVER clause is underutilized. I plan to start using it more for development solutions.

It determines the partitioning and ordering of a rowset before the associated window function is applied. That is, the OVER clause defines a window or user-specified set of rows within a query result set. A window function then computes a value for each row in the window. You can use the OVER clause with functions to compute aggregated values such as moving averages, cumulative aggregates, running totals, or a top N per group results.

This link provides a great overview of the OVER clause.

http://www.sqlservercentral.com/articles/Over+Clause/132079/

BTW: You can now subscribe to this blog.

Leave a Reply

Your email address will not be published. Required fields are marked *