what is the use of rank function?

Answer Posted / soujanya

RANK calculates the rank of a value in a group of values.
Rows with equal values for the ranking criteria receive the
same rank. Oracle then adds the number of tied rows to the
tied rank to calculate the next rank. Therefore, the ranks
may not be consecutive numbers.

eg: SELECT RANK(15500, .05) WITHIN GROUP
(ORDER BY salary, commission_pct) "Rank"
FROM employees;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write date and time literals in oracle?

733


What is logical backup in oracle?

768


What is a procedure in oracle?

776


What is data type in oracle?

763


How are extents allocated to a segment?

771


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1681


What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?

735


Query to retrieve record for a many to many relationship ?

2276


How to filter out duplications in the returning rows using oracle?

831


How to display employee records who gets more salary than the average salary in the department?

801


How to use null as conditions in oracle?

751


What is oracle data type?

729


does the query needs a hint to access a materialized view?

1641


what is insert all statement in sql

5925


How to test null values?

838