Extra Space Storage operations managers need a location-level view of customer accounts with unpaid balances more than 30 days past their invoice due date. Using February 15, 2025 as the reporting date, write a PostgreSQL query that identifies these accounts and summarizes their exposure by store location.
Requirements
- Include only active accounts with a positive unpaid balance and a due date more than 30 days before the reporting date.
- Group results by Extra Space Storage store location.
- Return the number of overdue accounts, a comma-separated list of account numbers, and the total outstanding balance.
- Sort locations alphabetically.
Representative Data
The supplied sample data includes multiple invoices per account, fully paid invoices, a boundary due date, closed accounts, missing payments, and unmatched records.