leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

0185.sql (280B)


0 SELECT D.name AS 'Department', 1 E.name AS 'Employee', 2 E.salary AS 'Salary' 3 FROM Employee E 4 JOIN Department D 5 ON E.departmentId = D.id 6 WHERE 3 > ( 7 SELECT COUNT(DISTINCT salary) 8 FROM Employee 9 WHERE salary > E.salary AND E.departmentId = departmentId 10 );