Link to home
Start Free TrialLog in
Avatar of gdemaria
gdemariaFlag for United States of America

asked on

Finding the top 3 for each the Year

I have a dataset that looks something like this...

Product Name,  Manufacturer,  SaleYear,   GrossSales

I need to find the top three products sold by GrossSales for each year, so it would look like this...

2008
Sony, Product X, $20,000
HP, Product Y, $19,500
Dell, Product Q,  $18,000

2009
Apple, Product J,  $22,150
Dell, Product Q,   $19,200
Sony, Product X,  $14,000

2010...
...top three products....

etc...

So for each year, show the top three products sold by the Gross Revenue...

I believe this uses Row_Number() and Over but not sure of the format.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of appari
appari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gdemaria

ASKER

That was it, thanks very much!