Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Max two values

728995Oct 30 2009 — edited Oct 30 2009
Hi All,

We have a requirement to get max two values.
We have one primary key Let us assume Quarter_sk we have to get Max two values for particular condition.

This primary Key doesnt have sequence.

select Quarter_sk from myschema.myTable where max(Quarter_sk) and max but one(Quarter_sk).

Could anyone please help to me.

Thanks and Regards
Swetha.
This post has been answered by Frank Kulash on Oct 30 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2009
Added on Oct 30 2009
6 comments
2,142 views