SQL and Python
Interview question
- seniorlevel
- 12 minsuggested time
- 3Data analyst, Data scientist, ML engineer
A web-search event log events(customer_id, ts) has one row per search. Define a session as a run of events
where no gap between consecutive events of the same customer exceeds 30 minutes. Write SQL that assigns a
session number to every event and returns start, end and event count per session. What breaks when events arrive
late?
Sign in to practise: answers are saved before model answers are shown.