Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 81d1059

Browse files
Calculate Special Bonus
1 parent 9a6c695 commit 81d1059

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Link: https://leetcode.com/problems/calculate-special-bonus/
2+
Tool: MS SQL Server
3+
4+
5+
6+
7+
8+
9+
select employee_id,
10+
(case when [name] like '[^M]%' and employee_id % 2 != 0 then salary else 0 end) as 'bonus'
11+
from Employees
12+
order by employee_id

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /