Write a SQL query using basic joins and window functions to answer a product analytics question.
Use products and product_events to measure product engagement during January 2026. Return every product, including products with no events, and rank products within their category by event count.
product_id, product_name, category, event_count, and category_rank| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product display name |
| category | VARCHAR(50) | Product category |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique product event identifier |
| product_id | INT | Product associated with the event |
| event_type | VARCHAR(30) | Type of product interaction |
| event_date | DATE | Date of the product interaction |