PIVOT CLAUSE enables us to change a table-valued expression into another table. PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output. It turns the unique values in one column into multiple columns in the output and performs aggregations on any remaining column values.

UNPIVOT carries out the opposite operation to PIVOT by rotating columns of a table-valued expression into column values.