Use DELETE TOP safely through an ordered CTE, preview oldest rows, apply a supporting index, and remove eligible rows in bounded batches.
SQL SERVER – Fibonacci Series with T-SQL
What’s fascinating about the Fibonacci series is its ubiquitous presence in nature, from the arrangement of leaves on a stem to the shape of a hurricane.
SQL SERVER – The Flight Connection Puzzle
Today we are going to see another such puzzle – The Flight Connection Puzzle. This blog post is going to be really fun blog post.
Finding Top Earners: A T-SQL Challenge in SQL Server
The goal is to find the top three highest-paid (top earners) employees in each department and their corresponding department details.
SQL SERVER – Replacing a Cursor with a Common Table Expression
Let us learn today – How I was able to improve the query performance by replacing the cursor with a common table expression (CTE).
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.
SQL SERVER – List All Dates Between Start and End Date
We will see a very simple script where we will take advantage of the Common Table Expression and list all dates between two dates (Start and End Date).







