Learn how to compare databases using representative work, operational skills, recovery requirements, and costs rather than feature-count scoreboards.
Weighted Average: Keep Group Totals and Value Counts
A weighted average preserves each group’s contribution. I compare unequal groups before combining their means. Group totals and populated-value counts reconstruct the underlying average without treating missing readings as zero.
SQL SERVER – 2008 – Introduction to Policy Management – Enforcing Rules on SQL Server
Use Policy Management in SQL Server 2008 to enforce rules, not just list them. A short tutorial that blocks any stored procedure created without the usp prefix.
DATETRUNC: Use ISO Week Boundaries With Explicit Date Types
DATETRUNC can give an ISO week its Monday boundary without changing session settings. I also keep the input date type explicit. A boundary calculation should reveal both its calendar rule and its return type.
STRING_AGG Order: Keep NULLs and Type Width Visible
STRING_AGG order belongs inside WITHIN GROUP. This example preserves duplicate labels, shows how NULL differs from empty text and casts to nvarchar(max) before aggregation.
HAVING Without GROUP BY: Filter One Implicit Aggregate Group
HAVING without GROUP BY filters the single implicit aggregate group produced by the query. I use that distinction when a summary should appear only if its aggregate condition passes. A false condition can remove the summary row entirely.
When to Upgrade: RTM, First CU or Later
Decide When to Upgrade SQL Server by weighing new features, early defects, support needs, and evidence from your own workload.







