An introduction to PERCENT_RANK, a SQL Server 2012 analytic function that returns the relative standing of a value in a result set, shown next to RANK.
The Previous Row Before LAG Existed: A ROW_NUMBER Self-Join
Before LAG, we numbered rows and joined each one to its neighbor. Here is how that pattern works, where ties and NULLs bite, and how LAG compares.
SQL SERVER – Puzzle to Win Print Book – Write T-SQL Self Join Without Using LEAD and LAG
Win a print book: write a T-SQL self join that simulates LEAD and LAG, so you can learn a SQL Server 2012 feature even on an earlier version.
SQL SERVER – Introduction to LEAD and LAG – Analytic Functions Introduced in SQL Server 2012
An introduction to LEAD and LAG in SQL Server 2012: read a value from the next or previous row without a self-join, with an AdventureWorks example.
T-SQL Habits Worth Unlearning
Review T-SQL habits that hide intent or create avoidable work, including SELECT star, NOLOCK, row loops, and functions on filtered columns.
Load Into a Heap or a Clustered Table: Which Bulk Load Wins
Loading a heap and indexing it afterward only moves the work. Time the whole pipeline before you pick a winner.
Server Settings Worth Checking on Any New Instance
Review SQL Server configuration for memory, parallelism, tempdb, file growth, and backups before a new instance becomes a production surprise.






