+-------------+---------+
|Column Name |Type|+-------------+---------+
| empId | int || name | varchar || supervisor | int || salary | int |+-------------+---------+
empId is the primarykeycolumnfor this table.
Eachrowof this table indicates the name and the ID of an employee in addition to their salary and the id of their manager.
Table: Bonus
1
2
3
4
5
6
7
8
9
10
+-------------+------+
|Column Name |Type|+-------------+------+
| empId | int || bonus | int |+-------------+------+
empId is the primarykeycolumnfor this table.
empId is a foreignkeyto empId from the Employee table.
Eachrowof this tablecontains the id of an employee and their respective bonus.
Write an SQL query to report the name and bonus amount of each employee with a bonus less than 1000.
Return the result table in any order.
The query result format is in the following example.
+-------+--------+-----------+--------+
| empId | name | supervisor| salary |+-------+--------+-----------+--------+
|1| John |3|1000||2| Dan |3|2000||3| Brad |null|4000||4| Thomas |3|4000|+-------+--------+-----------+--------+
Table: Bonus
1
2
3
4
5
6
7
+-------+-------+
| empId | bonus |+-------+-------+
|2|500||4|2000|+-------+-------+
empId is the primarykeycolumnfor this table.
Example ouput:
1
2
3
4
5
6
7
+-------+-------+
| name | bonus |+-------+-------+
| John |null|| Dan |500|| Brad |null|+-------+-------+