how to get from this:
id foo_name 1 A 2 A 3 A 4 A 5 B 6 B 7 B 8 A 9 B 10 A
to this: 1 row only
foo_names A,B
I tried using GROUP_CONCAT
but it give me this:
A,A,A,A,A,A,A,
B,B,B,B
You can use:
select group_concat(distinct foo_name) as foo_names
from t;