Tell me about a window function query you have written or debugged.
Using the provided tables, write a PostgreSQL query that returns the latest review for every employee, including employees who have no reviews. If an employee has multiple reviews on the latest date, select the review with the greatest review ID.
employee_id ascending.employee_id, employee_name, department, review_id, review_date, and rating.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee display name |
| department | VARCHAR(100) | Employee department |
| Column | Type | Description |
|---|---|---|
| review_idPK | INT | Unique review identifier |
| employee_id | INT | Employee receiving the review |
| review_date | DATE | Date the review was recorded |
| rating | INT | Review rating from 0 to 5 |
| review_status | VARCHAR(30) | Review workflow status |