
Answer-first summary for fast verification
Answer: COLLECT_SET
The `COLLECT_SET` function is the correct choice because it returns a unique list of values from an input column, eliminating any duplicates. This is in contrast to `COLLECT_LIST`, which includes all values, including duplicates. The other options, such as `ARRAY_INTERSECT` and `ARRAY_UNION`, perform different operations on arrays and do not specifically return a unique list of values from a single column.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.