Databricks Certified Data Engineer Associate — Question 78
Which SQL keyword can be used to convert a table from a long format to a wide format?
Answer options
- A. TRANSFORM
- B. PIVOT
- C. SUM
- D. CONVERT
Correct answer: B
Explanation
The correct answer is B, PIVOT, which specifically allows the transformation of data from a long format to a wide format in SQL. The other options, such as TRANSFORM and CONVERT, do not serve this purpose, while SUM is an aggregation function that does not change the table structure.