Group_concat
https://blog.csdn.net/qq_35531549/article/details/90383022
if
if(a==1,‘男’,‘女’)
concat
https://blog.csdn.net/weixin_40803257/article/details/81737047
SELECT DISTINCT(ACTIVITYDEFID),ID,ROLENAME,ACTIVITYDEFTYPE,ACTIVITYDEFNAME,GROUP_CONCAT(IF(USERPATH!=‘‘, CONCAT(USERPATH,‘;‘),‘‘) SEPARATOR ‘‘) USERPATH FROM BO_ACT_RAM_AUTHTPL_GROUP_R_L WHERE 1=1 GROUP BY ACTIVITYDEFID ORDER BY ORDERINDEX ASC