Question: what is the difference between pivot and unpivot?
Answer: PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output. ... UNPIVOT carries out the opposite operation to PIVOT by rotating columns of a table-valued expression into column values.