Problem
The most fundamental metric on any executive dashboard is total revenue — the sum of all money collected from orders. It feeds into board presentations, investor reporting, and performance bonuses. Finance teams query this number daily and compare it against the previous period to track growth. Using the orders table, return the total sum of all order amounts as total_revenue.
Schema
orders
| column | type |
|---|
| id | INTEGER |
| customer_id | INTEGER |
| amount | NUMERIC |
| created_at | DATE |
Sample Data
| id | customer_id | amount | created_at |
|---|
| 1 | 1 | 120.00 | 2024-01-05 |
| 2 | 2 | 45.50 | 2024-01-18 |
| 3 | 1 | 300.00 | 2024-02-03 |
| 4 | 3 | 75.00 | 2024-02-20 |
Expected Output