Tag: unpivot

11 September 2020

The type of column ‘xxx’ conflicts with the type of other columns in the UNPIVOT list.

UNPIVOT is a SQL standard function that allows users to transform columns into rows, and Snowflake also supports it. Please see below example on how to use it: You can see that the result turned the scores that were in each column of a row into seperate rows that still associated with original student ID. This query works well for the columns defined in UNPIVOT […]