Checkpoint: Event Boundaries and Snapshots

Trace new event histories and diagnose window-query mistakes. Select one option per multiple-choice question; enter only the requested integer for short answers.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. One user has events at 08:00, 08:20, 08:50, 09:21, and 09:51 on the same day. A new session requires a gap greater than 30 minutes. How many sessions are there? Enter one integer.
2. A session query uses LAG ordered by (event_ts, event_id), but its cumulative SUM uses only event_ts with a ROWS frame. What change makes tied events consistent?

Select one answer.

3. At an inclusive noon cutoff, a device has ID 40 at 11:59 (offline), ID 41 at 12:00 (online), ID 43 at 12:00 (error), and ID 44 at 12:01 (online). Which event supplies the snapshot under the course tie policy?

Select one answer.

4. A query ranks all device history, then applies rn = 1 AND recorded_at <= cutoff. A device has one event before and one after cutoff. What happens?

Select one answer.

5. A user has three events at 14:00 with different event IDs and one at 14:30. What event_count belongs to that session? Enter one integer.
6. Which statement about MAX(recorded_at), MAX(status), and MAX(customer_id) grouped per device is correct?

Select one answer.

Join Discord