Longest Streak Users
Start Timer
0:00:00
Given a table with event logs, find the top five users with the longest continuous streak of visiting the platform.
Note: A continuous streak counts if the user visits the platform at least once per day on consecutive days.
Example:
Input:
events table
Column |
Type |
|---|---|
user_id |
INTEGER |
created_at |
DATETIME |
url |
VARCHAR |
Output:
Column |
Type |
|---|---|
user_id |
INTEGER |
streak_length |
INTEGER |
.
.
.
.
.
.
.
.
.
Comments