How do you rank entities by a metric within each group using window functions?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to rank rows by a metric within each group in SQL using window functions, such as the top 3 sales reps per department. Tests whether you understand partitioning and ordering inside a window, how the ranking functions treat ties, and how to filter to the top N per group.