I want the names of the employees along with their salary and department who have maximum salary less than 50,000. ihave the following
SELECT department, MAX(salary) as Highest salary
FROM employees
GROUP BY department
HAVING MAX(salary) < 50000
How do I get the name of the employee to be returned?