Home » Databases » Window Functions tutorial


Window Functions tutorial


This video course covers the practical use of window functions to improve SQL query performance.

Watch these few simple lessons and find out what are the window functions and how to use them. Learn from real-life examples how to solve common SQL problems in an easier, more intuitive, and often better-performing way than was previously possible. The tutorial shows the use of window functions in MS SQL Server 2012. 6 lessons, 1 h 50 min.

Window functions belong to a type of functions known as a “˜set functions” and they are the most profound feature supported by SQL language and Microsoft’s dialect – Transact-SQL standards. They are applied to a set of table rows , and performs a calculation across a set of rows that are somehow related to the current row. This is comparable with an aggregate function, but unlike regular aggregate functions, window functions don’t cause rows to become grouped into a single output row, i.e the rows retain their separate identities. Moreover window functions are able to access more than just the current row of the query result.

Window functions are more intuitive and simpler in many cases than alternative SQL methods. Using window functions, you can solve many difficult tasks like: de-duplicating data, paging, computing running totals, identifying gaps and islands, returning top n rows per group, sorting hierarchies, pivoting etc. The design of window functions overcomes the traditional alternatives. Now you can perform calculations against sets of rows in a clear, flexible and efficient manner.

  1. Window Functions Introduction (35:40)
    Creating a database, Window Functions Described, Window Functions Explain, Drawbacks of Alternatives to Window Functions, A Glimpse of Solutions Using Window Functions, Partitioning, Framing, Query Elements Supporting Window Functions, Circumventing the Limitations, Reuse of Window Definitions
    buy single lesson
  2. Window Aggregate Functions (24:31)
    Partitioning, Ordering and Framing, The RANGE window frame extent option, Distinct Aggregates, Nested Aggregates
    buy single lesson
  3. Ranking Functions (30:08)
    ROW_NUMBER, Determinism, OVER Clause and Sequences, NTILE, RANK and DENSE_RANK, Rank Distribution Functions, Inverse Distribution Functions
    buy single lesson
  4. Removing Duplicates (05:48)
    Removing Duplicates and Window Functions
    buy single lesson
  5. Paging (03:45)
    Paging and Window Functions
    buy single lesson
  6. Offset Functions (09:53)
    LAG and LEAD functions, FIRST_VALUE and LAST_VALUE
    buy single lesson

Price 29.00 USD

  • save your time
  • learn Window Functions in the fastest and most effective way
  • get instant access and download your video tutorial

Frequently Asked Questions

Free lesson:

Tags: , , ,