Your question is Daily or Regional Aggregations. 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.
Shopee's operations team needs a daily view of completed marketplace orders and gross merchandise value, or GMV, for 1 to 5 June 2025. Write a PostgreSQL query using the shopee_orders table.
order_status = 'COMPLETED' and an order_date from 1 June through 5 June 2025, inclusive.order_amount as zero in the total, and sort by date ascending.| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| order_date | DATE | Date the order was placed |
| order_status | VARCHAR(20) | Current order status |
| order_amount | DECIMAL(10,2) | Order GMV in Singapore dollars |