← OneMain Financial Interview Insights
This one took me a minute to untangle because there are actually three separate problems stacked on top of each other: the dedup, the retention window logic, and the ARPU window, and they all feed into one final aggregation.
Start by clarifying the schema and definitions, then outline a query structure using CTEs to deduplicate events, compute cohort sizes, calculate D30 retention, and compute 30-day ARPU. Emphasize how you handle duplicates and late events through deduplication and date filtering.
Pro tip: Mention that you would validate the query by checking edge cases like users with no events or payments, and discuss how you'd optimize performance with indexes on user_id and event_ts.
Confirm table structures, definitions of signup_date, events, payments, and how to treat late events. Ensure understanding of D30 retention and ARPU calculations.
Use a CTE with DISTINCT or ROW_NUMBER() to remove exact duplicates on (user_id, event_ts, event_name), ensuring each event is counted once.
Aggregate users by signup month to get the total number of users in each cohort, which will be used as the denominator for both metrics.
Join deduplicated events to users, filter for events exactly on signup_date + 30 days, and count distinct users per cohort. Exclude events before signup_date as data errors.
Sum payments within the first 30 days (signup_date to signup_date + 30 days) per cohort, then divide by cohort size to get ARPU.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.