Transform data by implementing pivot, unpivot, rollup, and cube