Today we will see a very interesting SQL SERVER Challenge about Cumulative Total Calculation. During a recent Comprehensive Database Performance Health Check.
Quartiles With PERCENTILE_CONT and NTILE
Compare quartiles from PERCENTILE_CONT with NTILE row buckets, calculate interquartile range, and flag candidates beyond 1.5 IQR.
Top N Plus Others: Grouping the Rest Into One Row
Create top N plus others summaries with deterministic category ranking, one remainder total, stable labels, and explicit display ordering.
Twenty Practice Queries on One Small Schema
Work through twenty practice queries on one small sales schema, with expected results for filters, joins, totals, windows, and gaps.
SQL SERVER – Getting Second Row from Table
The other day during one of my old clients sent me an email about if I know any trick to get the second row from the resultset.
How to Skip Top N Rows in SQL Server? – Interview Question of the Week #237
Question: How to skip top N Rows in SQL Server and retrieve the rest of the rows? Answer: I had asked the above question in one of the interviews last week.
SQL SERVER – Adding Values WITH OVER and PARTITION BY
How do you sum values for each group without GROUP BY and still keep every row? Here is how SUM with OVER and PARTITION BY answers a reader’s question.






