Your question is SQL Join and Revenue Aggregation. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Genpact Finance Operations needs a simple customer revenue summary for a monthly reporting extract. The source table stores customer identifiers directly with each order.
Write a PostgreSQL query that returns total revenue for each named customer.
NULL amounts as having zero revenue.| Column | Type | Description |
|---|---|---|
| order_idPK | INTEGER | Unique order identifier |
| customer_name | VARCHAR(100) | Customer name associated with the order |
| order_amount | NUMERIC(12,2) | Revenue amount, including possible refunds |
| order_date | DATE | Date the order was placed |