I have a question about union in SQL.
I have this type of table in long-format.
| id | value | key |
|---|---|---|
| 1 | 67 | users |
| 2 | 42 | users |
| 1 | 45 | politics |
| 2 | 89 | politics |
The code should yield something like this (i.e. a table in wide-format):
| id | users | politics |
|---|---|---|
| 1 | 67 | 45 |
| 2 | 42 | 89 |
Is this possible to achieve by SQL?