Databricks Certified Data Engineer - Associate

Databricks Certified Data Engineer - Associate

Get started today

Ultimate access to all questions.


In the context of transforming data in SQL, especially when dealing with data analysis tasks, one often needs to reshape data from a long format (where each row represents an observation) to a wide format (where each row represents an entity and columns represent different attributes of that entity). Which SQL keyword can be used to achieve this transformation?




Explanation:

The SQL keyword 'PIVOT' is used to rotate a table, converting it from a long format to a wide format by aggregating and spreading data across columns based on a specified attribute.