求一条select语句~~急 数据有50W条数据,主要是邮箱名字eg:[email protected],[email protected].....然后要用select语句,统计出各个邮箱所占用的比例 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select stuff(emailaddr,1,charindex('@', emailaddr),'') as emailaddr, count(*)/(select count(*) from tb) as percentagefrom tbgroup by stuff(emailaddr,1,charindex('@', emailaddr),'') 小数位数的问题 如何删除主键? 行列转换 不能连接主机 端口1433连接失败! 多步操作产生错误,请检查每一步的状态 这是什么意思? 请教高手! 不小心刪除了一下DTS packages MSSQL远程连接问题。zjcxc帮我一下。 sql2000中这样的查询语句怎么写?? VFP 的反编译问题 数据共享问题 数据库中如何导出一张表? and or 查询的问题
count(*)/(select count(*) from tb) as percentage
from tb
group by stuff(emailaddr,1,charindex('@', emailaddr),'')