Apologies if this has been answered but trying to word this question was a nightmare to wrap my head around.
Essentially I have a table
| post_id | tag_id |
|---|---|
| 15618 | 6 |
| 15618 | 109 |
| 15618 | 659 |
| 27248 | 245 |
| 27248 | 6 |
| 27248 | 7 |
| 27248 | 6499 |
and I essentially want a query that returns
| post_id | tag_id |
|---|---|
| 15618 | 6, 109, 659 |
| 27248 | 245, 6, 7, 6499 |