mahir_data
mediumCIMB · joins

Employees who out-earn their manager

HR is auditing pay bands and wants to flag any employee who earns more than their own manager.

Return the employee's name and salary.

Schema

employees
idINT
nameTEXT
manager_idINT
salaryNUMERIC

Example input

employees