Your question is Time From Trial to First Paid. 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.
Adobe wants to measure how quickly trial users convert to paid plans. Write a SQL query to compute the elapsed time between each user's first trial sign-up and their first paid transaction.
trial_signup_at per user from the login table.paid_transaction_at per user from the action log table.| Column | Type | Description |
|---|---|---|
| login_idPK | INT | Primary key for the login event |
| user_id | INT | User identifier |
| trial_signup_at | TIMESTAMP | Timestamp when the user first signed up for a trial |
| login_at | TIMESTAMP | Timestamp of a daily login event |
| Column | Type | Description |
|---|---|---|
| action_idPK | INT | Primary key for the action event |
| user_id | INT | User identifier |
| action_type | VARCHAR(50) | Type of action performed, such as paid_transaction |
| action_at | TIMESTAMP | Timestamp when the action occurred |