O'Reilly logo

Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts by John Adolph Palinski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ranking Functions

Oracle has provided several functions for ranking rows. These functions will calculate rankings, percentiles, and n-tiles of the values. These functions are performed after the SELECT statement assembles the result set and prior to the ordering of the results.

There is an Oracle feature, PARTITIONS, that is used with analytic functions: This feature is totally unrelated to the physical partitioning of data stored within tables, which was discussed in Chapter 2. This partitioning occurs to only the result set of the SELECT statement and is not permanent. The feature allows the user to place into subsets the records that a SELECT statement returns. For example, assume that you would like to determine the top-two wage earners ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required