Given a table of user activity logs, write a query to identify the top three most frequent actions performed by each user cohort.
Exclude rows with a NULL cohort or action. Ties should be broken alphabetically by action.
cohort, action, action_count, and action_rank.| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique identifier for the activity log entry |
| user_id | INT | Identifier of the user who performed the action |
| cohort | VARCHAR(30) | User cohort label |
| action | VARCHAR(50) | Action recorded in the activity log |
| occurred_at | TIMESTAMP | Timestamp when the action occurred |