How to group and concatenate results from multiple records?
<p>I have a query like:</p>

<pre><code>select a.id, b.value from a
left join b
on a.name = b.name
where a.id = 12345;
</code></pre>

<p>And I get results like</p>

<pre><code>id value
--------
12345 value1
12345 value2
</code></pre>

<p>However I would like to get a result like this:</p>

<pre><code>id value
--------
12345 value1,value2
</code></pre>

<p>which concatenates all values group by id by comma.</p>

<p>I have no idea how to achieve this. Any hint will be helpful.</p>