You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a solution to report the IDs of all the employees with *missing information*. The information of an employee is missing if:
11
+
12
+
* The employee's *name* is missing, or
13
+
* The employee's *salary* is missing.
14
+
15
+
Return the result table ordered by `employee_id`*in ascending order*. [[Full Description](https://leetcode.com/problems/employees-with-missing-information/description/)]
16
+
17
+
## Submitted Solution
18
+
19
+
```sql
20
+
-- Submitted Solution
21
+
SELECT
22
+
COALESCE(e.employee_id, s.employee_id) AS employee_id
23
+
FROM Employees AS e
24
+
FULL JOIN Salaries AS s ONe.employee_id=s.employee_id
25
+
WHEREe.name IS NULL
26
+
ORs.salary IS NULL
27
+
ORDER BY employee_id ASC
28
+
;
29
+
```
30
+
31
+
## Site Solution
32
+
33
+
```sql
34
+
-- LeetCode Solution
35
+
-- Solution #1: Simulate Full Join via Unioning a Left and Right Join
0 commit comments