There is bonuses table where some employees already have records.
A decision was made to encourage employees of department 20 as follows:
-If employees already have bonus record and salary less than 50000 - add additional 2% of their salary to existing bonus.
-All others should have 3% from their salary.
How to make these changes in one statement?