How to query a list of data to make rows into columns

Viewed 96

I have a list of data like below

Item    Vendor  Compliance  Status

I1      V1          C1          Y
I1      V1          C2          N
I1      V1          C3          Y
I1      V2          C1          Y
I1      V2          C2          Y
I2      V1          C3          Y

How can I query to make it become

Item    Vendor  C1  C2  C3

I1      V1       Y  N   Y    
I1      V2       Y  Y   -
I2      V1       -  -   Y

While the compliance might have many, not necessary only have C1, C2, C3.

3 Answers
Related