You're a product analyst at Northstar, a mobile bank. The onboarding team wants to know when each customer first used the app. This will help compare customer activation speed across future campaigns.
The app_events table stores customer actions. A customer may have multiple events on the same day and multiple events with identical timestamps. Rows where occurred_at IS NULL are technically incomplete and must be excluded from the calculation. Exclude customers who have no events with a non-NULL timestamp.
For each customer, find the calendar date of their earliest activity.
Return these columns:
- user_id — customer ID;
- first_activity_date — date of first activity in YYYY-MM-DD format.
Sort the result by user_id in ascending order. Duplicate events must not create extra rows.
user_idfirst_activity_dateShowing the first 3 rows of the sample — the full sample comes with Premium
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in