Databricks Certified Data Engineer Associate — Question 34
Which of the following SQL keywords 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
- E. WHERE
Correct answer: B
Explanation
The correct answer is B, PIVOT, as it 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 specific function, while SUM and WHERE are used for aggregation and filtering, respectively.