PracHub
QuestionsLearningGuidesInterview Prep

Quick Overview

Determine Maximum Consecutive Order Days Per User evaluates SQL or pandas logic, joins, grouping, window functions, null handling, edge cases, and validation in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • medium
  • Netflix
  • Data Manipulation (SQL/Python)
  • Data Scientist

Determine Maximum Consecutive Order Days Per User

Company: Netflix

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

orders +----+---------+------------+ | id | user_id | order_date | +----+---------+------------+ | 1 | 101 | 2024-01-01 | | 2 | 101 | 2024-01-02 | | 3 | 101 | 2024-01-05 | | 4 | 102 | 2024-01-03 | | 5 | 102 | 2024-01-04 | +----+---------+------------+ ##### Scenario The commerce team wants to know each customer’s best ordering streak for loyalty analysis. ##### Question For every user, return the maximum number of consecutive calendar days on which they placed at least one order. ##### Hints Generate dense date series per user; use gaps-and-islands or window functions.

Quick Answer: Determine Maximum Consecutive Order Days Per User evaluates SQL or pandas logic, joins, grouping, window functions, null handling, edge cases, and validation in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Last updated: Jul 23, 2026

Loading coding console...

PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Aggregate D1 retention cohorts in SQL - Netflix (medium)
  • Write SQL for DAU and first-purchase conversion - Netflix (medium)
  • Write SQL for rolling frequency caps - Netflix (medium)
  • Transform flat keys into nested dictionary - Netflix (medium)
  • Analyze Retention Metrics Using SQL and Python - Netflix (medium)