Challenge: Employee Bonus Eligibility
Task
Swipe to start coding
You need to determine bonus eligibility for each employee using nested CASE WHEN logic. Add a column named bonus to the result:
- If both
salaryis greater than or equal to 80000 andyears_at_companyis greater than or equal to 5, setbonusto'High'. - If only one of these conditions is met, set
bonusto'Medium'. - If neither condition is met, set
bonusto'None'.
Solution
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4.17
Challenge: Employee Bonus Eligibility
Swipe to show menu
Task
Swipe to start coding
You need to determine bonus eligibility for each employee using nested CASE WHEN logic. Add a column named bonus to the result:
- If both
salaryis greater than or equal to 80000 andyears_at_companyis greater than or equal to 5, setbonusto'High'. - If only one of these conditions is met, set
bonusto'Medium'. - If neither condition is met, set
bonusto'None'.
Solution
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 2
single