Find Each User's Earliest Seven-Day Activity Streak

Quick Overview

A PostgreSQL interview problem about finding each user's earliest streak of at least seven consecutive active dates. It tests date deduplication, gaps-and-islands logic, streak length calculation, earliest-match selection, and deterministic output.

Find Each User's Earliest Seven-Day Activity Streak

Company: ByteDance

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

Overview: A PostgreSQL interview problem about finding each user's earliest streak of at least seven consecutive active dates. It tests date deduplication, gaps-and-islands logic, streak length calculation, earliest-match selection, and deterministic output.

|Home/Data Manipulation (SQL/Python)/ByteDance
ByteDance logo
ByteDance
Aug 3, 2026
mediumData ScientistTechnical ScreenData Manipulation (SQL/Python)
15
0
Loading...
Loading comments...