what is the use of rank function?



what is the use of rank function?..

Answer / 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

More Oracle General Interview Questions

Where do we use decode and case statements?

0 Answers  


Can we create database in oracle using command line ?

0 Answers   MCN Solutions,


why you need store procedure ? where do we use it in a Java project? can you get the code for as store procedure using in Java?

1 Answers   Goldman Sachs,


24. Display the order number for all orders whose average item cost is greater than the overall average item cost across all orders.

2 Answers   Wipro,


How do I connect to oracle database?

0 Answers  






SQL> CREATE TABLE to_table 2 (col1 NUMBER); Table created. SQL> CREATE OR REPLACE TRIGGER statement_trigger 2 AFTER INSERT ON to_table 3 BEGIN 4 DBMS_OUTPUT.PUT_LINE('After Insert Statement Level'); 5 END; 6 / Trigger created. SQL> CREATE OR REPLACE TRIGGER row_trigger 2 AFTER INSERT ON to_table 3 FOR EACH ROW 4 BEGIN 5 DBMS_OUTPUT.PUT_LINE('After Insert Row Level'); 6 END; 7 / Trigger created. SQL> INSERT INTO TO_TABLE VALUES(1); After Insert Row Level After Insert Statement Level 1 row created. SQL> BEGIN 2 INSERT INTO TO_TABLE VALUES(2); 3 INSERT INTO TO_TABLE VALUES(3); 4 INSERT INTO TO_TABLE VALUES(4); 5 INSERT INTO TO_TABLE VALUES(5); 6 INSERT INTO TO_TABLE VALUES(6); 7 INSERT INTO TO_TABLE VALUES(7); 8 INSERT INTO TO_TABLE VALUES(8); 9 INSERT INTO TO_TABLE VALUES(9); 10 INSERT INTO TO_TABLE VALUES(0); 11 END; 12 / WAT LL BE THE O/P??? XPLAIN IT>>>>

1 Answers   Infosys,


What are the composite date types in oracle?

6 Answers   HCL,


Is oracle a relational database?

0 Answers  


What are the differences between number and binary_float in oracle?

0 Answers  


How to speed up webrick?

0 Answers  


What is difference between cartesian join and cross join?

0 Answers  


We have one Package(which has many function/procedures, SQL quires etc). Now we need to check, which query or procedure is taking lot of time in that Package. ? How do we do it.

2 Answers   IBM,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)