LendingClub's personal-loan analytics team wants to identify borrowers associated with the largest total amount of issued loans. Write a PostgreSQL query that aggregates loan amounts by borrower and returns the top 10 borrowers.
loan_status = 'Issued'.customer_id and return only 10 rows.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique borrower identifier |
| customer_name | VARCHAR(100) | Borrower's name |
| state | VARCHAR(2) | Borrower's state abbreviation |
| Column | Type | Description |
|---|---|---|
| loan_idPK | INT | Unique loan identifier |
| customer_id | INT | Borrower associated with the loan |
| loan_amount | DECIMAL(12,2) | Original loan amount |
| loan_status | VARCHAR(20) | Current loan status |