Healthfirst Marketplace tracks member purchases in a transaction ledger. The analytics team needs the ten customer accounts with the highest cumulative purchase value.
Write a PostgreSQL query against member_purchase_transactions to return the top 10 customers by total purchase amount.
customer_name and calculate each customer's total purchase amount.customer_name as a secondary ascending sort for deterministic ordering.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique identifier for a marketplace purchase transaction. |
| customer_name | VARCHAR(100) | Name of the Healthfirst Marketplace customer account. |
| purchase_amount | NUMERIC(12,2) | Recorded purchase value. NULL represents an unpriced pending adjustment. |
| purchase_date | DATE | Date the transaction was recorded. |