## Compare Two Moving Averages in SQL

Problem We want to compare two moving averages in SQL. We’ll use window functions to do this, as it is easier write

Compare Two Moving Averages in SQL

## Find and Remove Duplicates in SQL

Problem You want to remove duplicates in SQL. You know it is easy to find duplicates using GROUP BY, but how do

Find and Remove Duplicates in SQL

## How to Find Duplicates using a Windows Function?

Problem You need to find duplicates and then identify the records by their primary keys. Background Here’s an example of how to

How to Find Duplicates using a Windows Function?

## Calculate a Moving Average in SQL using A Windows Function

Problem How do you create a moving average using windows functions in SQL? Background There is no built-in function to create a

Calculate a Moving Average in SQL using A Windows Function

## Calculate a Running Total in SQL using a Windows Function

Problem How do you create a running total on a column using SQL? Background There is no built-in function to create a

Calculate a Running Total in SQL using a Windows Function

## Working with ROW_NUMBER, RANK, and DENSE_RANK

Introduction Window functions are an essential tool for data analysis, particularly in the SQL language. They allow you to perform complex calculations,

Working with ROW_NUMBER, RANK, and DENSE_RANK

## 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

SQL Puzzle:  How to Calculate Moving Averages

## How To Find Duplicates in SQL using Window Functions

If you want to find duplicate rows in SQL, you can go two routes. The first is to use the GROUP BY

How To Find Duplicates in SQL using Window Functions

## Window Functions in SQL – What are they?

Window Functions in SQL – What are they?

## How to Find a Gap in a Sequence using SQL SERVER

In this puzzle, we’re going to learn how to find a gap in a sequence using SQL Server.  I was recently reviewing

How to Find a Gap in a Sequence using SQL SERVER

## SQL Percentile Rank Puzzle

In this puzzle, we’re going with with SQL Percentile Rank to work through a problem to identify the top and bottom student

SQL Percentile Rank Puzzle