Compute First-Week Activation Rate for New Google Workspace Domains
Last updated: November 29, 2026
Quick Overview
For Workspace domains created in September and October, compute the weekly share that activated in their first seven days, where activation means MX records verified and at least two users added.
0
0
0 solved
For Workspace domains created in September and October, compute the weekly share that activated in their first seven days, where activation means MX records verified and at least two users added.
A Google Workspace onboarding question for data science phone screens. The interviewer checks that you anchor the seven-day window to each domain's own creation date, keep domains with zero events via a LEFT JOIN, and compute a rate with the right denominator.
What the Interviewer Expects
- Anchor the window to each domain's creation date
- LEFT JOIN events so inactive domains count in the denominator
- Count distinct added users, not events
- Express activation as a boolean per domain, then aggregate by signup week
- Put the window conditions in the ON clause, not WHERE
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- Which onboarding step loses the most domains, and how would you show it?
- Recent domains have not had seven full days yet. How do you handle them?
- How would you test whether a new setup wizard raised activation?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
workspace_domains(domain_id, created_at, plan) and admin_events(domain_id, event_ts, event_type, target_user_id). Event types include user_added and mx_verified. The first week is days 0 to 6 ...
Approach
Start from new domains and LEFT JOIN their admin events inside the seven-day window. Putting the window in the ON clause preserves domains with no events; moving it into WHERE would turn the LEFT JOIN...