Active User Penetration Rate
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
The product analytics team counts a user as active on a device type only when their most recent session on it falls within 30 days of the latest session recorded anywhere in the data, they have logged at least 5 sessions on that device type, and their combined session time on it reaches 10 hours (36,000 seconds). For every device type, report the share of its users who clear all three bars at once, and keep the device types where nobody qualifies so they appear with a zero rate. Return each device type with its penetration rate.
Summary
How much of the user base is actually alive?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.