Exam Databricks-Certified-Data-Analyst-Associate Topic 1 Question 85 Discussion

Actual exam question for Databricks's Databricks-Certified-Data-Analyst-Associate exam
Question #: 85
Topic #: 1
A data analyst is working with a nested array column products in table transactions. The analyst wants to return the first item in the array for each row.
The data analyst is using the following incomplete command:
SELECT
transaction_id,
_____ AS first_product
FROM transactions;
Which line of code should the data analyst use to fill in the blank so that it successfully completes the task?

Suggested Answer: C Vote an answer

The correct answer is C because Databricks SQL supports bracket notation for arrays, and array indexing starts at 0. Therefore, the first element of the products array is accessed with products[0]. Options A and B use dot notation, which is not the correct syntax for array indexing. Option D returns the second element, not the first.
Official documentation extract used: Databricks states that the bracket operator returns an array element by index and that "the first element of an ARRAY is at index 0."

by Eden at Oct 27, 2026, 08:02 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

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.

0
0
0
10