SELECT lottype , pos,ycplaytype ,  userid,  COUNT( userid ) AS wintimes FROM content_pred WHERE issue >= 20170219087  AND issue<=20170219093  AND status =2      GROUP BY lottype ,pos,ycplaytype , userid  order by lottype, pos,ycplaytype,wintimes desc lottype,pos,ycplaytype,userid唯一 为一组 。 怎么加过虑条件每个分组排名前100名?、
使用 having count(userid) 则是过滤每个分组单个用户的记录条数,不能使用。having count( lottype ,pos,ycplaytype , userid)>100这应该可以,但是没这么多参数的 count。
用limit 100,表示全部记录的100条,也不能使用。
怎么办呢?
谢谢大家