Reporting - Inner N

Data System Architecture

Reporting - Inner N

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
Card Puncher Data Processing
Oracle Database - SQL - ROW_NUMBER function

ROW_NUMBER is an non-deterministic analytic function. The function assigns a sequential unique number: to each row to which it is applied (either each row in the partition or each row returned by the...



Share this page:
Follow us:
Task Runner