I have a dataset that looks like this in SQL
Col1 Col2 Col3 Col4
A re T huge
A re T small
B re T huge
C re T huge
C re T medium
C re T small
For any duplicates in the first 3 columns, I want to create new columns next to it with each unique value from Col4. My ultimate goal is to join this to another dataset and I want to include all the information.
I want the final dataset to look like this:
Col1 Col2 Col3 Col4 Col5 Col6 ....
A re T huge small NULL
B re T huge NULL NULL
C re T huge medium small