Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Get started
Compute Zoom DAU by Day
00:00
5 left

Compute Zoom DAU by Day

MediumSQL · PostgreSQL

Problem

Given tables User(user_id, user_email, account_id), Meeting(meeting_id, start_time, end_time) and Activity(meeting_id, user_id, activity_type in {join_meeting, leave_meeting}, timestamp), write a SQL query to compute the Daily Active Users (DAU) for every day in the past 1 month. DAU is the number of unique active users on a particular day and a user is considered active on day X if he/she has an account with Zoom and he/she ever joins a meeting with that account whose start time is on day X.

Asked in the phone screen stage. Output columns: Date, DAU. Problem #1a.

Output

  1. One row for every calendar date in the past month, including dates with no active users.
  2. Columns named Date and DAU.
  3. Order by Date ascending.

Schema

User
ColumnTypeDescription
user_idPKINTUnique Zoom user identifier
user_emailVARCHAR(255)User email address
account_idINTZoom account identifier; null means no associated account
Meeting
ColumnTypeDescription
meeting_idPKINTUnique meeting identifier
start_timeTIMESTAMPMeeting start timestamp
end_timeTIMESTAMPMeeting end timestamp
Activity
ColumnTypeDescription
meeting_idINTReferenced meeting identifier
user_idINTReferenced user identifier
activity_typeVARCHAR(20)Activity type, either join_meeting or leave_meeting
timestampTIMESTAMPTime when the activity occurred
TablesUserMeetingActivity
Interviewer

Your question is Compute Zoom DAU by Day. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.