Reporting - Inner N

Data System Architecture

About

An inner N reporting retrieve a set of rows in a complete data set classified by its row number.

Inner-n query

The following inner-N query with the Oracle row_number analytic function selects all rows from the employees table but returns only the fifty-first through one-hundredth row:

SELECT last_name FROM 
   (SELECT last_name, ROW_NUMBER() OVER (ORDER BY last_name) R FROM employees)
   WHERE R BETWEEN 51 and 100;

Documentation / Reference





Discover More
Data System Architecture
How to use the SQL ROW_NUMBER function?

ROW_NUMBER is an non-deterministic window function (analytic) that returns a sequence of unique numbers. With the row number, you can retrieve the following rows and create the follwing reports.: ...



Share this page:
Follow us:
Task Runner