Skip to content

Practice Employee Bonus

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

Easy#577
LeetCode Problem

Employee Bonus

Problem Statement

Tables: Employee(empId INT, name VARCHAR, supervisor INT, salary INT); Bonus(empId INT, bonus INT). Employee.empId and Bonus.empId are unique; Bonus.empId references Employee.empId. Return name and bonus for employees with bonus below 1000 or with no Bonus row. Preserve null for missing bonuses. Output order is unrestricted.

Source: Employee Bonus on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
Employee table: +-------+--------+------------+--------+ | empId | name   | supervisor | salary | +-------+--------+------------+--------+ | 3     | Brad   | null       | 4000   | | 1     | John   | 3          | 1000   | | 2     | Dan    | 3          | 2000   | | 4     | Thomas | 3          | 4000   | +-------+--------+------------+--------+ Bonus table: +-------+-------+ | empId | bonus | +-------+-------+ | 2     | 500   | | 4     | 2000  | +-------+-------+
Output
+------+-------+ | name | bonus | +------+-------+ | Brad | null  | | John | null  | | Dan  | 500   | +------+-------+

Related LeetCode Problems

Practice more problems similar to Employee Bonus.

Review your practice with PhantomCodeAI

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