Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Handle Missing Employee Data | Advanced CASE WHEN Logic
Practice
Projects
Quizzes & Challenges
Quiz
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: Handle Missing Employee Data

Tâche

Swipe to start coding

Write a query that returns all columns from the employees table, along with a new column named data_status. This column should contain the value 'Complete' if all fields (name, department, salary, years_at_company) for the employee are not NULL, and 'Incomplete' if any of these fields are NULL.

  • Add a column called data_status to the result set.
  • Set data_status to 'Complete' if name, department, salary, and years_at_company are all not NULL.
  • Set data_status to 'Incomplete' if any of these fields are NULL.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 5
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Handle Missing Employee Data

Glissez pour afficher le menu

Tâche

Swipe to start coding

Write a query that returns all columns from the employees table, along with a new column named data_status. This column should contain the value 'Complete' if all fields (name, department, salary, years_at_company) for the employee are not NULL, and 'Incomplete' if any of these fields are NULL.

  • Add a column called data_status to the result set.
  • Set data_status to 'Complete' if name, department, salary, and years_at_company are all not NULL.
  • Set data_status to 'Incomplete' if any of these fields are NULL.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 5
single

single

some-alt