Let's analyze the input data:
- Joe (id=1) has a salary of 70000 and his managerId is 3. Manager with id 3 is Sam. Sam's salary is 60000. Since Joe's salary (70000) > Sam's salary (60000), Joe is included in the output.
- Henry (id=2) has a salary of 80000 and his managerId is 4. Manager with id 4 is Max. Max's salary is 90000. Since Henry's salary (80000) is NOT > Max's salary (90000), Henry is NOT included.
- Sam (id=3) has a salary of 60000 and his managerId is Null. Since Sam has no manager, he cannot earn more than one, so he is NOT included.
- Max (id=4) has a salary of 90000 and his managerId is Null. Since Max has no manager, he cannot earn more than one, so he is NOT included.
Therefore, only Joe meets the condition.