Write a SQL query to find the monthly active users who engaged with our marketing landing pages but did not complete a registration form.
Treat a user as active in a month when they have at least one marketing landing-page engagement. Exclude users who completed a registration form during that same calendar month.
activity_month and monthly_active_users.activity_month ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| created_at | TIMESTAMPTZ | Timestamp when the user account was created |
| is_active | BOOLEAN | Whether the user account is active |
| Column | Type | Description |
|---|---|---|
| engagement_idPK | INT | Unique engagement identifier |
| user_id | INT | User who engaged with the page |
| engaged_at | TIMESTAMPTZ | Timestamp of the engagement |
| page_type | VARCHAR(50) | Category of page where the engagement occurred |
| landing_page_name | VARCHAR(100) | Name of the landing page |
| Column | Type | Description |
|---|---|---|
| registration_idPK | INT | Unique registration form identifier |
| user_id | INT | User associated with the form |
| started_at | TIMESTAMPTZ | Timestamp when the form was started |
| completed_at | TIMESTAMPTZ | Timestamp when the form was completed |