直接按照group_id和user_id当作主键,求一个群多少人就group by group_id count distinct user_id 求一个人在多少个群就group by user_id count distinct group_id吧