How to concate column values in group rows in mysql

Sometime we face the problems for concatenating of group rows column value in a single string.
Scenario is like this :
We have a table data Like

now we want result like this :

How we can achieve concatenating of group by rows value.

GROUP_CONCAT() is a function by which we can concate group rows values.
Syntax

For getting above result, we have to write query as follows

Please see here for More details

You Might Interested In

Leave a Reply

Enclose a code block like: <pre><code>Your Code Snippet</code></pre>.