# Ordinal Data - TopN (Analysis|Function)

Top 'N' Analysis in general refers to getting the top-n rows from a result set.

## Example

find the top 3 employees ranked by salary:

``````  select *
from ( select ename from emp order by sal )
where rownum <= 3;```
```

thats a top-n type query.

## Documentation / Reference

Discover More
Analytic (Data Analyst)

A Data Analyst sees what data he has. A Data Scientist imagines what data he is lacking. Information analysis provides insight into : the past the present and the future of the business. See...
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.: ...
OBIEE - TopN

The TopN function in OBIEE permit to perform a TopN analysis. The TOPN function operates on the values returned in the result set. When you add it as a formula column in an answer, the data are automatically...
Ordinal Data - Rank function (Ranking)

Rank is a statistic / function that calculates the rank of a value in a group of values. The position of an element in a sequence is its rank or index. This function is used in: top-N and bottom-N...
R - TopN Analysis

One column All column the first two rows for each month with a
Spark - (Take|TakeOrdered)

The action returns an array of the first n elements (not ordered) whereas returns an array with the first n elements after a sort It's a Top N function Python: Takeordered is an action that...