Unlock the power of SQL's NTILE function with our latest deep-dive article. Learn to segment your data effectively into quantiles for more nuanced analysis, discover common pitfalls and their solutions, and optimize your queries for peak performance.
2024-02-03 (first published: 2024-01-03)
4,164 reads
Welcome to the fascinating world of SQL window functions! Today, we'll explore in detail: RANK() and DENSE_RANK().
2023-11-20 (first published: 2023-11-15)
7,344 reads
Many people have published high performance, read-less, Inline Table Valued functions that use Itzik Ben-Gan's wonderful "Virtual Numbers Table" to replace WHILE loops and other forms of RBAR. This one is Jeff Moden's version.
2019-08-13 (first published: 2019-08-04)
6,676 reads
A CTE is a temporary result set defined by a simple query, and is used within the execution scope of a single INSERT, UPDATE, DELETE, or SELECT statement. In this article we will explore how to define and use CTE's.
2024-04-03 (first published: 2015-03-18)
6,111 reads
This creates a Tally or Numbers table which is frequently used to replace loops in code and is much faster than most loops.
2011-11-28 (first published: 2008-03-07)
6,678 reads