Skip to content

Practice Employees With Missing Information

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#1965
LeetCode Problem

Employees With Missing Information

Problem Statement

Tables: Employees(employee_id INT, name VARCHAR); Salaries(employee_id INT, salary INT). Employees.employee_id and Salaries.employee_id are unique in their respective tables. Return employee_id for employees lacking a matching name record or salary record. Include ids present in only one of the two tables. Order by employee_id ascending.

Source: Employees With Missing Information on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
Employees table: +-------------+----------+ | employee_id | name     | +-------------+----------+ | 2           | Crew     | | 4           | Haven    | | 5           | Kristian | +-------------+----------+ Salaries table: +-------------+--------+ | employee_id | salary | +-------------+--------+ | 5           | 76071  | | 1           | 22517  | | 4           | 63539  | +-------------+--------+
Output
+-------------+ | employee_id | +-------------+ | 1           | | 2           | +-------------+

Related LeetCode Problems

Practice more problems similar to Employees With Missing Information.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.