I tried for hours and read many posts but I still can't figure out how to handle this request:
I have a table like this:
+------+------+
|roleid|comid |
+------+------+
|11 | A |
+------+------+
|12 | A |
+------+------+
|11 |B |
+------+------+
|12 |B |
+------+------+
|13 |B |
+------+------+
I would like to select the roleid that occurs more than once with the different comid.
I wanna output should be something like:
+------+------+
|roleid|comid |
+------+------+
|11 |A,B |
+------+------+
|12 |A,B |
+------+------+
|13 |B |
+------+------+