The collection tier assigns sequence_id in the order events were received, while occurred_at is when they actually happened on the client. Offline clients flush their buffers late, so events arrive out of order and downstream windowed jobs quietly undercount. Measure how often it happens.
An event is late when it occurred before an event of the same visitor that was received earlier — that is, before the high-water mark of occurred_at across all smaller sequence_id values for that visitor.
visitor_id, late_events for visitors with at least one late eventlate_events descending, then visitor_idraw_events| visitor_id | occurred_at | sequence_id |
|---|---|---|
| v1 | 2026-07-01 09:00:00 | 1 |
| v1 | 2026-07-01 09:30:00 | 2 |
| v1 | 2026-07-01 09:10:00 | 3 |
| visitor_id | late_events |
|---|---|
| v1 | 1 |
raw_events| visitor_id | occurred_at | sequence_id |
|---|---|---|
| v1 | 2026-07-02 09:00:00 | 1 |
| v1 | 2026-07-02 09:01:00 | 2 |
| v2 | 2026-07-02 10:00:00 | 3 |
| v2 | 2026-07-02 08:00:00 | 4 |
| visitor_id | late_events |
|---|---|
| v2 | 1 |
Community-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.