Write a query to find the top three most-played artists per user over the last 30 days at Spotify.
Assume the analysis date is 2025-03-02, so include plays from 2025-02-01 through 2025-03-02. Count play records, exclude incomplete artist matches, and use artist name ascending as the tie-breaker.
Output
- One row per user and artist, limited to the top three artists for each user.
- Columns:
user_id, user_name, artist_id, artist_name, play_count, and artist_rank.
- Order by
user_id, then artist_rank, then artist_name.