EarthCam wants to identify the customers generating the most revenue from camera, monitoring, and streaming orders. Write a PostgreSQL query that returns the 10 customers with the highest total spend.
customer_name and calculate total spend with SUM(amount).NULL amount. A customer whose orders all have a NULL amount has no measurable spend and must not appear in the result.customer_name ascending as a deterministic tie-breaker. If fewer than 10 customers have spend, return all of them.customer_name and total_spent.| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_name | VARCHAR(150) | Name of the customer |
| amount | NUMERIC(12,2) | Order amount in US dollars |
| order_date | DATE | Date the order was placed |