Write a SQL query to analyze weekly active users by region and product version, and identify the regions with the largest week-over-week decline for Tencent.
Use the provided user and activity data. Count each user once per region, product version, and calendar week. Compare each week with the immediately preceding available week and return only declines.
region, product_version, week_start, wau, previous_wau, and declinedecline descending, then region, product version, and week_start ascending| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Tencent user identifier |
| region | VARCHAR(50) | User region |
| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity event identifier |
| user_id | INT | User who generated the activity |
| activity_at | TIMESTAMP | Timestamp of the user activity |
| product_version | VARCHAR(30) | Tencent product version used during the activity |