Databricks Certified Data Engineer Associate — Question 121

Which of the following commands will return the number of null values in the member_id column?

Answer options

Correct answer: C

Explanation

The correct answer is C because the count_if function specifically counts the number of rows where member_id is NULL. Option A counts all non-null member_id values, Option B incorrectly attempts to subtract a null count from a total count, and Option D does not return a count at all.