Compare quartiles from PERCENTILE_CONT with NTILE row buckets, calculate interquartile range, and flag candidates beyond 1.5 IQR.
Why FLOAT Math Does Not Add Up in T-SQL Queries
See why FLOAT math produces approximate sums and comparisons in SQL Server, then use DECIMAL or tolerance checks for the right data.
Weighted Averages in T-SQL
Calculate weighted averages with matching numerator and denominator populations, decimal arithmetic, NULL rules, and calendar windows.
The PRODUCT Aggregate: Multiplying Values Across Rows
Use the PRODUCT aggregate in SQL Server 2025 for growth factors and independent probabilities, with checks for NULL, zero, and precision.
Integer Division in T-SQL: Why Your Percentages Come Out Zero
Fix integer division in T-SQL percentages from COUNT, SUM and window calculations with decimal types and rounding at the right step.
Generating Random Numbers Per Row: RAND, NEWID and CRYPT_GEN_RANDOM
Generate random numbers per row with NEWID or CRYPT_GEN_RANDOM, compare seeded RAND, inspect bucket spread, and pick a row without a sort.
Decimal Precision and Rounding in SQL Server
Decimal precision in SQL Server controls arithmetic results and rounding; use explicit scales, test boundaries, and compare money with decimal.







