
Databricks Certified Data Engineer - Associate
Get started today
Ultimate access to all questions.
Given a dataset with two columns, cartId (session ID) and items (an array of items added to the cart), the Marketing team requests a unique list of items ever added to the cart by each customer. Complete the query to achieve the expected result.
Schema: cartId INT, items Array
Sample Data:
SELECT cartId, ___ (___(items)) as items
FROM carts GROUP BY cartId
Expected result:
cartId items
1 [1,100,200,300,250]
Given a dataset with two columns, cartId (session ID) and items (an array of items added to the cart), the Marketing team requests a unique list of items ever added to the cart by each customer. Complete the query to achieve the expected result.
Schema: cartId INT, items Array
Sample Data:
SELECT cartId, ___ (___(items)) as items
FROM carts GROUP BY cartId
Expected result:
cartId items
1 [1,100,200,300,250]
Real Exam
Comments
Loading comments...