In this puzzle, we’re going to learn how to calculate moving averages
Solving puzzles is a great way to learn SQL. Nothing beats practicing what you’ve learned.
Once you have figured out the puzzle, post your answer in the comments so we all can learn from one another.
We also discuss puzzle and more in Essential SQL Learning Group on Facebook. Be sure to find us there!
Here are two of my favorite puzzles you should try to solve:
All the examples for this lesson are based on Microsoft SQL Server Management Studio and the sample databases AdventureWorks and WideWorldImporters.
You can get started using these free tools using my guide Getting Started Using SQL Server
In this puzzle, we’re going to learn how to do some basic data modeling. Many of you have expressed an interest in
In this puzzle we’ll explore a SQL bill of materials example. Companies use a BOM (Bill of Materials) to itemize the components
In this SQL minute we’ll look at how to create a SQL server hierarchical query using the hierarchyid data type. This is
In this puzzle, we’re going to learn how to write a SQL UNION without using Set Operations. Set operations allow us to
In this puzzle, we’re going learn to about SQL set operators. Set operators allow us to compare rows from two or more
In this puzzle, we’re going to learn about joins vs subqueries. In many queries you can substitute joins and subqueries. Yet, since
In this puzzle, we’re going to learn how to rewrite a subquery using inner joins. Knowing about a subquery versus inner join
In this puzzle we’re going to learn how to find the person whose birthday, among others, is in the middle. Knowing how
In this puzzle, we’re going to learn how to create a dynamic pivot table using SQL Server. A dynamic pivot table is
In this puzzle, we’re going to learn how to create a cross tab query using SQL Server. Cross tabs are a great
In this puzzle, we are going to learn how to join dirty data using the SQL Server. There are many instances that
We are going to learn how to create a bar chart using SQL server in this puzzle. It can sometimes be fun
In this puzzle, we’re going to learn how to find a gap in a sequence using SQL Server. I was recently reviewing
In this puzzle, we’re going with with SQL Percentile Rank to work through a problem to identify the top and bottom student