Please help with SQL Query to solve following issue.
I have a table input values like this - Column header is X and Y
x | y
-------------------
1 | a1
1 | a2
2 | a3
2 | a4
2 | a2
I need output like this
x | y
----------
1 |a1,a2
2 |a3,a4,a2
Please advice!