How can I find the 5th highest age using dense rank and window functions with rank equal to 5?
Asked in the Interview stage. Use the employees table and return every employee whose age has a dense rank of 5.
employee_id, employee_name, age, and age_rankage descending, then employee_id ascending| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| age | INT | Employee age in years |