Certified Data Analyst Associate Exam QuestionsBrowse all questions from this exam

Certified Data Analyst Associate Exam - Question 27


A data analyst has been asked to count the number of customers in each region and has written the following query:

If there is a mistake in the query, which of the following describes the mistake?

Show Answer
Correct Answer: B

The mistake in the query is that it is missing a GROUP BY region clause. When using an aggregate function like COUNT(*) along with non-aggregated columns such as region, the query needs a GROUP BY clause to specify how the data should be grouped for the aggregation. Without the GROUP BY clause, the query will not execute properly as SQL requires it to perform the aggregation correctly.

Discussion

1 comment
Sign in to comment
MrWood47Option: B
Jan 27, 2024

The mistake in the query is that it is missing a GROUP BY clause. When using an aggregate function like COUNT(*) in conjunction with non-aggregated columns like region, you need to include a GROUP BY clause to specify how the data should be grouped for the aggregation.