Your question is Total Sales by Region. 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.
Blue Yonder Luminate Planning users need a regional view of sales performance for operational reporting. The source data contains one row per sales transaction.
Write a PostgreSQL query that calculates total sales by region from the sales_transactions table.
region and calculate the sum of sale_amount for each region.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique sales transaction identifier |
| region | VARCHAR(50) | Sales region associated with the transaction |
| sale_amount | DECIMAL(12,2) | Transaction sales amount |
| transaction_date | DATE | Date of the sales transaction |