跪求一条Mysql语句
表结构如图
现希望通过sql查询 得到
手机号的 下载次数 mb的累加数
3列数据
[解决办法]
select mobile , count(1) 下载次数 , sum(mb) mb的累加数
from tb
group by mobile
[解决办法]
select mobile,count(*) as [Count],sum(mb) SMB
from T
group by mobile
[解决办法]
select mobile,count(1) as 下载次数 ,sum(isnull(mb,0)) as 累加数 from tablename group by mobile
[解决办法]
select mobile , count(mobile) 下载次数 , sum(mb) mb的累加数from tbgroup by mobile