Skip to content

1873. Calculate Special Bonus 👍

1
2
3
4
5
SELECT
  employee_id,
  IF(employee_id % 2 = 1 AND LEFT(name, 1) != 'M', salary, 0) AS bonus
FROM Employees
ORDER BY 1;