Converting multi row to a single row in new column is PostgresSQL

38 Views Asked by At

I have this table :

|Role|  Att1 |
---------------
|R1  |  A    | 
|R1  |  B    |
|R2  |  C    |
|R2  |  D    |

And I want to consolidate the table into single row with multiple attributes like the table below

| Role  | Att1  | Att2
------------------------
| R1    |   A   |    B
| R2    |   C   |    D

Any idea how to do that?

0

There are 0 best solutions below