Given a table of Snowflake user login sessions, calculate the month-over-month growth rate of active users, ensuring you handle edge cases where a month has zero activity.
Use the provided users and login_sessions tables. Treat a user as active once per calendar month if they have at least one login session. Include every calendar month between the first and last non-null login date.
month_start, active_users, previous_active_users, and growth_rate_pct.NULL for growth when the previous month has zero active users or no previous month.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Snowflake user identifier |
| user_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique login session identifier |
| user_id | INT | User associated with the login session |
| login_at | TIMESTAMP | Timestamp when the login session began |