I am able to run this on my local mysql but not on leetcode


  • 0
    S
        select e1.name, e1.salary, d.name from employee e1, department d where 
    (select count(distinct(e2.salary)) from employee e2 where e2.salary > e1.salary and e2.departmentID = d.id) = 0 and e1.departmentid = d.id;

Log in to reply
 

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