Welcome to the SQL screen.
The question is on your right: Longest Consecutive Login Streak per User. Read through the requirements and the one table first.
Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?
A social media platform tracks user logins and wants to analyze user engagement. Write a SQL query to find the longest consecutive streak of login days for each user.
| Column | Type | Description |
|---|---|---|
| user_id | INT | Unique identifier for the user |
| login_date | DATE | Date of user login |