Your question is First Chime Feature After Signup. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
You are given user sign-up data and downstream product interaction events from Chime surfaces such as SpotMe, Pay Anyone, and Savings. Write a PostgreSQL query to return, for each signed-up user, the first feature they touched after sign-up. Only count events that occurred at or after the user's signup_at timestamp, and ignore events where the feature name is NULL. If a user has multiple qualifying events at the exact same timestamp, break ties by the smallest event_id. Include users who signed up but never touched a feature, showing NULL for the feature and event timestamp.
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| VARCHAR(255) | User email address | |
| signup_at | TIMESTAMP | Timestamp when the user signed up |
| acquisition_channel | VARCHAR(50) | Marketing or referral source for signup |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| user_id | INT | User who generated the event |
| feature_name | VARCHAR(100) | Feature the user interacted with |
| surface_name | VARCHAR(100) | App surface where the event occurred |
| event_at | TIMESTAMP | Timestamp of the feature event |