Compute Daily DAU to MAU Stickiness for Each Alexa Skill
Last updated: November 29, 2026
Quick Overview
From Alexa skill invocation logs, compute for every skill and every day in October the daily active users, the trailing 30-day active users, and their ratio.
Amazon
November 29, 20260
0
0 solved
From Alexa skill invocation logs, compute for every skill and every day in October the daily active users, the trailing 30-day active users, and their ratio.
An engagement metric question in the style of Alexa and Devices analytics, where stickiness separates skills people use habitually from novelty skills. The interviewer checks that you know COUNT DISTINCT cannot be used in a sliding window frame and can build the trailing distinct count with a range join.
What the Interviewer Expects
- Deduplicate to one row per skill, user and day first
- Explain why COUNT(DISTINCT) over a sliding window is not supported and what to do instead
- Build the trailing 30-day window with a range join against a date spine
- Load 29 days of history before the reporting window
- Handle days where a skill has MAU but zero DAU
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
- How would you make this cheaper at Alexa scale with HyperLogLog sketches?
- How would you compute weekly active users the same way?
- How would you flag skills whose stickiness dropped sharply week over week?
- Why can averaging daily ratios across skills mislead?
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
Table skill_invocations(user_id, skill_id, invoked_ts) with one row per invocation, plus dim_date(cal_date). MAU here means distinct users in the 30 days ending on that day, inclusive. Time zone i...
Approach
daily_users: distinct(skill_id, user_id, day)from September 2 onward so October 1 has a full 30-day lookback.dau: count per skill and day.mau: join a date spine of October days to...