From 47776e5496d91c0ea2fe5d7a39e3cb696c51a555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=E1=BB=93=20V=C4=83n=20H=C3=B2a?= <56647826+hovanhoa@users.noreply.github.com> Date: Mon, 23 Oct 2023 23:20:22 +0700 Subject: [PATCH] Time: 2326 ms (5%), Space: 0B (100%) - LeetHub --- .../0181-employees-earning-more-than-their-managers.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 0181-employees-earning-more-than-their-managers/0181-employees-earning-more-than-their-managers.sql diff --git a/0181-employees-earning-more-than-their-managers/0181-employees-earning-more-than-their-managers.sql b/0181-employees-earning-more-than-their-managers/0181-employees-earning-more-than-their-managers.sql new file mode 100644 index 0000000..3b45fd2 --- /dev/null +++ b/0181-employees-earning-more-than-their-managers/0181-employees-earning-more-than-their-managers.sql @@ -0,0 +1,4 @@ +# Write your MySQL query statement below +SELECT e1.name as Employee +FROM Employee e1 +WHERE e1.managerId is not null and e1.salary > (select salary from Employee e2 where e1.managerId = e2.id) \ No newline at end of file