1.取用户个数,并且条件是balance相加>1000的
select count(*),region from (select region, entityid,sum(balance) from am_score_balance where scorecycle='200801'
group by region,entityid
having
sum(balance)>1000)
group by region;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/705546/viewspace-166459/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/705546/viewspace-166459/