Write SQL to extract specific data sets relevant to a Ramp implementation scenario.
Use the provided departments, employees, merchants, and transactions data. Return finalized transactions from 2025, excluding declined and reversed transactions, and treat missing merchant classifications as Unclassified. Compare each department and merchant category with its previous available reporting month.
Output
- One row per department, reporting month, and merchant category with finalized activity.
- Columns:
department_name, reporting_month, merchant_category, monthly_spend, transaction_count, previous_month_spend, spend_change_pct.
- Sort by department name, reporting month, and merchant category ascending.