Loading...
New vs Returning User Share
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- mid, senior
Problem
A user is 'new' in the month of their very first event in event_data; in every subsequent month they are 'returning'. For each month, compute the ratio of new users and returning users to total active users. Return the month, new user ratio, and returning user ratio.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.