Blue Flame Labs wants a clean activity view for its Launchpad product. Write a PostgreSQL query that returns each unique active user's email and product area for completed events, excluding the specific product area Internal Tools.
users to usage_events using the user identifier.account_status = 'active' and events with event_status = 'completed'.product_area = 'Internal Tools'.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Primary key for the Launchpad user |
| VARCHAR(255) | User email address | |
| account_status | VARCHAR(20) | Current account state |
| Column | Type | Description |
|---|---|---|
| event_idPK | INTEGER | Primary key for the activity event |
| user_id | INTEGER | References users.user_id |
| product_area | VARCHAR(100) | Launchpad product area used |
| event_status | VARCHAR(20) | Processing status of the event |