Employee Bonus

Moderate
0/80
Average time to solve is 20m

Problem statement

Select all employee's name and bonus whose bonus is < 1000.


Table:Employee

+-------+--------+-----------+--------+
| empId |  name  | supervisor| salary |
+-------+--------+-----------+--------+
|   1   | John   |  3        | 1000      |
|   2   | Dan    |  3        | 2000      |
|   3   | Brad   |  null     | 4000     |
|   4   | Thomas |  3        | 4000   |
+-------+--------+-----------+--------+


  • empId is the primary key column for this table.


    Table: Bonus

    +-------+-------+
    | empId | bonus |
    +-------+-------+
    | 2     | 500   |
    | 4     | 2000  |
    +-------+-------+
    


  • empId is the primary key column for this table.


    Example output:
     +-------+-------+
     | name  | bonus |
    +-------+-------+
    | Dan    | 500 |
    | John   |          |
    | Brad   |         |
    +-------+-------+
    
  • Solution
    (100% EXP penalty)
    Employee Bonus
    Console