SELECT userid,username, concat('【',group_concat(cardid_all ORDER BY cardid_all separator '】【'),'】') AS cardid_all FROM reports.upper_report_detail WHERE reports.upper_report_detail.rep_id ='14391' GROUP BY userid