Noos
PT EN
RAN-DBDEA-00231
Ranvier · DBDEA

Exam DBDEA Topics: transformation Difficulty: hard

The weekly engagement report counts reviews with the expression SELECT count(comment_text) FROM catalog.reviews. The reported number comes out lower than the table's actual row count, and QA confirms that many customers submit a star rating only, leaving comment_text NULL. The report must count every review. Which expression and explanation are correct?

Options (Reading Mode) Click to filter discussion →
  1. A. count(comment_text) counts every row, NULLs included, so the missing reviews must be dropped somewhere else in the pipeline
  2. B. count(*) skips any row that contains a NULL in one of its columns, so both expressions under-report on nullable tables
  3. C. count(expr) counts only rows where expr is not NULL; count(*) counts every row, so the report needs count(*) to total all reviews
  4. D. count(*) and count(col) are equivalent and always return the same number, so the shortfall must come from a stale result cache
Reveal answer

Correct answer: count(expr) counts only rows where expr is not NULL; count(*) counts every row, so the report needs count(*) to total all reviews

Reference: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-functions

02 — The Myelin Layer · Canonical Discussion

Where the exam tries to trick you — and how those who passed solved it.

0 Passed

contributed to this question

Answer Distractor Matrix Click an option to filter or open its dissection.
✦ Consolidated Synthesis (Wiki) rev. #1 (baseline) · CC BY-SA 4.0
Start synthesis for this question →

No community synthesis consolidated for this question yet. Below is the verifiable official starting point — if you passed the exam, open the option dissection.

Official Answer (C): count(expr) counts only rows where expr is not NULL; count(*) counts every row, so the report needs count(*) to total all reviews

Ranvier · DBDEA

Contribute to this Question

Your contribution builds your Orbital Sheath

Peer contributions

No public contribution yet. Be the first who passed to explain why the distractors trick candidates — your contribution builds your Orbital Sheath.