Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

First and Last Ad Per User

MolocoMediumSQL & Data Manipulation00:00
Moloco
Your interviewer · Data Analyst
In session
Interviewer

Welcome to your interview for the Data Analyst role at Moloco.

The question is on your right: First and Last Ad Per User. 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

Given a table of user ad interactions at Moloco, write a query using window functions to identify the first and last ad shown to each user within a specific session.