QuestionQ141

VerifiedData Processing & Transformations

Which SQL keyword can be used to convert a table from a long format to a wide format?

Explanation

The PIVOT clause rotates unique values from a column into multiple output columns, transforming long-format data (one row per measurement) into wide-format data (one row per entity with measurements spread across columns). TRANSFORM, SUM, and CONVERT do not perform this row-to-column reshaping.

Community Discussion

No comments yet. Be the first to start the discussion!