Relative Content

Tag Archive for sqlsql-serverrecursioncommon-table-expression

Recursive CTE with window functions

I’m trying to do some log analysis and I’m trying to get a breakdown by the various levels of a domain name… i.e. for a domain name with 4 codons (a.b.c.com for example), I want to be able to roll them up by .com, c.com, b.c.com and a.b.c.com.