COF-C03 Practice Question: Performance Optimization, Querying, and Transformation
A data engineer needs to transform a table by unpivoting columns Q1, Q2, Q3, Q4 into rows with a quarter label and sales amount. Which Snowflake SQL construct is designed for this task?
⚠ Common exam trap
It's easy for candidates to confuse PIVOT and UNPIVOT; PIVOT goes from rows to columns, while UNPIVOT goes from columns to rows.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
UNPIVOT
The UNPIVOT operator in Snowflake is the correct tool for converting columns into rows. It takes a list of columns and produces a result set with one row per column per original row, including a label column and a value column. This is exactly what is needed to transform Q1, Q2, Q3, Q4 into quarter labels and sales amounts.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
LATERAL FLATTEN
Why it's wrong here
LATERAL FLATTEN is used for semi-structured data, such as expanding arrays or objects in a VARIANT column. It does not operate on standard relational columns like Q1, Q2, Q3, Q4. While it can be used creatively, it is not the intended or efficient tool for unpivoting structured columns.
- ✗
PIVOT
Why it's wrong here
PIVOT rotates rows into columns, which is the opposite of what is needed. The engineer wants to convert columns into rows, so PIVOT would aggregate data into a wider format, not unpivot it. Using PIVOT here would produce a result with more columns, not the desired normalized rows.
- ✓
UNPIVOT
Why this is correct
UNPIVOT is specifically designed to transform columns into rows, converting a wide table into a long format. It takes a set of columns and produces one row per column per original row, along with a label column and a value column. This matches the requirement to unpivot Q1 through Q4 into quarter labels and sales amounts.
- ✗
ARRAY_AGG
Why it's wrong here
ARRAY_AGG aggregates values into an array, which is an aggregation, not a transformation of columns to rows. It would collapse multiple rows into a single array, which is the opposite of unpivoting. It does not provide a way to label each value with its source column, so it cannot achieve the desired result.
About these practice questions
Courseiva writes every COF-C03 question from scratch — 280 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Snowflake exam blueprint
This COF-C03 practice question is part of Courseiva's free Snowflake certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the COF-C03 exam.