Union on left joins
Code\n\n/* Write your T-SQL query statement below */\n\nselect distinct c.employee_id from \n(\nselect e.employee_id, e.name, s2.salary from Employees e\nleft j
# Code\n```\n/* Write your T-SQL query statement below */\n\nselect distinct c.employee_id from \n(\nselect e.employee_id, e.name, s2.salary from Employees e\nleft join Salaries s2 on s2.employee_id = e.employee_id\n\nunion\n\nselect s.employee_id, e2.name, s.salary from Salaries s\nleft join Employees e2 on e2.employee_id = s.employee_id\n) as c\nwhere c.name is null or c.salary is null\norder by c.employee_id\n```
['MS SQL Server']