Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

SQL Rolling Retention by Cohort

Gen DigitalHardSQL & Data Manipulation00:00
Gen Digital
Your interviewer · Data Scientist
In session
Interviewer

Welcome to your interview for the Data Scientist role at Gen Digital.

The question is on your right: SQL Rolling Retention by Cohort. Take a moment with it first.

Talk your thinking through with me if you like - when you're confident, submit your answer and I'll grade it like a real screen. You have three graded attempts to score 7/10 or better.

Only Submit answer is graded - discussion is free practice.

Problem

How would you use SQL window functions to calculate a 7-day rolling retention metric by user cohort for Gen Digital?