# Window Function Tag Archives

2

## SQL Window Functions [Visual Explanation] The purpose of this article is to introduce you to SQL window functions and some of the high-level concepts.  In SQL, a window function refers to a function, such as sum or average, which acts upon a result set’s rows relative to the current row. There are a lot of details to cover, but you’ll […]

## Use SQL to Calculate a Running Total There are several ways to calculate a running total in SQL.  In this article, we will cover two methods:  Joins, and Window Functions. We’ll first look at how to calculate the running total using an INNER JOIN.  By doing so, you’ll not only learn more about join conditions, but see how to take the result […]

## SQL Puzzle:  How to Calculate Moving Averages In this puzzle, we’re going to learn how to calculate moving averages by working through a hypothetical stock market example. Solving puzzles is a great way to learn SQL.  Nothing beats practicing what you’ve learned.  Once you have figured out the puzzle, post you answer in the comments so we all can learn from one […] 