8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Misc » Here

Comments for RANK, DENSE_RANK, FIRST and LAST Analytic Functions


Swapna said...

confused..

PIYUSH SACHAN said...

The article is quite use full. try also using ROW_NUMBER fuction and see the results.

Mohamed Sami said...

what does(Keep) in the DENSE_RANK mean ?

thanks for article it was helpful really

Thanks

Tim... said...

To quote the manual:

"The KEEP keyword is for semantic clarity. It qualifies aggregate_function, indicating that only the FIRST or LAST values of aggregate_function will be returned."

Cheers

Tim...

Bryan said...

The article is very helpful. I didn't even know that first and last existed!

Govind said...

It is very clear and excellent article about analytical functions.... Great.

Nicholas1dev said...

Last request don't exposed using DENSE_RANK and FIRST.
If you remove statements 'KEEP (DENSE_RANK FIRST ORDER BY sal)' the request's result don't change.

Amy said...

Please clarify why the MIN(sal) and MAX(sal) are necessary before the 'KEEP (DENSE_RANK FIRST ORDER BY sal)' in the Select clause.

Tim... said...

Hi.

Well, I'm looking for the first and last in an ordered set, so this represents the lowest and highest, so strictly speaking, the MIN and MAX themselves are irrelevant, but the syntax of an analytic function is such that I need a function of some description there, so MIN and MAX are the obvious choices. :)

Cheers

Tim...

Akhil said...

Thanks, it helped me

Navratna said...

The article is useful. Thanks

Saurabh said...

nice article..

Mary said...

Thanks, a very clear article.

Akshay said...

partition by clause is optional

Tim... said...

Hi.

As stated in the article, the analytics syntax is explained in full in the linked article.

Cheers

Tim...

Anonymous said...

Towards the end of the page you have FIST_VALUE instead of FIRST_VALUE

Tim... said...

Hi.

Corrected typo. Thanks.

Cheers

Tim...

DO NOT ask technical questions here! They will be deleted!

These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!

If you post personal information (name, email address etc.) you are agreeing to them being stored and displayed. Feel free to remain anonymous.