Event Sessions
Event Sessions (30-Minute Gap)
You are given an events table of user activity.
Schema:
events(event_id, user_id, event_type, event_ts)
Create a view named result that assigns session groups per user. A new session starts when the gap between consecutive events for the same user is greater than 30 minutes.
Return the columns:
user_idsession_index(1-based per user)session_startsession_endevent_count
Order results by user_id, then session_index.
Run tests to see results
No issues detected