Ultimate access to all questions.
What is the primary function of the PIVOT clause in Spark SQL?
Explanation:
The PIVOT clause in Spark SQL is designed for aggregating data and rotating rows into columns. This transformation changes the data from a long format, where data is listed in rows, to a wide format, where data is displayed in columns. It's especially useful for generating summary tables and facilitating data analysis.