支持子查询么可以:
select count(*) from (select userid from tal1 group by userid having sum(points)>50) as a;