Passed at a time for the first time !

  • 0

    First , find out the highest salary in each department into a middle table;
    then find out the info required matches the msg in the previous middle table

    select as department , as employee ,e.salary as salary from Employee e,
        (select max(salary) as salary, as id , as name 
            from Employee e,Department d 
                where group by
        ) sub 
    where and e.salary = sub.salary

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.