Advertisement

Discovering Ranking Functions

  • Kathi Kellenberger
  • Clayton Groom
  • Ed Pollack
Chapter

Abstract

The four ranking functions were introduced to T-SQL by Microsoft in 2005. Three of the functions, ROW_NUMBER, RANK, and DENSE_RANK, assign a sequential number to each row in a query's results. The fourth ranking function, NTILE, divides the rows by assigning a bucket number to each row in the results. The group of low-ranking rows gets an NTILE value of 1 while the highest-ranking group of rows is assigned the top number.

Copyright information

© Kathi Kellenberger, Clayton Groom, and Ed Pollack 2019

Authors and Affiliations

  • Kathi Kellenberger
    • 1
  • Clayton Groom
    • 2
  • Ed Pollack
    • 3
  1. 1.EdwardsvilleUSA
  2. 2.SmithtonUSA
  3. 3.AlbanyUSA

Personalised recommendations