Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Employee Bonus Eligibility | Advanced CASE WHEN Logic
Practice
Projects
Quizzes & Challenges
Quizzer
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: Employee Bonus Eligibility

Opgave

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 salary is greater than or equal to 80000 and years_at_company is greater than or equal to 5, set bonus to 'High'.
  • If only one of these conditions is met, set bonus to 'Medium'.
  • If neither condition is met, set bonus to 'None'.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 2
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Employee Bonus Eligibility

Stryg for at vise menuen

Opgave

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 salary is greater than or equal to 80000 and years_at_company is greater than or equal to 5, set bonus to 'High'.
  • If only one of these conditions is met, set bonus to 'Medium'.
  • If neither condition is met, set bonus to 'None'.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. Kapitel 2
single

single

some-alt