Your question is SQL Screening Assessment. Start with the requirements and the three 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.
Meta’s Product Growth team is reviewing an A/B test on Instagram Reels. Write a SQL query that calculates funnel metrics by experiment variant for users who were exposed during the test window.
variant_name, compute: exposed users, users who viewed a Reel, users who saved a Reel, and users who completed the funnel from view to save.2024-06-01 through 2024-06-07 inclusive.saved_users / viewed_users and the funnel completion rate as saved_users / exposed_users.variant_name ascending.| Column | Type | Description |
|---|---|---|
| user_id | INT | Meta user identifier |
| experiment_id | VARCHAR(50) | Experiment name, such as reels_save_button_test |
| variant_id | INT | Assigned experiment variant |
| exposed_at | DATE | Date the user was exposed |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Event identifier |
| user_id | INT | Meta user identifier |
| event_name | VARCHAR(50) | Event type, such as reel_view or reel_save |
| event_date | DATE | Date the event occurred |
| Column | Type | Description |
|---|---|---|
| variant_idPK | INT | Variant identifier |
| variant_name | VARCHAR(50) | Variant label, such as control or treatment |