Write a SQL query using window functions to find the top three most popular Pin categories for each user demographic group.
Popularity is measured by the number of saved Pin interactions. Include only users with a known demographic group and return exactly three categories per group, breaking ties alphabetically by category.
Output
- One row per demographic group and category.
- Columns:
demographic_group, category, save_count, and category_rank.
- Sort by
demographic_group, category_rank, then category.