Stringsql="SELECT ug.group_id, ug.group_name, (select count(u.uid) from fc_user u where u.group_id = ug.group_id) count, (select group_concat(ugf.fun_id) from fc_user_group_fun ugf where ugf.group_id = ug.group_id group by ugf.group_id) funs FROM fc_user_group ug"+StringUtil.join(" and "," where "," "," ",argEdit.getStringList());
Stringsql=""
+"SELECT "
+"ug.group_id, "
+"ug.group_name, "
+"(select count(u.uid) from fc_user u where u.group_id = ug.group_id) count, "
+"( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_funs ugf WHERE ugf.group_id = ug.group_id GROUP BY ugf.group_id ) funs, "
+"( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_round ugr WHERE ugr.group_id = ug.group_id GROUP BY ugr.group_id ) rounds, "
+"( SELECT group_concat( ugf.fun_id ) FROM fc_user_group_enroll uge WHERE uge.group_id = ug.group_id GROUP BY uge.group_id ) enrolls "
+"FROM fc_user_group ug"+StringUtil.join(" and "," where "," "," ",argEdit.getStringList());