SALARIES — Top 3 / bottom 3 earners (with ties)

Write a query that returns the name and salary (in this column order) of each professor who is either a top 3 or bottom 3 earner (include ties).

Table schema
CREATE TABLE SALARIES (Professor_Name TEXT, Department TEXT, Salary INT);
Hint (click to show)
DENSE_RANK handles ties.