Mysql
rabeen
这个作者很懒,什么都没留下…
展开
-
MySQL Workbench出现:Error Code: 2013. Lost connection to MySQL server during query的问题解决
问题描述; 1.表规模是 150万行,每行18列。 执行查询语句: selectcount(DeviceId) from(select DeviceId, count(distinct SubdeviceMac) as MACnumfrom wide_table_all_row where TIMESTAMPP LIKE "%2017-10-13%" group by Device原创 2017-11-20 11:47:55 · 10038 阅读 · 1 评论 -
SQL 先分组再分段统计每段个数
####按家庭维度统计信号强度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 SubdeviceWlanRadio原创 2017-11-20 21:31:33 · 3948 阅读 · 0 评论 -
SQL模糊匹配后再分组
####按硬件厂家统计覆盖质量create table Manufacture_STAT(select (case when DeviceId like '%CIOT%' then 'CIOT'when DeviceId like '%FHTT%' then 'FHTT'when DeviceId like '%HWTC%' then 'HWTC'when De原创 2017-11-21 15:51:19 · 2365 阅读 · 0 评论