Write a query to find the top 3 most frequently used features in Aveva’s software over the last 30 days, partitioned by user region.
Use the users, features, and feature_usage tables. Exclude usage records without a user region or feature, and treat tied usage counts as the same rank.
region, feature_name, usage_count, and usage_rank.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| display_name | VARCHAR(100) | User display name |
| region | VARCHAR(50) | User geographic region |
| Column | Type | Description |
|---|---|---|
| feature_idPK | INT | Unique feature identifier |
| feature_name | VARCHAR(120) | Aveva software feature name |
| Column | Type | Description |
|---|---|---|
| usage_idPK | INT | Unique usage event identifier |
| user_id | INT | User who used the feature |
| feature_id | INT | Feature used in the event |
| used_at | TIMESTAMP | Timestamp of the feature usage event |