I'm trying to execute this query to find the employees with highest salary based on department.
Inner query works but I'm getting error from my outer query. I'd highly appreciate it if someone can point me in the right direction. Thank you.
Error Message: "An expression of non-boolean type specified in a context where a condition is expected, near ','."
select *
from employee e
where (dept_name, salary) in (select dept_name,max(salary)as HighestSalary
from employee e
group by dept_name)
I'd highly appreciate it if anyone can kindly point me in the right direction. Thank you!