# 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

Recommended Pages 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... 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... 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... 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... 