Data binning turns a column of numbers into a few groups you can count and chart. This post runs four T-SQL methods on the same orders on SQL Server 2025: fixed width, NTILE, CASE ranges and DATE_BUCKET. It shows what each method tells you and one trap with BETWEEN.
Histogram Buckets in T-SQL: Counting Values per Range
Create histogram buckets in T-SQL with fixed widths or explicit ranges, retain empty buckets, and display scaled text bars.
Materialized Path Hierarchies: Storing the Path as a String
Build a materialized path hierarchy in T-SQL, query descendants, calculate depth, and move a subtree without creating cycles.
Masking Functions in SQL Server: What Each One Shows
Dynamic data masking hides values at query time, and the masking functions decide what a reader still sees. This post tests default, email, partial, random and datetime on SQL Server 2025 and shows what each one returns. It also covers adding and dropping a mask on an existing column.
SQL SERVER – The Two Doors, Two Guards Puzzle
I came across a puzzle about “The Two Doors, Two Guards,” popularly known as the “Two Doors Riddle” or the “Heaven and Hell Riddle”.
Go Programming Language: 10 Interview Questions With Tested Answers
The Go programming language is small, so ten questions cover most of an interview. This post answers each one in plain words with a tiny program. Every program was run twice on Go 1.27.1, and the real output is shown.
SQL SERVER Challenge – Cumulative Total Calculation
Today we will see a very interesting SQL SERVER Challenge about Cumulative Total Calculation. During a recent Comprehensive Database Performance Health Check.







