Explain how you would convert given MySQL code into equivalent NoSQL code.
Use the supplied relational structure and data to demonstrate how the logic would be represented in a document-oriented system. Preserve filtering, monthly aggregation, previous-period comparison, ranking, null handling, and ordering.
Output
- Return one row per account and month with
month, region_name, account_id, account_name, settled_amount, previous_month_amount, change_amount, and region_rank.
- Include only settled activity from January through March 2025, ordered by
month, region_name, and region_rank.