大数据测试之日志分析3

2、数据处理:

·统计最受欢迎的视频/文章的Top10访问次数 (video/article)

·按照地市统计最受欢迎的Top10课程 (ip)

·按照流量统计最受欢迎的Top10课程 (traffic)

2.1  统计最受欢迎的视频/文章的Top10访问次数 (video/article)

create table type10(
id String,
total String
)ROW format delimited fields terminated by ',' STORED AS TEXTFILE;
insert into type10 select id, count(*) as total from result1 group by id order by total desc limit 10;

导入mysql

柱状图:

原文地址:https://www.cnblogs.com/mjhjl/p/14142421.html