From a81a6ec6738ef2c71afdf23301a4c1e6b7891ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Chac=C3=B3n=20Guti=C3=A9rrez?= <138903866+joseantoniochacon@users.noreply.github.com> Date: Sat, 1 Jun 2024 14:07:07 -0600 Subject: [PATCH] Create README - LeetHub --- 0577-employee-bonus/README.md | 67 +++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 0577-employee-bonus/README.md diff --git a/0577-employee-bonus/README.md b/0577-employee-bonus/README.md new file mode 100644 index 0000000..6c00c48 --- /dev/null +++ b/0577-employee-bonus/README.md @@ -0,0 +1,67 @@ +
Table: Employee
+-------------+---------+ +| Column Name | Type | ++-------------+---------+ +| empId | int | +| name | varchar | +| supervisor | int | +| salary | int | ++-------------+---------+ +empId is the column with unique values for this table. +Each row of this table indicates the name and the ID of an employee in addition to their salary and the id of their manager. ++ +
+ +
Table: Bonus
+-------------+------+ +| Column Name | Type | ++-------------+------+ +| empId | int | +| bonus | int | ++-------------+------+ +empId is the column of unique values for this table. +empId is a foreign key (reference column) to empId from the Employee table. +Each row of this table contains the id of an employee and their respective bonus. ++ +
+ +
Write a solution to report the name and bonus amount of each employee with a bonus less than 1000
.
Return the result table in any order.
+ +The result format is in the following example.
+ ++
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 | ++------+-------+ ++