Kabbage Business Insights needs a customer-level view of payments recorded for Kabbage Funding accounts. Using the funding_payments reporting table, write a PostgreSQL query that calculates the total amount successfully paid by each customer.
payment_status is paid.customer_id, group the remaining rows by customer, and return customers ordered from highest to lowest total paid.| Column | Type | Description |
|---|---|---|
| payment_idPK | INT | Unique payment identifier |
| customer_id | INT | Kabbage customer identifier |
| amount | NUMERIC(12,2) | Payment amount |
| payment_status | VARCHAR(20) | Current payment state |