Why did you use the window function that you did, and what other window functions have you used?
Using the provided tables, demonstrate your answer by returning the most recent event for each active account, including active accounts with no events.
account_id, account_name, event_id, event_type, and event_timestamp.account_id ascending, with the greatest event_id breaking timestamp ties.| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| account_name | VARCHAR(100) | Account display name |
| is_active | BOOLEAN | Whether the account is active |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| account_id | INT | Account associated with the event |
| event_type | VARCHAR(50) | Type of account event |
| event_timestamp | TIMESTAMP | Timestamp when the event occurred |