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

bookChallenge: Handle Missing Employee Data

Uppgift

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.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookChallenge: Handle Missing Employee Data

Svep för att visa menyn

Uppgift

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.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 5
single

single

some-alt