Answer Posted / shikha
The DENSE_RANK function computes the rank of a row in an
ordered group of rows.Rows with equal values for the
ranking criteria receive the same rank.
For eg.
To Show the set of sales people who make the top 3
salaries - that is, find the set of distinct salary
amounts, sort them, take the largest three, and give me
everyone who makes one of those values.
SELECT * FROM (
SELECT deptno, ename, sal,
DENSE_RANK()
OVER (
PARTITION BY deptno ORDER BY sal desc
) TopN FROM emp
)
WHERE TopN <= 3
ORDER BY deptno, sal DESC
/
DEPTNO ENAME SAL TOPN
---------- ---------- ---------- ----------
10 KING 5000 1
CLARK 2450 2
MILLER 1300 3
20 SCOTT 3000 1 <--- ! (in
case of rank
JONES will have
3 and dense
rank will have 2)
FORD 3000 1 <--- !
JONES 2975 2
ADAMS 1100 3
30 BLAKE 2850 1
ALLEN 1600 2
30 TURNER 1500 3
Is This Answer Correct ? | 11 Yes | 6 No |
Post New Answer View All Answers
Can more than 1 metric be applied on an analytic in business objects?
Explain about an assignment you worked on in which you had to amass a huge amount of data, and then analyze it?
Difference between zabo and webi?
how many reports have u created ? explain a few.
What sort of existing documents should business analysts refer to when starting on a new project?
what are the tables used in health care domain project and columns used in report?
what is xcelsius architecture?
Difference between b.o 5.1 and 6.1b?
Explain how can we do load testing for webi reports? (Example if I have have to test one webi report for concurrent users refreshing report at one time)?
How to generate the report from excel sheet?
What is the difference between condition & filter?
Explain how to execute the plsql procedure from the report by clicking with mouse?
Explain is there any default username & pwd for bo designer & supervisor?
Explain about a task that really tested your analytical abilities?
Explain is there any tool that can compare two unvs / two rpts , built using bo 5.1 / bo 6.5?