Skip to content

Commit 0d0ca02

Browse files
authored
Create 1873.Calculate-Special-Bonus.sql
1 parent e14cbe2 commit 0d0ca02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Easy/1873.Calculate-Special-Bonus.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--MySQL & MS SQL Server
2+
SELECT
3+
employee_id,
4+
CASE WHEN employee_id % 2 !=0 AND name NOT LIKE 'M%' THEN salary
5+
ELSE 0 END AS bonus
6+
FROM Employees
7+
ORDER BY employee_id;

0 commit comments

Comments
 (0)