select uid,count(1) 总数,sum(case when vmoney>10000 then 1 else 0 end) 超10000记录数from table group by uid;
select uid,count(1) 总数,sum(case when vmoney>10000 then 1 else 0 end) 超10000记录数
from table
group by uid;