DA0-002 Data Acquisition and Preparation Practice Question
During data profiling, an analyst wants to identify the number of distinct values in a column. Which SQL function should be used?
⚠ Common exam trap
DA0-002 often tests the difference between COUNT(*), COUNT(column), and COUNT(DISTINCT column) — candidates must remember that only COUNT(DISTINCT) deduplicates values.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
COUNT(DISTINCT column)
COUNT(DISTINCT column) returns the number of unique non-null values in a column, which is exactly what data profiling requires to measure cardinality. It is the standard SQL aggregate for distinct value counts.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
DISTINCT(column)
Why it's wrong here
DISTINCT is a SELECT clause keyword that returns the unique rows themselves, not a count of them, so it cannot yield the number of distinct values. It is tempting because it does eliminate duplicates, and it would be correct if the analyst needed the actual list of unique values rather than their quantity.
- ✓
COUNT(DISTINCT column)
Why this is correct
COUNT(DISTINCT column) returns the cardinality of a column by eliminating duplicate values before counting, directly satisfying the requirement to identify the number of distinct values during data profiling. Unlike COUNT(*), which counts every row including repeats, this aggregate yields the unique-value total the analyst needs.
- ✗
COUNT(*)
Why it's wrong here
COUNT(*) returns the total number of rows in the table or group, including duplicates and NULLs, so it never measures distinct values. It is tempting because it is the standard way to count rows, and it would be correct if the analyst simply needed the overall record count during profiling.
- ✗
COUNT(column)
Why it's wrong here
COUNT(column) tallies non-NULL rows in that column, counting every repeated value separately, so it returns the row population rather than the number of distinct values. It is tempting because COUNT is the right aggregate family, and COUNT(column) would be correct if the analyst wanted to know how many rows contain a non-NULL entry.
Go deeper
Related to this question
About these practice questions
This DA0-002 question is part of Courseiva's 1,004-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.