In this puzzle, we’re going to learn how to calculate moving averages
Common Table Expressions or CTE’s for short are used within SQL Server to simplify complex joins and subqueries, and to provide a means to query hierarchical data such as an organizational chart.
There are two types to CTE’s – non-recursive and recursive.
Non-recursive CTEs are used to simplify complex queries; we love them! You can use them instead of a view or to increase readability.
Recursive CTE’s are used to perform what you though was the impossible; really! They are so kewl.
I would totally recommend you get your hands on some of these archived articles and get familiar with CTE’s. You really appreciate them once you do as they greatly extend SQL capabilities.
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
Recursive CTE’s Recursive CTEs are unique, such that they are allowed to reference their own. With this special ability, you can use
The Common Table Expressions or CTE’s for short are used within SQL Server to simplify complex joins and subqueries, and to provide
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 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