Orders placed in one month
Your task
Given orders with columns order_id, customer, amount, status and placed, where placed is an ISO date string, return the orders placed in the given year and month. Return order_id and placed, sorted by order_id ascending.
Examples
orders_in_month(orders: dataframe, year: int, month: int) -> dataframeExample 1
Input
orders_in_month(orders, 2024, 2)orders
| order_id | customer | amount | status | placed |
|---|---|---|---|---|
| 1 | ada | 120.5 | paid | 2024-01-05 |
| 2 | bo | 80 | refunded | 2024-01-07 |
| 3 | ada | 45.25 | paid | 2024-02-11 |
| 4 | cy | 200 | paid | 2024-02-14 |
| 5 | bo | 15.75 | pending | 2024-03-02 |
| 6 | ada | 60 | paid | 2024-03-19 |
Output
| order_id | placed |
|---|---|
| 3 | 2024-02-11 |
| 4 | 2024-02-14 |