This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
CumulativeTotalCalculation

SQL SERVER Challenge – Cumulative Total Calculation

June 16, 2023
Pinal Dave
SQL Interview Questions and Answers
Contest, CTE, Ranking Functions, SQL Scripts, SQL Sub Query

Today we will see a very interesting SQL SERVER Challenge about Cumulative Total Calculation. During a recent Comprehensive Database Performance Health Check.

Read More
Sixteen pineapples in a row by size, split into four groups by wooden slats, one huge pineapple set apart.

Quartiles With PERCENTILE_CONT and NTILE

January 1, 2021
Pinal Dave
SQL Tips and Tricks
Mathematical Function, Ranking Functions, SQL Function, SQL Server

Compare quartiles from PERCENTILE_CONT with NTILE row buckets, calculate interquartile range, and flag candidates beyond 1.5 IQR.

Read More
A knife block with five large knives, beside one small pot holding all the smaller utensils bunched together.

Top N Plus Others: Grouping the Rest Into One Row

December 3, 2020
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Group By, SQL Scripts, SQL Server, SQL Top

Create top N plus others summaries with deterministic category ranking, one remainder total, stable labels, and explicit display ordering.

Read More
A single lane of hurdles on a running track, each one higher than the last, the tallest one vermilion.

Twenty Practice Queries on One Small Schema

April 3, 2020
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Joins, SQL Server, SQL Training, Starting SQL

Work through twenty practice queries on one small sales schema, with expected results for filters, joins, totals, windows, and gaps.

Read More
2nd row

SQL SERVER – Getting Second Row from Table

October 28, 2019
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts, SQL Server, Temp 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.

Read More
top N Rows

How to Skip Top N Rows in SQL Server? – Interview Question of the Week #237

August 11, 2019
Pinal Dave
SQL Interview Questions and Answers
Ranking Functions, SQL Function, SQL Paging, SQL Scripts, SQL Server

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.

Read More
Over and partion by query results.

SQL SERVER – Adding Values WITH OVER and PARTITION BY

June 16, 2018
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Order By, SQL Scripts, SQL Server

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.

Read More
1 2 3 4 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com