正在加载图片...
3.9分析个人通信行为模式,如通话高峰、短信高峰及网络高峰: 把时间段分为8组0-3点为第一个时间段, timegroup值为0;3-6点为第二个 时间段, timegroup值为1:6-9点为第三个时间段, timegroup值为2:以此类推 SQL语句: select floor(hour(th qishi).3) as timegroup,sum( th shichang)as"该时间 段内通信时长(秒)" from tonghua group by timegroup order by sum( th shichang)desc; select floor(hourt( dx qishi3) as timegroup, count(( dx xuhao)as"该时间段内的短信 数(条” from duanxin group by timegroup order by count( dx xuhao)desc select floon(hour( ll qishi/3) as timegroup, sum( lI liuliang)as"该时间段内的流量 (kb)"from liuliang group by timegroup order by sum(ll liuliang)desc 结 果 oup, sum( 该时间段内通信时长(和 o sec ysg1> select f1oor(hour( dx qishi)/3) as tlmegroup, count( dx xuhao)as"该时间段 的短信数(条)" frorn duanxin by timegroup order by count(dx xuhao) desc tlmegroup该时间段内的短信数(条) 35 ----+ timegrou 时间段内的流量(kb) 7225 故,通话髙峰为下午6点到9点;短信高峰为上午9点到12点;流量使用高峰18 3.9 分析个人通信行为模式,如通话高峰、短信高峰及网络高峰; 把时间段分为 8 组 0-3 点为第一个时间段,timegroup 值为 0; 3-6 点为第二个 时间段,timegroup 值为 1;6-9 点为第三个时间段,timegroup 值为 2;以此类推 SQL 语句:select floor(hour(th_qishi)/3) as timegroup,sum(th_shichang) as "该时间 段内通信时长(秒)" from tonghua group by timegroup order by sum(th_shichang) desc; select floor(hour(dx_qishi)/3) as timegroup,count(dx_xuhao) as "该时间段内的短信 数(条)" from duanxin group by timegroup order by count(dx_xuhao) desc; select floor(hour(ll_qishi)/3) as timegroup,sum(ll_liuliang) as "该时间段内的流量 (kb)" from liuliang group by timegroup order by sum(ll_liuliang) desc; 结果: 故,通话高峰为下午 6 点到 9 点;短信高峰为上午 9 点到 12 点;流量使用高峰
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有