
Explanation:
The PIVOT keyword in SQL is specifically designed to convert data from a long format (where each row represents a single observation) to a wide format (where each row represents multiple observations across columns).
Key Points:
In Databricks SQL and Spark SQL, PIVOT is the correct operation for converting long format data to wide format by specifying which column values should become new column headers.
Ultimate access to all questions.
No comments yet.