Given product sales `(category, product, revenue)`, use a window function to find the top 3 products by revenue within each category.
Examples
Input
sales rows across categories
Output
top 3 products per category
Constraints
- Use Spark SQL window functions
- Rank or dense_rank acceptable