Listing 6: Query That Uses the DENSE_RANK Function to Determine the Three Highest- Paid Employees in Each Department SELECT dept_id, last_name, salary, dept_dense, dept_row# FROM (SELECT dept_id, job, last_name, salary, DENSE_RANK() OVER (PARTITION BY dept_id ORDER BY salary DESC) dept_dense, -- BEGIN CALLOUT A ROW_NUMBER() OVER (ORDER BY dept_id ASC) dept_row# -- END CALLOUT A FROM employee) AS part_dept WHERE dept_dense <= 3 ORDER BY dept_id, dept_dense, dept_row#