groupconcat是把一组数据,按照一定顺序,用符号连接,组合成一个数据
    格式:
    group_concat( distinct user_id
    order by user_id
    separator ‘
    ‘)
    最后记得group by 字段
    默认分隔符为’,’

    eg:

    image.png

    1. select qq, group_concat(game separator '_') as game
    2. from table1
    3. group by qq;