HAVING 搜索条件在进行分组操作之后应用;
如:查询帖子访问量大于15的用户id;
select t.user_id,u.name,sum(count_view) from t_topic t left join t_users u on t.user_id=u.id GROUP BY user_id HAVING SUM(count_view)<15