SQL: User login logs — longest consecutive streak and users with at least N active days

Given a user login log table user_login_log with:

  • user_id (string/int)
  • login_date (date/datetime)

Write SQL to solve the following (and describe your final output schema):

  1. **Consec...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: