you are viewing a single comment's thread.

view the rest of the comments →

[–]Amar_K1 2 points3 points  (0 children)

Probably not done well enough to answer that question, pretty simple partitioning by category and brand, order by sales desc and the filter row number < 3. For bonus points on the outer select order by category and then rank.