Pinterest wants to understand which Pin categories resonate most with users who recently joined the platform. Write a PostgreSQL query to find the three most-saved Pin categories among users whose Pinterest accounts were created in the last 30 days, using 2026-08-29 as the current date.
Requirements
- Join users, pin saves, and Pins to connect signup cohorts with saved Pin categories.
- Include users with
signup_date from 2026-07-30 through 2026-08-29, inclusive. Exclude saves whose Pin has no category.
- Count saves by category, rank categories by save count descending, and return the top three categories. Break ties alphabetically.