I have a question from class that requires me to use joins and on clause. I'm still beginner and not sure how to use joins. Here's the question and what I got so far, any help would be appreciated, thanks
Display the department name and Highest, Lowest and Average pay per each department. Name these results High, Low and Avg. Use JOIN and ON form of the syntax. Sort the output so that department with highest average salary are shown first.
Select e.Max(Salary) "high", e.Min(Salary) "low", e.Avg(Salary) "avg", d.Department_Name
From Employees E Join Departments D
on (e.department_id=d.department_id)
Group By E.Department_Id
order by "avg" desc;