DA0-002 Data Acquisition and Preparation Practice Question
A data analyst runs a query to count the number of customers in each city. The query uses COUNT(*) and GROUP BY city. However, the result includes NULL for some cities. What will COUNT(*) return for a group where the city is NULL?
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
✓
The number of rows with NULL city
COUNT(*) counts all rows in a group, regardless of NULL values in any column. If the city is NULL, all rows in that group are counted.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
NULL
Why it's wrong here
COUNT(*) never returns NULL; it returns an integer.
- ✗
0
Why it's wrong here
NULL groups still have rows; COUNT(*) counts them.
- ✓
The number of rows with NULL city
Why this is correct
COUNT(*) includes all rows, including those with NULL in the grouped column.
- ✗
The number of non-NULL cities
Why it's wrong here
That would be COUNT(city), not COUNT(*).
Go deeper
Related to this question
About these practice questions
This DA0-002 question is part of Courseiva's 986-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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.