Summary
This brings us to the end of this chapter. Let’s summarize the key topics that have been covered:
- Understand the concept of a window function, which is a calculation that operates on a window of rows within a table
- Identify common types of window functions, including aggregate and ranking functions, and be able to use them in SQL queries
- Understand the syntax of a window function, including the
OVER
clause, which is used to define the window of rows to operate on - Use the
PARTITION BY
clause to group rows into partitions for calculation purposes - Understand the difference between window functions and aggregate functions, which operate on groups of rows rather than windows of rows
- Understand the difference between window functions and subqueries, which can both be used to calculate values based on sets of rows, but operate in different ways
- Understand the limitations of window functions and how they may perform differently based on the underlying...