I have table with two columns user_id and tags.
user_id tags 1 1 1
duplicate of https://stackoverflow.com/questions/16218616/sql-marching-values-in-column-a-with-more-than-1-value-in-column-b/16218678#16218678
select user_id, group_concat(tags separator ',') from t group by user_id