SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

User Consecutive 3-Day Login Streak

Unsolved

Google Security & Identity analyzes session telemetry to identify highly engaged users who maintain consistent product streaks. Write a SQL query to find all distinct `user_id`s who have logged in on at least three consecutive calendar days. Note that users may log in multiple times in a single day, which should count as a single active day. Sort the resulting `user_id`s in ascending order.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Google

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM user_logins
Full source dataset
15 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine