Sign in to run and submit your work
Reading is open to everyone. Running code and saving drafts need an account so your work is yours and comes back on your next visit.
or
CODE WORKSPACE
Return event_day and late_events where ingested_at falls after event_time's date.
Result columns · in this order
event_daylate_eventsHow to approach it
Late means the ingestion date is after the event date.
Sample input
| event_id | event_time | ingested_at |
|---|---|---|
| 1 | 2026-01-01 03:30:00 | 2026-01-01 03:31:00 |
| 3 | 2026-01-01 22:15:00 | 2026-01-02 08:00:00 |
| 5 | 2026-01-02 05:00:00 | 2026-01-04 09:00:00 |
| 6 | 2026-01-03 18:00:00 | 2026-01-03 18:05:00 |
4 rows — all rows shown.
Expected output
| event_day | late_events |
|---|---|
| 2026-01-01 | 1 |
| 2026-01-02 | 1 |
2 rows — all rows shown.
Constraints
Compare date(ingested_at) to date(event_time), group by event day, and order by event_day.
Expected skills
Late-data auditing and timestamp semantics.
Submit for review to find out what your query gets right, what it gets wrong, and how it compares with the best working query for this exercise.
This scenario runs a full workspace — editor, canvas and results side by side. It needs a laptop or desktop to be usable. Open this page on a bigger screen to start building.