101
0/304
Loading content...
A commerce reliability team monitors how order volume evolves across short, fixed-time windows.
Table: Orders
Data guarantees:
Task: Aggregate order_count into 6-minute intervals.
Interval mapping:
Return one row per interval with:
Output requirements:
Supported submission environments:
Orders:
| minute | order_count |
|--------|-------------|
| 1 | 0 |
| 2 | 2 |
| 3 | 4 |
| 4 | 6 |
| 5 | 1 |
| 6 | 4 |
| 7 | 1 |
| 8 | 2 |
| 9 | 4 |
| 10 | 1 |
| 11 | 4 |
| 12 | 6 |[
{"interval_no":1,"total_orders":17},
{"interval_no":2,"total_orders":18}
]Minutes 1-6 form interval 1 (sum 17), and minutes 7-12 form interval 2 (sum 18).
Orders:
| minute | order_count |
|--------|-------------|
| 6 | 9 |
| 1 | 3 |
| 5 | 5 |
| 2 | 0 |
| 4 | 2 |
| 3 | 1 |[
{"interval_no":1,"total_orders":20}
]Input row order is irrelevant. The six rows still belong to interval 1, and their sum is 20.
Orders:
| minute | order_count |
|--------|-------------|
| 1 | 10 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 1 |
| 8 | 1 |
| 9 | 1 |
| 10 | 1 |
| 11 | 1 |
| 12 | 1 |[
{"interval_no":1,"total_orders":10},
{"interval_no":2,"total_orders":6}
]Each block of six minutes is summed independently.
Constraints