Rank Employees by Hire Date Within Department
Medium
window-functions
Google
Meta
Airbnb
Rank employees by their hire_date within each department (earliest hire = rank 1). Return name, department, hire_date, and hire_rank, ordered by department then hire_rank.
Expected Output: Each employee ranked within their department by hire date.
Tables
Hints (3 available)
SQL Editor
Output
Click "Run" to see results...