A Customer's First Digital Footprint
A Customer's First Digital Footprint
You are a product analyst at Northstar, a mobile banking startup. The onboarding team wants to know when each customer first became active in the app so future acquisition campaigns can be compared by activation speed.
The app_events table stores customer actions. A customer may generate several events on the same day, including events with identical timestamps. Rows where occurred_at IS NULL are incomplete technical records and must be ignored. Customers with no event that has a valid timestamp must not appear in the result.
Find the calendar date of each customer's earliest activity.
Return:
- user_id — customer identifier;
- first_activity_date — earliest activity date in YYYY-MM-DD format.
Sort by user_id ascending. Duplicate events must not create extra rows.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.
| user_id | first_activity_date |
|---|---|
| 101 | 2026-01-05 |
| 102 | 2026-01-03 |
| 103 | 2026-01-08 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in