Leet Code
Leet Code
Leet Code
1. +----+------------------+
+----------+
SELECT
a.NAME AS Employee
FROM Employee AS a JOIN Employee AS b
ON a.ManagerId = b.Id
AND a.Salary > b.Salary;
3.
| Id | Salary |
+----+--------+
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |
+----+--------+
+---------------------+
| SecondHighestSalary |
+---------------------+
| 200 |
+---------------------+