Forums | Aggregator | Books | Industry News | Firefox Plugins | Social | Links

Comments

RANK, DENSE_RANK, FIRST and LAST Analytic Functions - Simple examples of how to use these 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.
Prepared Statement Error: Table './oraclebasecms/cms_page_comment_uuids' is marked as crashed and should be repaired