Problem
Finance teams generate quarterly and monthly reports by filtering transactions within a specific date window. For a Q1 analysis, an analyst might pull all orders from February and March 2024 to compare month-over-month growth or prepare a revenue breakdown for the board. Using the orders table, return id, customer_id, amount, and created_at for orders where created_at is between 2024-02-01 and 2024-03-31 (inclusive), ordered by date.
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-15 |
| 2 | 2 | 45.50 | 2024-02-03 |
| 3 | 1 | 300.00 | 2024-02-28 |
| 4 | 3 | 75.00 | 2024-03-10 |
| 5 | 2 | 200.00 | 2024-04-01 |
Expected Output
| id | customer_id | amount | created_at |
|---|
| 2 | 2 | 45.50 | 2024-02-03 |
| 3 | 1 | 300.00 | 2024-02-28 |
| 4 | 3 | 75.00 | 2024-03-10 |