Comparing data between two tables uses EXCEPT, full joins, and hashes, with explicit NULL and duplicate rules for trustworthy results.
Nested Loops Join: When It Is the Right Choice
Loops in a plan are not always the villain. Count the inner executions and the reads before you force another join type.
Counting Rows per Month With Zero-Filled Gaps
Build monthly counts with zero-filled gaps, generate a complete month range, and retain empty categories through a reporting scaffold.
A WHERE Filter That Turns Your LEFT JOIN Into an INNER JOIN
Fix a LEFT JOIN whose right-table WHERE filter removes unmatched rows, inspect the inner-join plan, and search modules for candidates.
Bitmap Filters in Parallel Hash Joins: Reading Them in a Plan
Read bitmap filters in parallel hash join plans, compare fact scan output, and distinguish early row rejection from guaranteed savings.
OPTION (FORCE ORDER): When a Join Order Hint Helps and Hurts
Test OPTION (FORCE ORDER) against real join plans, see when fixed table order helps or hurts, and apply a reversible Query Store hint.
Joining Three Tables: Following the Keys Step by Step
Joining three tables is easier when you add one join at a time and check the row count after each step. This post builds a small bookshop query from Customers, Orders and OrderLines, adds the book titles, and shows how a missing join condition multiplies rows.







