Must-Know Window Functions
Window functions perform calculations across related table rows without collapsing them: - `ROW_NUMBER()`: Unique sequential integer for each row in a partition. - `RANK()`: Sequential rank, leaves gaps on ties (1, 2, 2, 4). - `DENSE_RANK()`: Sequential rank, no gaps on ties (1, 2, 2, 3)—essential for "Nth highest salary" queries.