Stripe's support team might write a query to find the minimum and maximum amounts spent across a list of transactions. Using the orders table, return the smallest and largest order amounts as min_amount and max_amount in a single row.
orders
| column | type |
|---|---|
| id | INTEGER |
| customer_id | INTEGER |
| amount | NUMERIC |
| created_at | DATE |
| 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 |
| min_amount | max_amount |
|---|---|
| 9.99 | 250.00 |