SPSS offers several simple ways for restructuring data. VARSTOCASES -short for “variables to cases”- stacks variables on top of each other.
Its reverse is CASESTOVARS -short for “cases to variables”. It basically stacks groups of cases behind each other in new variables.
AGGREGATE adds summary statistics such as frequencies, sums and means to your data, optionally collapsing cases in the process.
Finally, FLIP basically transposes data by rotating the entire dataset by 90 degrees.