Write medium-difficult SQL that uses nested subqueries or CTEs and window functions.
Use the provided PostgreSQL tables. Return monthly author-level results for months containing at least two posts, including each author's post count, total vote score, previous qualifying month score, and rank within the month.
Output
- One row per qualifying author and month
- Columns:
month_start, username, post_count, total_score, previous_month_score, monthly_rank
- Sort by
month_start ascending, monthly_rank ascending, then username ascending; tied scores share a rank