Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Exam Databricks-Certified-Data-Analyst-Associate Topic 4 Question 22 Discussion

Actual exam question for Databricks's Databricks Certified Data Analyst Associate Exam exam
Question #: 22
Topic #: 4
[All Databricks Certified Data Analyst Associate Exam Questions]

A data analyst has created a user-defined function using the following line of code:

CREATE FUNCTION price(spend DOUBLE, units DOUBLE)

RETURNS DOUBLE

RETURN spend / units;

Which of the following code blocks can be used to apply this function to the customer_spend and customer_units columns of the table customer_summary to create column customer_price?

Show Suggested Answer Hide Answer

Contribute your Thoughts:

Lai
3 days ago
I think A is also a possible answer because it renames the columns as customer_price.
upvoted 0 times
...
Rozella
4 days ago
I'm not sure, but I think E makes sense because it directly applies the function to the columns.
upvoted 0 times
...
Miesha
4 days ago
Haha, I bet the answer is E. Who wants to do all that extra work with 'function' and 'double' when you can just call the function directly?
upvoted 0 times
...
Elin
5 days ago
Hmm, I'm not sure. Option D with the 'double' function seems a bit strange to me. Is that really necessary?
upvoted 0 times
...
Ernest
11 days ago
I agree with Jennie, E seems like the right choice.
upvoted 0 times
...
Joesph
17 days ago
I think option C is the correct answer. Using the function name directly within the SELECT statement is the way to go.
upvoted 0 times
...
Jennie
22 days ago
I think the correct answer is E.
upvoted 0 times
...
Matilda
1 months ago
Option E looks good to me. It's a straightforward way to apply the function and create the new column.
upvoted 0 times
Marge
13 days ago
Yes, I agree. It's the most logical choice.
upvoted 0 times
...
Lindsey
19 days ago
I think option E is the correct one.
upvoted 0 times
...
...

Save Cancel