What Exactly Is a CTE in T-SQL? A Comprehensive Guide with 7 Examples
Learn how to use CTEs through the use of a number of examples.
2023-10-20
10,310 reads
Learn how to use CTEs through the use of a number of examples.
2023-10-20
10,310 reads
In this article we cover what a Common Table Expression CTE is and how to write a CTE for doing selects, inserts, deletes, updates and more.
2021-06-02
Introduction This article shows how common table expressions (CTE) in SQL Server are naturally suited for navigating trees, such as finding its longest path, or diameter. Recall that a tree is an undirected graph where unique paths exist between any two nodes (i.e. vertices). Any node may be selected as its top node, with its […]
2021-04-19
8,096 reads
A detailed description of a technique for the the solution of the Bin Packing Problem, that involves a recursive CTE and Window functions
2020-05-14 (first published: 2020-04-23)
5,709 reads
By Steve Jones
I had a customer ask about analyzing their Test Data Manager (TDM) usage to...
By Steve Jones
I had an idea for an animated view of a sales tool, and started...
Next Monday, February 9, 2026, my one-day live online training SQL Server Query Tuning...
Comments posted to this topic are about the item SQL Server 2025 Query Performance...
This is a generic question. To the moderators, I wasn't sure where to place...
Good Afternoon, I have built a table with four columns: Period(Month), Category, Numerator, Denominator....
On SQL Server 2025, what happens when I run this code:
SELECT JSON_OBJECTAGG( 'City':'Denver') GOSee possible answers