Combining contiguous date ranges in a SQL query – using CTE recursion
Nov 6th, 2008 | By Christian Donner | Category: SQL ServerSometimes we need to reduce the granularity of date ranges by combining serveral contiguous rows into one. While this is a common classic SQL problem, I was unable to find an elegant solution that also performs well, and came up with my own. This article explains the problem and outlines the solution using a Common [...]
