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!

Top 5 and bottom 5 selling products

918238Feb 17 2012 — edited Feb 17 2012
My source table contains

Book_id Quantity Selling_date

My problem is to find out top and bottom 5 selling books for a particular year.
For example,

For year 2010,

Top_5 Bottom_5
--------------------------
b1 b2
b6 b8

In this way I want to get output for watever year I want.

Waiting for a reply,
Thank You.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2012
Added on Feb 17 2012
5 comments
992 views