频道栏目
首页 > 资讯 > SQL Server > 正文

SQL按家庭维度统计信号强度

17-11-21        来源:[db:作者]  
收藏   我要投稿

先分组再分段统计每段个数

####按家庭维度统计信号强度

create table Power_STAT

(select

DeviceId,

count(DeviceId) as AllNum,

sum(case when SubdeviceWlanRadioPower >= -67 then 1 else 0 end) as GoodNum,

sum(case when SubdeviceWlanRadioPower <= -68 and SubdeviceWlanRadioPower >= -70 then 1 else 0 end ) as NormalNum,

sum(case when SubdeviceWlanRadioPower <= -71 then 1 else 0 end) as PoorNum

from wide_table_all_row

where SubdeviceWlanRadioPower!= ''

group by DeviceId);

相关TAG标签
上一篇:利用SQL语句查找最晚入职员工的所有信息
下一篇:informix的使用之在java中连接informix
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站