Contents tagged with cte
-
Using SQL Server to generate ranges and group data into them
One of the reporting requests I see from time to time is to have output grouped into ranges, or bands if you prefer, e.g:
From
To
Quantity
Value
0
250
3
125.52
250
500
8
3, …
-
Using Common Table Expressions to explode recipes - Part 2 - Getting the ingredients
A Brief Recap
In the last part of this article I showed a table structure for recipes and their ingredients. There are two kinds of ingredients that a recipe can contain, raw ingredients (e.g. …
-
Using Common Table Expressions to explode recipes - Part 1 - The CTE
A lot of the examples that you see for using Common Table Expressions (CTEs) in SQL Server, particularly recursive ones use examples that are around user hierarchies - showing ways to find all the …