Problem
Understanding the range of transaction amounts helps customer support quickly identify unusually small or large orders that may indicate fraud, data entry errors, or pricing anomalies. Before escalating an order for review, an analyst runs this query to establish what "normal" looks like across the entire dataset. Using the orders table, return the smallest and largest order amounts as min_amount and max_amount in a single row.
Schema
orders
| column | type |
|---|
| id | INTEGER |
| customer_id | INTEGER |
| amount | NUMERIC |
| created_at | DATE |
Sample Data
| id | customer_id | amount | created_at |
|---|
| 1 | 1 | 15.00 | 2024-01-10 |
| 2 | 2 | 250.00 | 2024-02-15 |
| 3 | 1 | 75.50 | 2024-03-01 |
| 4 | 3 | 9.99 | 2024-03-20 |
Expected Output
| min_amount | max_amount |
|---|
| 9.99 | 250.00 |