I'm wanting to perform a self-join on a table to present the values in a column wise manner. For each object there are several attributes (up to a known limit), but not all attributes are stored for all objects. I've tried various joins but I'm always getting missing rows, where I would like to have empty values instead.
Starting Table:
| ObjectID | Attribute | Value |
|---|---|---|
| 1 | a | 10 |
| 1 | b | 20 |
| 1 | c | 30 |
| 2 | a | 15 |
| 2 | c | 25 |
What I'm aiming for (given that I know the three possible attributes are a,b,c) is
| ObjectID | a | b | c |
|---|---|---|---|
| 1 | 10 | 20 | 30 |
| 2 | 15 | 25 |