Dynamic Pivot using window function?

Hi, I would like to setup a dynamic pivot that pivots distinct values in a column into new columns. Normally this could be achieved by declaring a variable that captures the column values that I wish to pivot. Is there an alternative method using window functions in dremio to achieve the same result?

1 Like