PDE Preparing and Using Data for Analysis Practice Question
You have a BigQuery table with sales data and want to pivot product categories into columns. Which SQL clause should you use?
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
✓
PIVOT
PIVOT is the standard SQL clause to rotate rows into columns. UNPIVOT rotates columns to rows. ARRAY_AGG and STRUCT are not used for pivoting.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
UNPIVOT
Why it's wrong here
UNPIVOT does the opposite.
- ✓
PIVOT
Why this is correct
PIVOT transforms rows into columns.
- ✗
ARRAY_AGG with CROSS JOIN
Why it's wrong here
Not a standard way to pivot.
- ✗
STRUCT
Why it's wrong here
STRUCT creates a complex column, not pivot.
Go deeper
Related to this question
About these practice questions
This PDE question is part of Courseiva's 890-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE practice question is part of Courseiva's free Google Cloud 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 PDE exam.