Question 570
Consider this Snowflake situation: A sales report needs monthly category values as columns instead of one row per category. Which platform behavior BEST explains the appropriate solution?
Explanation
Correct Answer
The decisive Snowflake behavior is: PIVOT transforms grouped row categories into output columns for supported SQL queries. It supports the response: Use supported PIVOT syntax with the appropriate aggregation and category list. Confirm it with this observable result: A sample two-month dataset produces the expected category columns and totals. Distinguish this mechanism from superficially related Snowflake features.
Incorrect Answers
The offered statement is true for this other mechanism: MERGE supports set-based conditional insert and update behavior in supported Snowflake SQL. It does not explain the facts described here, which follow from: PIVOT transforms grouped row categories into output columns for supported SQL queries.
This principle describes a separate cause: Scaling out adds clusters for parallel query traffic instead of only making one cluster bigger. The reported condition is governed by: PIVOT transforms grouped row categories into output columns for supported SQL queries. The two mechanisms should not be conflated.
FLATTEN transforms nested collection values into a relational row set for further SQL processing. That explanation applies to a different technical failure. Here the controlling principle is: PIVOT transforms grouped row categories into output columns for supported SQL queries.