Exam Databricks-Certified-Data-Analyst-Associate Topic 4 Question 52 Discussion
Actual exam question for Databricks's Databricks-Certified-Data-Analyst-Associate exam
Question #: 52
Topic #: 4
Question #: 52
Topic #: 4
A data analyst wants the following output:

Which statement will produce this output?

Which statement will produce this output?
Suggested Answer: D Vote an answer
Option D is correct because the desired result needs one row per customer, so the query must aggregate orders by customer_name. It also needs the output column name number_of_orders, so the aggregate expression must be aliased. Databricks SQL documentation states that count "returns the number" of rows in a group, and the SELECT clause supports a column alias for an expression result. Therefore, count(order_id) AS number_of_orders with GROUP BY customer_name is the correct statement. Option B counts correctly but does not alias the output column as required. Option A does not aggregate. Option C uses invalid SQL syntax because USE customer_name is not a grouping clause. References: Databricks count aggregate function and SELECT clause documentation.
by Broderick at Aug 29, 2026, 11:14 PM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).