How would you write a SQL query to compare engagement across different user segments at PrizePicks?
Use the provided user and activity records for January 2025. Include users with no qualifying activity and exclude activity outside the month.
segment, users_in_segment, engaged_users, total_events, avg_events_per_user, and engagement_rate_pct2025-01-01 inclusive through 2025-02-01 exclusive.total_events equal to 0.avg_events_per_user and engagement_rate_pct to two decimal places.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique PrizePicks user identifier |
| segment | VARCHAR(50) | User engagement segment |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique activity event identifier |
| user_id | INT | User associated with the activity event |
| event_type | VARCHAR(50) | Type of user activity |
| occurred_at | DATE | Date on which the activity occurred |