69. Category Spending Footprint
Rank customer spending within categories and calculate cumulative percentages.
Xorthax wants to analyze his top customers' spending patterns by product category. Write a query to calculate the rank of each customer's total spending within a category and the cumulative percentage of spending across all categories.
Explanation: