I have a table that looks like the following
COLUMN_A|| COLUMN_B ||
======================
NAME1 || 1 ||
NAME2 || 1 ||
NAME3 || 1 ||
NAME4 || 2 ||
NAME5 || 2 ||
NAME6 || 3 ||
NAME7 || 3 ||
I want to concatenate COLUMN_A depending on COLUMN_B. If values of COLUMN_B are same, then COLUMN_A should be concatenated seperated by a comma.
Expected result
NAME1, NAME2, NAME3
NAME4, NAME5
NAME6, NAME7